X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftimeman.cpp;h=ebbb5fd5ae875929bd884fe0a2ad16f0646c2308;hp=330709be6985d84be15be778dfc8746eccd0741a;hb=9afa1d73306cb98e95acec5daf4efd65e592ceff;hpb=fe60caba94de11932d6cdb9bb0282da0221c9f20 diff --git a/src/timeman.cpp b/src/timeman.cpp index 330709be..ebbb5fd5 100644 --- a/src/timeman.cpp +++ b/src/timeman.cpp @@ -2,7 +2,7 @@ Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad - Copyright (C) 2015-2017 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad + Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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; }