mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
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 <mcostalba@gmail.com>
This commit is contained in:
parent
a4a0ffce71
commit
9a3fc4d3fb
1 changed files with 1 additions and 1 deletions
|
@ -1713,7 +1713,7 @@ namespace {
|
||||||
|
|
||||||
// Detect blocking evasions that are candidate to be pruned
|
// Detect blocking evasions that are candidate to be pruned
|
||||||
evasionPrunable = isCheck
|
evasionPrunable = isCheck
|
||||||
&& bestValue != -VALUE_INFINITE
|
&& bestValue > value_mated_in(PLY_MAX)
|
||||||
&& !pos.move_is_capture(move)
|
&& !pos.move_is_capture(move)
|
||||||
&& pos.type_of_piece_on(move_from(move)) != KING
|
&& pos.type_of_piece_on(move_from(move)) != KING
|
||||||
&& !pos.can_castle(pos.side_to_move());
|
&& !pos.can_castle(pos.side_to_move());
|
||||||
|
|
Loading…
Add table
Reference in a new issue