Skip to content

Commit 5e331f9

Browse files
leachjoinerymcostalba
authored andcommitted
Fix KBPK bug
With position fen 7k/8/8/8/8/7P/6K1/7B w - - 0 1 go depth 25 The evaluation at depth 22 is not draw as it should be. The reason is that when search reaches the position 8/6kP/8/8/8/3B4/6K1/8 w - - 0 1 if white plays h8R or h8N then we get a position that is a "KNOWN_WIN" and is _not_ a check, so futility pruning in qsearch kicks in and black may think that it is "futile" to reply Kxh8 since, according to the logic of the code, it cannot raise the score back towards a draw. bench: 4728533
1 parent b9f5d1c commit 5e331f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/search.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@ namespace {
12301230
&& !givesCheck
12311231
&& move != ttMove
12321232
&& type_of(move) != PROMOTION
1233+
&& futilityBase > -VALUE_KNOWN_WIN
12331234
&& !pos.is_passed_pawn_push(move))
12341235
{
12351236
futilityValue = futilityBase

0 commit comments

Comments
 (0)