]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Report longest PV lines for multithreaded search
[stockfish] / src / thread.cpp
index 08a78db5f31da450fa7c4003272dff78c4162ce6..c834fa9f9dff0bd1ce23bd2f72f3c20c5c1ece01 100644 (file)
@@ -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;
     }