]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Tweak time management
[stockfish] / src / search.cpp
index 28e16609203a7f8262d405ca9cabc6b3434dbf56..99c4743174dfbb9befae87b2fecca958b2450107 100644 (file)
@@ -260,6 +260,7 @@ void MainThread::search() {
       bestThread = Threads.get_best_thread();
 
   bestPreviousScore = bestThread->rootMoves[0].score;
+  bestPreviousAverageScore = bestThread->rootMoves[0].averageScore;
 
   // Send again PV info if we have a new best thread
   if (bestThread != this)
@@ -489,7 +490,8 @@ void Thread::search() {
           && !Threads.stop
           && !mainThread->stopOnPonderhit)
       {
-          double fallingEval = (318 + 6 * (mainThread->bestPreviousScore - bestValue)
+          double fallingEval = (142 + 6 * (mainThread->bestPreviousScore - bestValue)
+                                    + 6 * (mainThread->bestPreviousAverageScore - bestValue)
                                     + 6 * (mainThread->iterValue[iterIdx] - bestValue)) / 825.0;
           fallingEval = std::clamp(fallingEval, 0.5, 1.5);