From: Marco Costalba Date: Sat, 3 Nov 2012 12:25:23 +0000 (+0100) Subject: Relax constrain in connected_moves() X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=972de506a03aeda06bab8b19771c71d37af99eb6 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 --- diff --git a/src/search.cpp b/src/search.cpp index 978a5993..afdd2049 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1378,7 +1378,7 @@ split_point_start: // At split points actual search starts from here return true; // Moving through the vacated square - if (piece_is_slider(pos.piece_on(f2)) && (between_bb(f2, t2) & f1)) + if (between_bb(f2, t2) & f1) return true; // The destination square for m2 is defended by the moving piece in m1