]> git.sesse.net Git - stockfish/commit
Workaround a bug in Position::has_mate_threat()
authorMarco Costalba <mcostalba@gmail.com>
Sun, 30 Aug 2009 18:12:08 +0000 (19:12 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 30 Aug 2009 19:10:09 +0000 (20:10 +0100)
commitaf220cfd52d95e6b05539036ebf9319131dd469d
tree558a8ca02622c96837d4e8ecb364c4392604c7c4
parent1130c8d8153b2132c4352324421f342e9c50b08e
Workaround a bug in Position::has_mate_threat()

It seems that pos.has_mate_threat() changes the position !

So that calling MovePicker c'tor before or after the
has_mate_threat() call changes the things !

Bug was unhidden by previous patch that makes MovePicker c'tor
to generate, score and sort good captures under some circumstances.

Because scoring the captures is position dependent it seems that
the moves returned by MovePicker are different when c'tor is
called before has_mate_threat()

Of course this is only a workaround because the real bug is still
hidden :-(

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp