X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftimeman.cpp;h=ddee63d747eda4cf122368f72c65488bbb951061;hp=c305e6114e4f080fa85cae7841a79fb0bd20045d;hb=94dd204c3b10ebe0e6c8df5d7c98de5ba4906cad;hpb=9f2a64abd265e1231b02cae442c9631a3dfd63fb diff --git a/src/timeman.cpp b/src/timeman.cpp index c305e611..ddee63d7 100644 --- a/src/timeman.cpp +++ b/src/timeman.cpp @@ -23,7 +23,7 @@ #include "search.h" #include "timeman.h" -#include "ucioption.h" +#include "uci.h" namespace { @@ -78,7 +78,7 @@ void TimeManager::init(const Search::LimitsType& limits, int currentPly, Color u increment > 0 && movesToGo == 0 means: x basetime + z increment increment > 0 && movesToGo != 0 means: x moves in y minutes + z increment - Time management is adjusted by following UCI parameters: + Time management is adjusted by following parameters: emergencyMoveHorizon: Be prepared to always play at least this many moves emergencyBaseTime : Always attempt to keep at least this much time (in ms) at clock @@ -89,11 +89,9 @@ void TimeManager::init(const Search::LimitsType& limits, int currentPly, Color u int hypMTG, hypMyTime, t1, t2; // Read uci parameters - int emergencyMoveHorizon = Options["Emergency Move Horizon"]; - int emergencyBaseTime = Options["Emergency Base Time"]; - int emergencyMoveTime = Options["Emergency Move Time"]; - int minThinkingTime = Options["Minimum Thinking Time"]; - int slowMover = Options["Slow Mover"]; + int moveOverhead = Options["Move Overhead"]; + int minThinkingTime = Options["Minimum Thinking Time"]; + int slowMover = Options["Slow Mover"]; // Initialize unstablePvFactor to 1 and search times to maximum values unstablePvFactor = 1; @@ -106,8 +104,7 @@ void TimeManager::init(const Search::LimitsType& limits, int currentPly, Color u // Calculate thinking time for hypothetical "moves to go"-value hypMyTime = limits.time[us] + limits.inc[us] * (hypMTG - 1) - - emergencyBaseTime - - emergencyMoveTime * std::min(hypMTG, emergencyMoveHorizon); + - moveOverhead * (2 + std::min(hypMTG, 40)); hypMyTime = std::max(hypMyTime, 0);