]> git.sesse.net Git - stockfish/blobdiff - src/timeman.cpp
Simplify other checks (#1337)
[stockfish] / src / timeman.cpp
index 330709be6985d84be15be778dfc8746eccd0741a..0c5224642c191856bc458426597abdcee8e7edbb 100644 (file)
@@ -52,6 +52,9 @@ namespace {
         else
             ratio *= 1.5;
 
+        if (movesToGo > 1)
+            ratio = std::min(0.75, ratio);
+
         ratio *= 1 + inc / (myTime * 8.5);
     }
     // Otherwise we increase usage of remaining time as the game goes on
@@ -64,7 +67,7 @@ namespace {
     int time = int(std::min(1.0, ratio) * std::max(0, myTime - moveOverhead));
 
     if (type == OptimumTime && ponder)
-        time *= 1.25;
+        time = 5 * time / 4;
 
     return time;
   }