- // Calculate thinking time for hypothetical "moves to go"-value
- hypMyTime = limits.time[us]
- + limits.inc[us] * (hypMTG - 1)
- - moveOverhead * (2 + std::min(hypMTG, 40));
-
- hypMyTime = std::max(hypMyTime, 0);
-
- t1 = minThinkingTime + remaining<OptimumTime>(hypMyTime, hypMTG, currentPly, slowMover);
- t2 = minThinkingTime + remaining<MaxTime>(hypMyTime, hypMTG, currentPly, slowMover);
+ optScale = std::min(0.0084 + std::pow(ply + 3.0, 0.5) * 0.0042,
+ 0.2 * limits.time[us] / double(timeLeft));
+ maxScale = std::min(7.0, 4.0 + ply / 12.0);
+ }