]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Pawn and Piece Values Tuned at LTC
[stockfish] / src / search.cpp
index c9526ec3c683e38a013089dfcd98bb661f3f2c0e..d0bbc9675c9618ff780cb51b3f89a8eb8abf31f6 100644 (file)
@@ -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 (   pos.can_castle(us)
+          && type_of(movedPiece) == KING
+          && depth < 12 * ONE_PLY)
+          extension = ONE_PLY;
+
       // Calculate new depth for this move
       newDepth = depth - ONE_PLY + extension;