X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=fdef140026bd529a52390e8954f536eff42fa5ef;hp=b31157e4406c3755f6789da25df8fd13c556e215;hb=3a572ffb4840bfea3c587c9c81a0008515f02a32;hpb=44c320a572188b5875291103edb344c584b91d19 diff --git a/src/search.cpp b/src/search.cpp index b31157e4..fdef1400 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -283,7 +283,7 @@ void Thread::search() { Move pv[MAX_PLY+1]; Value bestValue, alpha, beta, delta; Move lastBestMove = MOVE_NONE; - Depth lastBestMoveDepth = DEPTH_ZERO, rootDepth = DEPTH_ZERO; + Depth lastBestMoveDepth = DEPTH_ZERO; MainThread* mainThread = (this == Threads.main() ? Threads.main() : nullptr); double timeReduction = 1, totBestMoveChanges = 0; Color us = rootPos.side_to_move(); @@ -404,17 +404,14 @@ void Thread::search() { beta = (alpha + beta) / 2; alpha = std::max(bestValue - delta, -VALUE_INFINITE); + failedHighCnt = 0; if (mainThread) - { - failedHighCnt = 0; mainThread->stopOnPonderhit = false; - } } else if (bestValue >= beta) { beta = std::min(bestValue + delta, VALUE_INFINITE); - if (mainThread) - ++failedHighCnt; + ++failedHighCnt; } else break;