]> git.sesse.net Git - stockfish/commitdiff
Less aggressive razoring
authorMarco Costalba <mcostalba@gmail.com>
Sun, 21 Dec 2008 09:42:39 +0000 (10:42 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 21 Dec 2008 09:42:39 +0000 (10:42 +0100)
Use a margin to compare with beta so that positions
that after the verifying qsearch have gained a lot of points
are not discarded just becasue not above beta.

Also remove the second condition on depth <= OnePly, it
was too risky and added only a 2% more of pruned nodes.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index c3f96e13de0e1b69e1034507524eaec542b8991f..054ef45d5d05858ad1c6e97c624dcc224edb5241 100644 (file)
@@ -1237,11 +1237,11 @@ namespace {
     }
     // Null move search not allowed, try razoring
     else if (   !value_is_mate(beta)
     }
     // Null move search not allowed, try razoring
     else if (   !value_is_mate(beta)
-             && (  (approximateEval < beta - RazorMargin && depth < RazorDepth)
-                 ||(approximateEval < beta - PawnValueMidgame && depth <= OnePly)))
+             && approximateEval < beta - RazorMargin
+             && depth < RazorDepth)
     {
         Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
     {
         Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
-        if (v < beta)
+        if (v < beta - RazorMargin / 2)
             return v;
     }
 
             return v;
     }