From: lucasart Date: Sat, 4 Apr 2015 00:00:15 +0000 (+0800) Subject: Prune evasions when we can castle X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=aaf17326e2db5f8bc6664c69e1c3e7fe59cde4ec;hp=2ca142a5b4ca200c56cb99495ec51a804983d07d Prune evasions when we can castle A minor simplification. STC: LLR: 2.95 (-2.94,2.94) [-3.50,0.50] Total: 67877 W: 12882 L: 12904 D: 42091 STC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 20677 W: 4023 L: 3901 D: 12753 LTC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 12221 W: 2022 L: 1888 D: 8311 Bench: 7911336 Resolves #326 --- diff --git a/src/search.cpp b/src/search.cpp index f0c1bdd9..340ddfc1 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1302,8 +1302,7 @@ moves_loop: // When in check and at SpNode search starts from here // Detect non-capture evasions that are candidates to be pruned evasionPrunable = InCheck && bestValue > VALUE_MATED_IN_MAX_PLY - && !pos.capture(move) - && !pos.can_castle(pos.side_to_move()); + && !pos.capture(move); // Don't search moves with negative SEE values if ( (!InCheck || evasionPrunable)