mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Avoid truncated PV in the threaded case
strongly prefer to pick as bestThread those threads with a longer PV, among those threads that all found the same bestmove. extended discussion in #4244 closes https://github.com/official-stockfish/Stockfish/pull/4278 No functional change
This commit is contained in:
parent
955edf1d1d
commit
310928e985
1 changed files with 2 additions and 1 deletions
|
@ -239,7 +239,8 @@ Thread* ThreadPool::get_best_thread() const {
|
||||||
|| ( th->rootMoves[0].score > VALUE_TB_LOSS_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]]
|
|| ( votes[th->rootMoves[0].pv[0]] == votes[bestThread->rootMoves[0].pv[0]]
|
||||||
&& thread_value(th) > thread_value(bestThread)))))
|
&& thread_value(th) * int(th->rootMoves[0].pv.size() > 2)
|
||||||
|
> thread_value(bestThread) * int(bestThread->rootMoves[0].pv.size() > 2)))))
|
||||||
bestThread = th;
|
bestThread = th;
|
||||||
|
|
||||||
return bestThread;
|
return bestThread;
|
||||||
|
|
Loading…
Add table
Reference in a new issue