From: Leonid Pechenik Date: Mon, 16 May 2016 20:30:57 +0000 (-0400) Subject: More detailed dependence of time allocation on the magnitude of score change X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=71bfbb22fce23f56b57d69b59a5cec1ff4b5aa03;ds=sidebyside More detailed dependence of time allocation on the magnitude of score change 10+0.1: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 5657 W: 1130 L: 979 D: 3548 60+0.6: LLR: 2.95 (-2.94,2.94) [0.00,5.00] Total: 36884 W: 5002 L: 4762 D: 27120 bench: 8428997 --- diff --git a/src/search.cpp b/src/search.cpp index 3b384e86..c6d63c7b 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -541,18 +541,18 @@ void Thread::search() { // Stop the search if only one legal move is available, or if all // of the available time has been used, or if we matched an easyMove // from the previous search and just did a fast verification. - const bool F[] = { !mainThread->failedLow, - bestValue >= mainThread->previousScore }; + const int F[] = { mainThread->failedLow, + bestValue - mainThread->previousScore }; - int improvingFactor = 640 - 160*F[0] - 126*F[1] - 124*F[0]*F[1]; + int improvingFactor = std::max(229, std::min(715, 357 + 119 * F[0] - 6 * F[1])); double unstablePvFactor = 1 + mainThread->bestMoveChanges; bool doEasyMove = rootMoves[0].pv[0] == easyMove && mainThread->bestMoveChanges < 0.03 - && Time.elapsed() > Time.optimum() * 25 / 204; + && Time.elapsed() > Time.optimum() * 5 / 42; if ( rootMoves.size() == 1 - || Time.elapsed() > Time.optimum() * unstablePvFactor * improvingFactor / 634 + || Time.elapsed() > Time.optimum() * unstablePvFactor * improvingFactor / 628 || (mainThread->easyMovePlayed = doEasyMove)) { // If we are allowed to ponder do not stop the search now but