]> git.sesse.net Git - stockfish/commit
Relax constrain in prevents_threat()
authorMarco Costalba <mcostalba@gmail.com>
Sat, 3 Nov 2012 14:48:34 +0000 (15:48 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 3 Nov 2012 14:57:20 +0000 (15:57 +0100)
commitdd5b3086f5f10819c527aa6276ca7a0c54e47900
treefe72280dc22f118baa1c3a731952ffb06cb8c758
parent47f988f05fb86b0cd9187885b1cfa942addbeee6
Relax constrain in prevents_threat()

When testing if a move blocks the threat path there is no
reason to require the threat to be a slider. Indeed threat
can be a double pawn push like in this example:

r1bq1rk1/ppp1np1p/4n1p1/3p4/3P2Q1/2P1B3/PPBN2PP/R4RK1 w - - 0 16

Where white's move Rf6 blocks the threat f5.

As a nice side effect we can retire the now useless helper
piece_is_slider().

This patch kicks in only very rare cases, indeed the bench is
still the same!

bench: 5809010
src/search.cpp