Fixed a bug that the root color is wrong.

This commit is contained in:
nodchip
2020-09-14 19:11:57 +09:00
parent d160436921
commit 6ae09ba266

View File

@@ -842,6 +842,8 @@ namespace Learner
// EvalHash has been disabled in advance. (If not, the same value will be returned every time)
const auto [_, pv] = qsearch(task_pos);
const auto rootColor = task_pos.side_to_move();
std::vector<StateInfo, AlignedAllocator<StateInfo>> states(pv.size());
for (size_t i = 0; i < pv.size(); ++i)
{
@@ -849,7 +851,6 @@ namespace Learner
Eval::NNUE::update_eval(task_pos);
}
const auto rootColor = task_pos.side_to_move();
const Value shallow_value =
(rootColor == task_pos.side_to_move())
? Eval::evaluate(task_pos)