]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Update failedHighCnt rule #2063
[stockfish] / src / search.cpp
index 0e9674a05cc6bad59c7f4089edf8ac3f73301dab..fdef140026bd529a52390e8954f536eff42fa5ef 100644 (file)
@@ -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;