]> git.sesse.net Git - stockfish/commitdiff
Check for easy move just once
authorGary Linscott <glinscott@gmail.com>
Sun, 10 Mar 2013 09:06:39 +0000 (10:06 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 11 Mar 2013 21:23:19 +0000 (22:23 +0100)
Here the rational seems to be that if after one try easy
move detection fails then the easy move is not so easy :-)

After 15563 games at 60+0.05
ELO: 3.04 +-5.5 (95%) LOS: 97.0%
Total: 15563 W: 2664 L: 2528 D: 10371

No functional change.

src/search.cpp

index 40a887c27821654b7f26cb2f2a0bb3131080a1db..cff8e768a73693ec3ec29046165602aac7fd404c 100644 (file)
@@ -293,6 +293,7 @@ namespace {
     Stack ss[MAX_PLY_PLUS_2];
     int depth, prevBestMoveChanges;
     Value bestValue, alpha, beta, delta;
+    bool triedEasyMove = false;
 
     memset(ss, 0, 4 * sizeof(Stack));
     depth = BestMoveChanges = 0;
@@ -439,10 +440,12 @@ namespace {
             // Stop search early if one move seems to be much better than others
             if (    depth >= 12
                 && !stop
+                && !triedEasyMove
                 &&  PVSize == 1
                 && (   RootMoves.size() == 1
                     || Time::now() - SearchTime > (TimeMgr.available_time() * 20) / 100))
             {
+                triedEasyMove = true;
                 Value rBeta = bestValue - 2 * PawnValueMg;
                 (ss+1)->excludedMove = RootMoves[0].pv[0];
                 (ss+1)->skipNullMove = true;