X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=inline;f=src%2Fsearch.cpp;h=9919b0cc87405bb9e411b86aece1a373ac4eca13;hb=297c40291a1cc0ca27fecef342501ba1c359f9cd;hp=0e10f44f3a77f70538539365f311259b2b2e9e65;hpb=d39bc2efa197ba2fd55b68eced1c60bcfe2facc1;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 0e10f44f..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 @@ -980,7 +980,7 @@ moves_loop: // When in check, search starts from here if (!pos.see_ge(move, Value(-29 * lmrDepth * lmrDepth))) continue; } - else if ((!givesCheck || !(pos.blockers_for_king(~us) & from_sq(move))) + else if ((!givesCheck || !extension) && !pos.see_ge(move, -PawnValueEg * (depth / ONE_PLY))) // (~20 Elo) continue; } @@ -1363,6 +1363,7 @@ moves_loop: // When in check, search starts from here // Don't search moves with negative SEE values if ( (!inCheck || evasionPrunable) + && (!givesCheck || !(pos.blockers_for_king(~pos.side_to_move()) & from_sq(move))) && !pos.see_ge(move)) continue; @@ -1712,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; + } }