]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Add a second margin to razoring
[stockfish] / src / search.cpp
index 8279d15780474d598144d5d1a0c16a0804f9e501..10aa196add95d87944db24863eb1cbd5c764010e 100644 (file)
@@ -1122,7 +1122,8 @@ namespace {
         }
     }
     // Null move search not allowed, try razoring
         }
     }
     // Null move search not allowed, try razoring
-    else if (depth < RazorDepth && approximateEval < beta - RazorMargin)
+    else if (  (approximateEval < beta - RazorMargin && depth < RazorDepth)
+             ||(approximateEval < beta - PawnValueMidgame && depth <= OnePly))
     {
         Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
         if (v < beta)
     {
         Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
         if (v < beta)