File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -256,8 +256,9 @@ void MainThread::search() {
256256 }
257257 else
258258 {
259- if (TB::Cardinality >= rootPos.count <ALL_PIECES>(WHITE)
260- + rootPos.count <ALL_PIECES>(BLACK))
259+ if ( TB::Cardinality >= rootPos.count <ALL_PIECES>(WHITE)
260+ + rootPos.count <ALL_PIECES>(BLACK)
261+ && !rootPos.can_castle (ANY_CASTLING))
261262 {
262263 // If the current root position is in the tablebases, then RootMoves
263264 // contains only moves that preserve the draw or the win.
@@ -691,7 +692,8 @@ namespace {
691692
692693 if ( piecesCnt <= TB::Cardinality
693694 && (piecesCnt < TB::Cardinality || depth >= TB::ProbeDepth)
694- && pos.rule50_count () == 0 )
695+ && pos.rule50_count () == 0
696+ && !pos.can_castle (ANY_CASTLING))
695697 {
696698 int found, v = Tablebases::probe_wdl (pos, &found);
697699
You can’t perform that action at this time.
0 commit comments