CounterMove History Pruning Tweak
[stockfish] / src / search.cpp
index af7a5c13dd643f411e8bf1f94906e8269423f714..325278fbc95acab4d559b94ae7a1787d2f8b0b9b 100644 (file)
@@ -935,7 +935,8 @@ moves_loop: // When in check, search starts from here
               int lmrDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO) / ONE_PLY;
 
               // Countermoves based pruning (~20 Elo)
-              if (   lmrDepth < 3
+              if (   lmrDepth < 4
+                  && (lmrDepth < 3 || ((ss - 1)->statScore > 0 && !PvNode))
                   && (*contHist[0])[movedPiece][to_sq(move)] < CounterMovePruneThreshold
                   && (*contHist[1])[movedPiece][to_sq(move)] < CounterMovePruneThreshold)
                   continue;