mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Fixed a bug that the root color is wrong.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user