]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Simplify new cmh pruning thresholds by using directly a quadratic formula.
[stockfish] / src / search.cpp
index 187f21694ef932d543eb474f8914719d9c2a46f1..af99c90271a689d09517e68db133fb2a2c904535 100644 (file)
@@ -1017,8 +1017,8 @@ moves_loop: // When in check, search starts here
           {
               // Continuation history based pruning (~20 Elo)
               if (   lmrDepth < 5
-                  && (*contHist[0])[movedPiece][to_sq(move)] < (depth == 1 ? 0 : -stat_bonus(depth-1))
-                  && (*contHist[1])[movedPiece][to_sq(move)] < (depth == 1 ? 0 : -stat_bonus(depth-1)))
+                  && (*contHist[0])[movedPiece][to_sq(move)] < 23 - 23 * depth * depth
+                  && (*contHist[1])[movedPiece][to_sq(move)] < 23 - 23 * depth * depth)
                   continue;
 
               // Futility pruning: parent node (~5 Elo)