]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Null move dynamic reduction based on value
[stockfish] / src / search.cpp
index d654fec9c414a75be3fd6d406fdaf8fc24053613..e02529327435b46f49f4780d591877b201042cbf 100644 (file)
@@ -1314,7 +1314,13 @@ namespace {
         ss[ply].currentMove = MOVE_NULL;
 
         pos.do_null_move(st);
-        int R = (depth >= 5 * OnePly ? 4 : 3); // Null move dynamic reduction
+
+        // Null move dynamic reduction based on depth
+        int R = (depth >= 5 * OnePly ? 4 : 3);
+
+        // Null move dynamic reduction based on value
+        if (approximateEval - beta > PawnValueMidgame)
+            R++;
 
         nullValue = -search(pos, ss, -(beta-1), depth-R*OnePly, ply+1, false, threadID);