]> git.sesse.net Git - stockfish/commit
Another see() shortcut
authorMarco Costalba <mcostalba@gmail.com>
Sat, 31 Oct 2009 10:16:40 +0000 (11:16 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 1 Nov 2009 20:06:26 +0000 (21:06 +0100)
commitdddaeff7d8d4a0c255310d054a53066296e71004
treee4b060f16408972215d631a8dffddf9beab8ebbd
parent941d923bf81128e5420ffe3dcf0116bf7758f430
Another see() shortcut

Because we only generate legal moves we can assume
a king cannot be recaptured, so we can safely return
immediately with the captured piece score. If the move
turns out to be illegal it will be pruned anyhow,
independently from SEE value. This gives a good speed up
especially now that we SEE-test all the evasions that
are always legal and very often are king moves.

Another optimization catches almost 15% of cases, unfortunatly
we have already calculated the very expensive attacks, so
benefits are not so big anyway.

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