mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 01:29:36 +00:00
Always do MaxCardinality checks.
Stockfish currently relies on the "filter_root_moves" function also having the side effect of clamping Cardinality against MaxCardinality (the actual piece count in the tablebases). So if we skip this function, we will end up probing in the search even without tablebases installed. We cannot bail out of this function before this check is done, so move the MultiPV hack a few lines below.
This commit is contained in:
parent
0a74c16ffe
commit
8cfcca12d1
1 changed files with 4 additions and 4 deletions
|
@ -1599,10 +1599,6 @@ void Tablebases::filter_root_moves(Position& pos, Search::RootMoves& rootMoves)
|
|||
ProbeDepth = Options["SyzygyProbeDepth"] * ONE_PLY;
|
||||
Cardinality = Options["SyzygyProbeLimit"];
|
||||
|
||||
// Don't filter any moves if the user requested analysis on multiple
|
||||
if (Options["MultiPV"] != 1)
|
||||
return;
|
||||
|
||||
// Skip TB probing when no TB found: !TBLargest -> !TB::Cardinality
|
||||
if (Cardinality > MaxCardinality)
|
||||
{
|
||||
|
@ -1613,6 +1609,10 @@ void Tablebases::filter_root_moves(Position& pos, Search::RootMoves& rootMoves)
|
|||
if (Cardinality < popcount(pos.pieces()) || pos.can_castle(ANY_CASTLING))
|
||||
return;
|
||||
|
||||
// Don't filter any moves if the user requested analysis on multiple
|
||||
if (Options["MultiPV"] != 1)
|
||||
return;
|
||||
|
||||
// If the current root position is in the tablebases, then RootMoves
|
||||
// contains only moves that preserve the draw or the win.
|
||||
RootInTB = root_probe(pos, rootMoves, TB::Score);
|
||||
|
|
Loading…
Add table
Reference in a new issue