]> git.sesse.net Git - stockfish/commitdiff
Extra time management safety
authorMarco Costalba <mcostalba@gmail.com>
Fri, 6 Jan 2012 09:28:15 +0000 (10:28 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 6 Jan 2012 12:24:37 +0000 (13:24 +0100)
Further increase safety against time losses. After this
change (tested on LittleBlitzer and cutechess) I had no
more time losses at 2" and 1"+0.02 TC both on Windows
and Linux on more than 10000 games.

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

index 9d29d2798737b81f76d8fa64ad130b97eac54ebd..3ed8ced0326e5ab162f3f70559a1bc80c8a07358 100644 (file)
@@ -1983,7 +1983,7 @@ void check_time() {
                          && !Signals.failedLowAtRoot
                          &&  e > TimeMgr.available_time();
 
-  bool noMoreTime =   e > TimeMgr.maximum_time() - TimerResolution
+  bool noMoreTime =   e > TimeMgr.maximum_time() - 2 * TimerResolution
                    || stillAtFirstMove;
 
   if (   (Limits.use_time_management() && noMoreTime)