]> git.sesse.net Git - stockfish/commitdiff
Reduce increase progression of aspiration window
authorMarco Costalba <mcostalba@gmail.com>
Tue, 9 Mar 2010 14:46:20 +0000 (15:46 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 13 Mar 2010 10:05:27 +0000 (11:05 +0100)
Currently, in case of fail high/low we research with
a window increased by 2*AspirationDelta at first
attempt, this patch instead makes the research be
done with an increase of just AspirationDelta size,
in case of a consecutive fail we will widen to
2*AspirationDelta and so on.

After Joona's test:
Orig - Mod: 850 - 890

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

index 1eddff5813f2d5afc45f106f53dd8c1278b4b7a2..02fc41be309d85f3f654d19b200a635bfa55c24f 100644 (file)
@@ -931,8 +931,8 @@ namespace {
                 print_pv_info(pos, ss, alpha, beta, value);
 
                 // Prepare for a research after a fail high, each time with a wider window
-                researchCountFH++;
                 *betaPtr = beta = Min(beta + AspirationDelta * (1 << researchCountFH), VALUE_INFINITE);
+                researchCountFH++;
 
             } // End of fail high loop
 
@@ -1017,8 +1017,8 @@ namespace {
             break;
 
         // Prepare for a research after a fail low, each time with a wider window
-        researchCountFL++;
         *alphaPtr = alpha = Max(alpha - AspirationDelta * (1 << researchCountFL), -VALUE_INFINITE);
+        researchCountFL++;
 
     } // Fail low loop