]> git.sesse.net Git - stockfish/commit
Raise VALUE_INFINITE
authorMarco Costalba <mcostalba@gmail.com>
Sat, 29 Mar 2014 10:12:37 +0000 (11:12 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 29 Mar 2014 10:13:42 +0000 (11:13 +0100)
commit9350d0dce5190fc88b4770ece79299c6d3edd2ed
tree8b5b5da90a8c0727b9091b82ea51c029637e4fb1
parent4833887842f3e43153306799ecc8f8a3d181f3b0
Raise VALUE_INFINITE

In some legal positions like this one:
R6R/3Q4/1Q4Q1/4Q3/2Q4Q/Q4Q2/Np1Q4/kB1N1KB1  b -- 0 1

We can have a very high score, in this case 30177 and 29267
for midgame and endgame respectively, and because
VALUE_INFINITE = 30001 we have an assert in interpolate()

Midgame and endgame scores are stored in 16 bit signed integers
so we can rise VALUE_INFINITE a little bit. This does not fix
the possibility of overflow in general case, just makes the
condition more difficult to trigger and anyhow better uses all
the score width.

Raising VALUE_INFINITE to 32000 seems to fix the problem for this
particular case.

No functional change.
src/types.h