]> git.sesse.net Git - stockfish/commit
Fix an assert in Probcut
authorMarco Costalba <mcostalba@gmail.com>
Sat, 22 Feb 2014 09:34:48 +0000 (10:34 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 22 Feb 2014 09:38:21 +0000 (10:38 +0100)
commit012f20d66ec08db7c4c908b2ae7ca44553616d25
tree9708580c1cb856559c974c0305fad11ba3f933a6
parentb8cfc255d46113573a0869e56224a382c74dfcdc
Fix an assert in Probcut

When running the following position:

8/kPp5/2P3p1/p1P1p1P1/2PpPp2/3p1p2/3P1P2/5K2 w - - 0 1

An assert is raised at depth 92:

assert(-VALUE_INFINITE <= alpha && alpha < beta && beta <= VALUE_INFINITE);

This is because it happens that beta = 29832,
so rbeta = 30032 that is > VALUE_INFINITE

Bug spotted and analyzed by Uri, fix suggested by Joerg.

Other fixes where possible but this one is pointed
exactly at the source of the bug, so it is the best
from a code documentation point of view.

bench: 8430785
src/search.cpp