Skip to content

Commit 93f95cc

Browse files
uriblassmcostalba
authored andcommitted
Reduce VALUE_KNOWN_WIN to 10000
With some positions like 8/8/8/2p2K2/1pp5/br1p1b2/2p2r2/qqkqq3 w - - The eval score is higher than VALUE_INFINITE because is the sum of VALUE_KNOWN_WIN plus a big material advantage. This leads to an assert. Here are the steps to reproduce: Compile SF with debug=yes then do ./stockfish position fen 8/8/8/2p2K2/1pp5/br1p1b2/2p2r2/qqkqq3 w - - go depth 1 This patch fixes the issue in this case, but do exsist other positions for which the patch is not enough and we will need to limit the eval score to be sure not overflow the limit. Note that is not possible to increase the value of VALUE_INFINITE because should remain within int16_t type to be stored in a TT entry. bench: 7356053
1 parent f434cea commit 93f95cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ enum Bound {
155155
enum Value {
156156
VALUE_ZERO = 0,
157157
VALUE_DRAW = 0,
158-
VALUE_KNOWN_WIN = 15000,
158+
VALUE_KNOWN_WIN = 10000,
159159
VALUE_MATE = 30000,
160160
VALUE_INFINITE = 30001,
161161
VALUE_NONE = 30002,

0 commit comments

Comments
 (0)