From 8c3a5bbc5284897cb944e4bb5748c58813687ba9 Mon Sep 17 00:00:00 2001 From: Joona Kiiski Date: Wed, 20 Jan 2016 15:24:21 +0000 Subject: [PATCH 1/1] Do not probe syzygy bases when castling is possible Almost no functional change. Bench is unchanged. Resolves #230 Resolves #573 --- src/search.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); -- 2.39.2