From 9a3fc4d3fb81e5f517ecde5dad8aabf55fb2bd22 Mon Sep 17 00:00:00 2001 From: Joona Kiiski Date: Tue, 13 Apr 2010 18:25:50 +0300 Subject: [PATCH] Fix evasion pruning condition Avoid incorrect mate scores in positions like BK5/1R4b1/2k1Np2/3p3b/2p3pq/p1rB4/n2n1p2/8 w - - Thanks for Jouni Uski for reporting the problem Signed-off-by: Marco Costalba --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index efdb287f..fff523c3 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1713,7 +1713,7 @@ namespace { // Detect blocking evasions that are candidate to be pruned evasionPrunable = isCheck - && bestValue != -VALUE_INFINITE + && bestValue > value_mated_in(PLY_MAX) && !pos.move_is_capture(move) && pos.type_of_piece_on(move_from(move)) != KING && !pos.can_castle(pos.side_to_move()); -- 2.39.2