]> git.sesse.net Git - stockfish/commitdiff
Add a second margin to razoring
authorMarco Costalba <mcostalba@gmail.com>
Mon, 13 Oct 2008 05:15:48 +0000 (07:15 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 13 Oct 2008 18:40:47 +0000 (20:40 +0200)
Razor on ply one if the advantage is more then a pawn,
the only way to gap the advantage is to capture, so
go directly in quiesce.

This seems to have a positive effect.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
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)