]> git.sesse.net Git - stockfish/commitdiff
Update comments in LMR step
authorStefano80 <stefano.cardanobile@gmail.com>
Wed, 13 Jan 2016 16:02:48 +0000 (16:02 +0000)
committerJoona Kiiski <joona@zoox.com>
Wed, 13 Jan 2016 16:03:53 +0000 (16:03 +0000)
No functional change

Resolves #564

src/search.cpp

index 3e9506d7ef9be8f257bd4a7e245e40bb6f1e60b0..0cee3aa93d382b49d4d5c4566d5fb6980f359514 100644 (file)
@@ -1005,7 +1005,9 @@ moves_loop: // When in check search starts from here
               && cmh[pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO)
               r = std::max(DEPTH_ZERO, r - ONE_PLY);
 
               && cmh[pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO)
               r = std::max(DEPTH_ZERO, r - ONE_PLY);
 
-          // Decrease reduction for moves that escape a capture
+          // Decrease reduction for moves that escape a capture. Filter out castling
+          // moves because are coded as "king captures rook" and break make_move().
+          // Also use see() instead of see_sign() because destination square is empty.
           if (   r
               && type_of(move) == NORMAL
               && type_of(pos.piece_on(to_sq(move))) != PAWN
           if (   r
               && type_of(move) == NORMAL
               && type_of(pos.piece_on(to_sq(move))) != PAWN