X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=dc5164ea38a99e85faff9f9e499b85c39f71bf18;hp=0ccf326698ee3bc9a1a676e8831ba3e8001d39b2;hb=8c3a5bbc5284897cb944e4bb5748c58813687ba9;hpb=28933a580eeb4b9a2d717f06c789a6c13dfef19c diff --git a/src/search.cpp b/src/search.cpp index 0ccf3266..dc5164ea 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -256,8 +256,9 @@ void MainThread::search() { } else { - if (TB::Cardinality >= rootPos.count(WHITE) - + rootPos.count(BLACK)) + if ( TB::Cardinality >= rootPos.count(WHITE) + + rootPos.count(BLACK) + && !rootPos.can_castle(ANY_CASTLING)) { // If the current root position is in the tablebases, then RootMoves // contains only moves that preserve the draw or the win. @@ -691,7 +692,8 @@ namespace { if ( piecesCnt <= TB::Cardinality && (piecesCnt < TB::Cardinality || depth >= TB::ProbeDepth) - && pos.rule50_count() == 0) + && pos.rule50_count() == 0 + && !pos.can_castle(ANY_CASTLING)) { int found, v = Tablebases::probe_wdl(pos, &found);