mirror of
https://github.com/sockspls/badfish
synced 2025-06-28 00:19:50 +00: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:
parent
1054a483ca
commit
4568f6369b
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue