X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=9919b0cc87405bb9e411b86aece1a373ac4eca13;hp=d9543899a0f7844e2b817b3e2095f321a8ca51fc;hb=297c40291a1cc0ca27fecef342501ba1c359f9cd;hpb=46ce245763705c89dba60dcfda549dc1f64eb48b diff --git a/src/search.cpp b/src/search.cpp index d9543899..9919b0cc 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -932,7 +932,7 @@ moves_loop: // When in check, search starts from here else if ( PvNode && pos.rule50_count() > 18 && depth < 3 * ONE_PLY - && ss->ply < 3 * thisThread->rootDepth / ONE_PLY) // To avoid too deep searches + && ++thisThread->shuffleExts < thisThread->nodes.load(std::memory_order_relaxed) / 4) // To avoid too many extensions extension = ONE_PLY; // Passed pawn extension @@ -1713,4 +1713,10 @@ void Tablebases::rank_root_moves(Position& pos, Search::RootMoves& rootMoves) { if (dtz_available || rootMoves[0].tbScore <= VALUE_DRAW) Cardinality = 0; } + else + { + // Clean up if root_probe() and root_probe_wdl() have failed + for (auto& m : rootMoves) + m.tbRank = 0; + } }