Tested with simplification mode SPRT[-4, 0]
Passed both short TC
LLR: 2.95 (-2.94,2.94) [-4.00,0.00]
Total: 34102 W: 6184 L: 6144 D: 21774
And long TC
LLR: 2.96 (-2.94,2.94) [-4.00,0.00]
Total: 16518 W: 2647 L: 2545 D: 11326
And also 40/10 TC
LLR: 2.95 (-2.94,2.94) [-4.00,0.00]
Total: 22406 W: 4390 L: 4312 D: 13704
bench:
8430785
while (++depth <= MAX_PLY && !Signals.stop && (!Limits.depth || depth <= Limits.depth))
{
// Age out PV variability metric
while (++depth <= MAX_PLY && !Signals.stop && (!Limits.depth || depth <= Limits.depth))
{
// Age out PV variability metric
- BestMoveChanges *= 0.8;
+ BestMoveChanges *= 0.5;
// Save the last iteration's scores before first PV line is searched and
// all the move scores except the (new) PV are set to -VALUE_INFINITE.
// Save the last iteration's scores before first PV line is searched and
// all the move scores except the (new) PV are set to -VALUE_INFINITE.
if (depth > 4 && depth < 50 && PVSize == 1)
TimeMgr.pv_instability(BestMoveChanges);
if (depth > 4 && depth < 50 && PVSize == 1)
TimeMgr.pv_instability(BestMoveChanges);
- // Stop the search if only one legal move is available or most
- // of the available time has been used. We probably don't have
- // enough time to search the first move at the next iteration anyway.
+ // Stop the search if only one legal move is available or all
+ // of the available time has been used.
if ( RootMoves.size() == 1
if ( RootMoves.size() == 1
- || IterationTime > (TimeMgr.available_time() * 62) / 100)
+ || IterationTime > TimeMgr.available_time() )
Time::point elapsed = Time::now() - SearchTime;
bool stillAtFirstMove = Signals.firstRootMove
&& !Signals.failedLowAtRoot
Time::point elapsed = Time::now() - SearchTime;
bool stillAtFirstMove = Signals.firstRootMove
&& !Signals.failedLowAtRoot
- && ( elapsed > TimeMgr.available_time()
- || ( elapsed > (TimeMgr.available_time() * 62) / 100
- && elapsed > IterationTime * 1.4));
+ && elapsed > TimeMgr.available_time()
+ && elapsed > IterationTime * 1.4;
bool noMoreTime = elapsed > TimeMgr.maximum_time() - 2 * TimerThread::Resolution
|| stillAtFirstMove;
bool noMoreTime = elapsed > TimeMgr.maximum_time() - 2 * TimerThread::Resolution
|| stillAtFirstMove;
void TimeManager::pv_instability(double bestMoveChanges) {
void TimeManager::pv_instability(double bestMoveChanges) {
- unstablePVExtraTime = int(bestMoveChanges * optimumSearchTime / 1.4);
+ unstablePvFactor = 1 + bestMoveChanges;
int minThinkingTime = Options["Minimum Thinking Time"];
int slowMover = Options["Slow Mover"];
int minThinkingTime = Options["Minimum Thinking Time"];
int slowMover = Options["Slow Mover"];
- // Initialize all to maximum values but unstablePVExtraTime that is reset
- unstablePVExtraTime = 0;
+ // Initialize unstablePvFactor to 1 and search times to maximum values
+ unstablePvFactor = 1;
optimumSearchTime = maximumSearchTime = std::max(limits.time[us], minThinkingTime);
// We calculate optimum time usage for different hypothetical "moves to go"-values and choose the
optimumSearchTime = maximumSearchTime = std::max(limits.time[us], minThinkingTime);
// We calculate optimum time usage for different hypothetical "moves to go"-values and choose the
public:
void init(const Search::LimitsType& limits, int currentPly, Color us);
void pv_instability(double bestMoveChanges);
public:
void init(const Search::LimitsType& limits, int currentPly, Color us);
void pv_instability(double bestMoveChanges);
- int available_time() const { return optimumSearchTime + unstablePVExtraTime; }
+ int available_time() const { return int(optimumSearchTime * unstablePvFactor * 0.62); }
int maximum_time() const { return maximumSearchTime; }
private:
int optimumSearchTime;
int maximumSearchTime;
int maximum_time() const { return maximumSearchTime; }
private:
int optimumSearchTime;
int maximumSearchTime;
- int unstablePVExtraTime;
+ double unstablePvFactor;
};
#endif // #ifndef TIMEMAN_H_INCLUDED
};
#endif // #ifndef TIMEMAN_H_INCLUDED
o["Emergency Base Time"] = Option(60, 0, 30000);
o["Emergency Move Time"] = Option(30, 0, 5000);
o["Minimum Thinking Time"] = Option(20, 0, 5000);
o["Emergency Base Time"] = Option(60, 0, 30000);
o["Emergency Move Time"] = Option(30, 0, 5000);
o["Minimum Thinking Time"] = Option(20, 0, 5000);
- o["Slow Mover"] = Option(70, 10, 1000);
+ o["Slow Mover"] = Option(80, 10, 1000);
o["UCI_Chess960"] = Option(false);
o["UCI_AnalyseMode"] = Option(false, on_eval);
}
o["UCI_Chess960"] = Option(false);
o["UCI_AnalyseMode"] = Option(false, on_eval);
}