mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Report longest PV lines for multithreaded search
In case several threads find the same bestmove, report the longest PV line found. closes https://github.com/official-stockfish/Stockfish/pull/4126 No functional change.
This commit is contained in:
committed by
Joost VandeVondele
parent
1054a483ca
commit
4568f6369b
@@ -237,7 +237,9 @@ Thread* ThreadPool::get_best_thread() const {
|
||||
}
|
||||
else if ( th->rootMoves[0].score >= VALUE_TB_WIN_IN_MAX_PLY
|
||||
|| ( th->rootMoves[0].score > VALUE_TB_LOSS_IN_MAX_PLY
|
||||
&& votes[th->rootMoves[0].pv[0]] > votes[bestThread->rootMoves[0].pv[0]]))
|
||||
&& ( votes[th->rootMoves[0].pv[0]] > votes[bestThread->rootMoves[0].pv[0]]
|
||||
|| ( votes[th->rootMoves[0].pv[0]] == votes[bestThread->rootMoves[0].pv[0]]
|
||||
&& th->rootMoves[0].pv.size() > bestThread->rootMoves[0].pv.size()))))
|
||||
bestThread = th;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user