]> git.sesse.net Git - stockfish/commitdiff
Use fail soft in null search
authorMarco Costalba <mcostalba@gmail.com>
Sat, 20 Mar 2010 11:42:23 +0000 (12:42 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 21 Mar 2010 14:12:44 +0000 (15:12 +0100)
If null search fails high return null value instead of beta.

With TT hash there may be a small advantage for fail-soft since
storing slightly better bounds may cause slightly more hash hits.

After 990 games at 1+0
Mod vs Orig +171 =665 -154  +6 ELO

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

index 4592ac084ebc56d60a59b83415167bd2f75af146..f5552e7887dcd4e03a3a243a747193917e0cbece 100644 (file)
@@ -1379,12 +1379,12 @@ namespace {
         if (nullValue >= beta)
         {
             if (depth < 6 * OnePly)
-                return beta;
+                return nullValue;
 
             // Do zugzwang verification search
             Value v = search(pos, ss, beta, depth-5*OnePly, ply, false, threadID);
             if (v >= beta)
-                return beta;
+                return nullValue;
         } else {
             // The null move failed low, which means that we may be faced with
             // some kind of threat. If the previous move was reduced, check if