]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Always do MaxCardinality checks.
[stockfish] / src / search.cpp
index cf380b3135b190b4c808eafda1ec23934cf08a47..f7efd41c03e628b460f690fed61023a92aa7d854 100644 (file)
@@ -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);