]> git.sesse.net Git - stockfish/commit
Fully correct stealmate detection
authorMarco Costalba <mcostalba@gmail.com>
Sat, 3 May 2014 10:09:56 +0000 (12:09 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 3 May 2014 10:12:22 +0000 (12:12 +0200)
commita9e93fa6a56d985e98f16a480a8b0d166fdea324
treec2731ac89cc907fd70fcf3298749375b073bbdd5
parent9e8bf82350002b826e40581100dbbcd1d65c796e
Fully correct stealmate detection

In the (rare) cases when the two conditions
are true, then fully check again with a slow
but correct MoveList<LEGAL>(pos).size().

This is able to detect false positives like
this one:

8/8/8/Q7/5k1p/5P2/4KP2/8 b - - 0 17

When we have a possible simple pawn push that
is not stored in attacks[] array. Because the
third condition triggers very rarely, even if
it is slow, it does not alters in a measurable
way the average speed of the engine.

bench: 8678654
src/evaluate.cpp