]> git.sesse.net Git - stockfish/commitdiff
Do not use evaluate() for razoring
authorMarco Costalba <mcostalba@gmail.com>
Tue, 23 Sep 2008 11:03:44 +0000 (13:03 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 23 Sep 2008 21:36:51 +0000 (23:36 +0200)
Because razoring is reached 10% of times and about 50% of time
first two conditions are met we can save 5% of calls to the fairly
costly evaluate().

On the other side statistics have shown 95% of nodes that pass
the first two razoring conditions pass also the evaluate() test.
So the risk of dropping the third condition seems low enough.

Testing seems to validate this.

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

index 88d3e8a0b02817d2fc7f07b0318ee6af63c6894c..c2974dcfeebffdc2671955a17d5a3cb19c1e43ac 100644 (file)
@@ -1122,9 +1122,7 @@ namespace {
         }
     }
     // Null move search not allowed, try razoring
-    else if (   depth < RazorDepth
-             && approximateEval < beta - RazorMargin
-             && evaluate(pos, ei, threadID) < beta - RazorMargin)
+    else if (depth < RazorDepth && approximateEval < beta - RazorMargin)
     {
         Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
         if (v < beta)