]> git.sesse.net Git - stockfish/commitdiff
Fix syzygy with partial TB
authorMarco Costalba <mcostalba@gmail.com>
Sat, 3 Sep 2016 06:19:17 +0000 (08:19 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 3 Sep 2016 06:21:05 +0000 (08:21 +0200)
In case we have installed a not complete set of 6-men tables and
there is 6 piece position on board, but no corresponding
tablebase engine is not using any syzygy at all.

Reported by Jouni Uski, fix by Peter Ă–sterlund,
confirmed as a bug by Ronald de Man.

bench: 7591630

src/search.cpp

index c12f086240721cc9c7157032eb5864ea87103268..fe450a4e9adc2956128e1dd787c319dcc06b9dff 100644 (file)
@@ -1641,7 +1641,7 @@ void Tablebases::filter_root_moves(Position& pos, Search::RootMoves& rootMoves)
         RootInTB = root_probe_wdl(pos, rootMoves, TB::Score);
 
         // Only probe during search if winning
-        if (TB::Score <= VALUE_DRAW)
+        if (RootInTB && TB::Score <= VALUE_DRAW)
             Cardinality = 0;
     }