Prune evasions when we can castle
authorlucasart <lucas.braesch@gmail.com>
Sat, 4 Apr 2015 00:00:15 +0000 (08:00 +0800)
committerJoona Kiiski <joona.kiiski@gmail.com>
Thu, 9 Apr 2015 19:34:06 +0000 (20:34 +0100)
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

src/search.cpp

index f0c1bdd..340ddfc 100644 (file)
@@ -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)