]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Do move-count pruning in probcut
[stockfish] / src / search.cpp
index f6cf8de887cc655512884249d70301196b0e5a70..8a50c3b1e48916505da0bef2fd9750472d7cf6cd 100644 (file)
@@ -757,10 +757,13 @@ namespace {
 
         Value rbeta = std::min(beta + 200, VALUE_INFINITE);
         MovePicker mp(pos, ttMove, rbeta - ss->staticEval, &thisThread->captureHistory);
-
-        while ((move = mp.next_move()) != MOVE_NONE)
+        int probCutCount = 0;
+        while (  (move = mp.next_move()) != MOVE_NONE
+               && probCutCount < depth / ONE_PLY - 3)
             if (pos.legal(move))
             {
+                probCutCount++;
+
                 ss->currentMove = move;
                 ss->contHistory = thisThread->contHistory[pos.moved_piece(move)][to_sq(move)].get();