X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=e9afc1c58b2655374c056161e08f325a1c67d7b7;hb=ad5d86c7714ae3eaad71e8b3630d38c29dd2c3fe;hp=3874852b1bbcac48a34ea38812b79b047a283d5d;hpb=de642f16db0c443de2dc0ddf7b06c0a7d1c5b8b7;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 3874852b..e9afc1c5 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -325,7 +325,7 @@ void Thread::search() { // Age out PV variability metric if (mainThread) - mainThread->bestMoveChanges *= 0.505, mainThread->failedLow = false; + mainThread->bestMoveChanges *= 0.517, mainThread->failedLow = false; // 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. @@ -444,21 +444,21 @@ void Thread::search() { const int F[] = { mainThread->failedLow, bestValue - mainThread->previousScore }; - int improvingFactor = std::max(229, std::min(715, 357 + 119 * F[0] - 6 * F[1])); + int improvingFactor = std::max(246, std::min(832, 306 + 119 * F[0] - 6 * F[1])); // If the bestMove is stable over several iterations, reduce time accordingly timeReduction = 1.0; for (int i : {3, 4, 5}) if (lastBestMoveDepth * i < completedDepth) - timeReduction *= 1.3; + timeReduction *= 1.25; // Use part of the gained time from a previous stable move for the current move double unstablePvFactor = 1.0 + mainThread->bestMoveChanges; - unstablePvFactor *= std::pow(mainThread->previousTimeReduction, 0.51) / timeReduction; + unstablePvFactor *= std::pow(mainThread->previousTimeReduction, 0.528) / timeReduction; // Stop the search if we have only one legal move, or if available time elapsed if ( rootMoves.size() == 1 - || Time.elapsed() > Time.optimum() * unstablePvFactor * improvingFactor / 605) + || Time.elapsed() > Time.optimum() * unstablePvFactor * improvingFactor / 581) { // If we are allowed to ponder do not stop the search now but // keep pondering until the GUI sends "ponderhit" or "stop".