]> git.sesse.net Git - stockfish/commitdiff
Stockfish 1.2 optimistic
authorMarco Costalba <mcostalba@gmail.com>
Mon, 29 Dec 2008 11:24:34 +0000 (12:24 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 29 Dec 2008 11:24:34 +0000 (12:24 +0100)
Optimistic razoring settings. It is stronger with
most engines but weaker with someones.

The default is instead more solid and uniform with all
the opponents.

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

index 3529627fd4d946949c9794b487f6c7eea44b25c8..f7f62b2344e7c5d2837fd21698d3b222a274771a 100644 (file)
@@ -1241,14 +1241,14 @@ namespace {
     else if (   !value_is_mate(beta)
              && approximateEval < beta - RazorMargin
              && depth < RazorDepth
-             && (RazorAtDepthOne || depth >= 2*OnePly)
+             && (RazorAtDepthOne || depth > OnePly)
              && ttMove == MOVE_NONE
              && !pos.has_pawn_on_7th(pos.side_to_move()))
     {
         Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
         if (   (v < beta - RazorMargin - RazorMargin / 4)
-            || (depth < 3*OnePly && v < beta - RazorMargin)
-            || (depth < 2*OnePly && v < beta - RazorMargin / 2))
+            || (depth <= 2*OnePly && v < beta - RazorMargin)
+            || (depth <=   OnePly && v < beta - RazorMargin / 2))
             return v;
     }