Skip to content

Commit

Permalink
Do not probe syzygy bases when castling is possible
Browse files Browse the repository at this point in the history
Almost no functional change. Bench is unchanged.

Resolves #230
Resolves #573
  • Loading branch information
Joona Kiiski authored and zamar committed Jan 20, 2016
1 parent 28933a5 commit 8c3a5bb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/search.cpp
Expand Up @@ -256,8 +256,9 @@ void MainThread::search() {
}
else
{
if (TB::Cardinality >= rootPos.count<ALL_PIECES>(WHITE)
+ rootPos.count<ALL_PIECES>(BLACK))
if ( TB::Cardinality >= rootPos.count<ALL_PIECES>(WHITE)
+ rootPos.count<ALL_PIECES>(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.
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 8c3a5bb

Please sign in to comment.