X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=e113068c408561c402f47513e685bb1b874b25a4;hb=4111f36f45fbb5da68142a0be1b4d033d50e7d93;hp=c9526ec3c683e38a013089dfcd98bb661f3f2c0e;hpb=3f1eb85a1ceb1b408f8f51cb82064b69e095399d;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index c9526ec3..e113068c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -187,6 +187,7 @@ void Search::clear() { Time.availableNodes = 0; TT.clear(); Threads.clear(); + Tablebases::init(Options["SyzygyPath"]); // Free up mapped files } @@ -943,6 +944,10 @@ moves_loop: // When in check, search starts from here && pos.see_ge(move)) extension = ONE_PLY; + else if ( pos.can_castle(us) // Extension for king moves that change castling rights + && type_of(movedPiece) == KING) + extension = ONE_PLY; + // Calculate new depth for this move newDepth = depth - ONE_PLY + extension;