Skip to content

Commit 187a9fe

Browse files
committed
Use see() instead of see_sign() in previous patch
Before it was working by accident in case of see_sign() and failing with see() due to how castle moves are coded (king captures the rook). Better to explicitly filter out castling moves and use see() without any surprise/trick. No functional case.
1 parent 6f48367 commit 187a9fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/search.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,9 @@ namespace {
870870

871871
// Decrease reduction for moves that escape a capture
872872
if ( ss->reduction
873+
&& type_of(move) == NORMAL
873874
&& type_of(pos.piece_on(to_sq(move))) != PAWN
874-
&& pos.see_sign(make_move(to_sq(move), from_sq(move))) < 0)
875+
&& pos.see(make_move(to_sq(move), from_sq(move))) < 0)
875876
ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY);
876877

877878
Depth d = std::max(newDepth - ss->reduction, ONE_PLY);

0 commit comments

Comments
 (0)