From 187a9fe5e7b8349b9eacf23e11cb801a32bb6b12 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 3 Jun 2014 12:38:58 +0200 Subject: [PATCH 1/1] 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. --- src/search.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index cb502f07..9a6bd863 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -870,8 +870,9 @@ moves_loop: // When in check and at SpNode search starts from here // Decrease reduction for moves that escape a capture if ( ss->reduction + && type_of(move) == NORMAL && type_of(pos.piece_on(to_sq(move))) != PAWN - && pos.see_sign(make_move(to_sq(move), from_sq(move))) < 0) + && pos.see(make_move(to_sq(move), from_sq(move))) < 0) ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY); Depth d = std::max(newDepth - ss->reduction, ONE_PLY); -- 2.39.2