X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=8a32e827488739ea351a4ee77d0532138b578ffa;hp=c9526ec3c683e38a013089dfcd98bb661f3f2c0e;hb=9315ba60e68198452940a57292f27e37bc3b6ed2;hpb=3f1eb85a1ceb1b408f8f51cb82064b69e095399d diff --git a/src/search.cpp b/src/search.cpp index c9526ec3..8a32e827 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -943,6 +943,12 @@ moves_loop: // When in check, search starts from here && pos.see_ge(move)) extension = ONE_PLY; + // Extension for king moves that change castling rights + if ( type_of(movedPiece) == KING + && pos.can_castle(us) + && depth < 12 * ONE_PLY) + extension = ONE_PLY; + // Calculate new depth for this move newDepth = depth - ONE_PLY + extension;