- startTime = limits.startTime;
- unstablePvFactor = 1;
- optimumTime = maximumTime = std::max(limits.time[us], minThinkingTime);
-
- const int MaxMTG = limits.movestogo ? std::min(limits.movestogo, MoveHorizon) : MoveHorizon;
-
- // We calculate optimum time usage for different hypothetical "moves to go"-values
- // and choose the minimum of calculated search time values. Usually the greatest
- // hypMTG gives the minimum values.
- for (int hypMTG = 1; hypMTG <= MaxMTG; ++hypMTG)
- {
- // Calculate thinking time for hypothetical "moves to go"-value
- int hypMyTime = limits.time[us]
- + limits.inc[us] * (hypMTG - 1)
- - moveOverhead * (2 + std::min(hypMTG, 40));