]> git.sesse.net Git - stockfish/commit
Relax constrain in connected_moves()
authorMarco Costalba <mcostalba@gmail.com>
Sat, 3 Nov 2012 12:25:23 +0000 (13:25 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 3 Nov 2012 12:34:04 +0000 (13:34 +0100)
commit972de506a03aeda06bab8b19771c71d37af99eb6
tree40974187dd44c03b902ecf5e3dbf66d14d956389
parented1574e46ca7ed9a9ce6286ab38fff6a8ff09b28
Relax constrain in connected_moves()

When testing if a piece is moving through the squares
vacated by a previous move there is no reason to require
the piece to be a slider, indeed we can have a double
pawn push like in this example:

r1q2rk1/2p1bppp/2Pp4/pN5b/Q1P1p3/4B2P/PP1R1PP1/1K5R w - - 3 18

Where black's move f5 is connected to previous move Be7 that
frees the path.

Or we can have a castle move:

r1bqkb1r/pppp1ppp/2n1pn2/1B6/4P3/2N2N2/PPPP1PPP/R1BQK2R b KQkq - 5 1

Where a previous move Bb5 allows the white to castle king side.

This time patch is mine ;-)

new bench: 5809010
src/search.cpp