X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=4a41a8b0b09e275284424c37bed3d8f2edcb69d3;hb=5372f81cc81d5be3040db6f2dbfff108c460baf9;hp=c12b60e6815fc7209ddaae90ba5265fa67615b07;hpb=c079acc26f93acc2eda08c7218c60559854f52f0;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index c12b60e6..4a41a8b0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -238,6 +238,9 @@ void MainThread::search() { bestPreviousScore = bestThread->rootMoves[0].score; bestPreviousAverageScore = bestThread->rootMoves[0].averageScore; + for (Thread* th : Threads) + th->previousDepth = bestThread->completedDepth; + // Send again PV info if we have a new best thread if (bestThread != this) sync_cout << UCI::pv(bestThread->rootPos, bestThread->completedDepth, -VALUE_INFINITE, VALUE_INFINITE) << sync_endl; @@ -1061,7 +1064,7 @@ moves_loop: // When in check, search starts here // a reduced search on all the other moves but the ttMove and if the // result is lower than ttValue minus a margin, then we will extend the ttMove. if ( !rootNode - && depth >= 4 + 2 * (PvNode && tte->is_pv()) + && depth >= 4 - (thisThread->previousDepth > 27) + 2 * (PvNode && tte->is_pv()) && move == ttMove && !excludedMove // Avoid recursive singular search /* && ttValue != VALUE_NONE Already implicit in the next condition */