From e27d3bb884dc17027010c1ea8f7e7d9efb383d4c Mon Sep 17 00:00:00 2001 From: VoyagerOne Date: Sat, 15 Oct 2016 17:35:10 -0400 Subject: [PATCH] Use explicit logic for pruning Also a speedup since we don't need to recalculate SEE for extensions...as it already determined to be positive. Results for 12 tests for each version: Base Test Diff Mean 2132395 2191002 -58607 StDev 128058 85917 134239 p-value: 0.669 speedup: 0.027 Non functional change. --- src/search.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 112e149d..81b3f29f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -919,7 +919,7 @@ moves_loop: // When in check search starts from here // Step 13. Pruning at shallow depth if ( !rootNode - && bestValue > VALUE_MATED_IN_MAX_PLY) + && bestValue > VALUE_MATED_IN_MAX_PLY) { if ( !captureOrPromotion && !givesCheck @@ -941,6 +941,7 @@ moves_loop: // When in check search starts from here // Futility pruning: parent node if ( lmrDepth < 7 + && !inCheck && ss->staticEval + 256 + 200 * lmrDepth <= alpha) continue; @@ -950,6 +951,7 @@ moves_loop: // When in check search starts from here continue; } else if ( depth < 7 * ONE_PLY + && !extension && !pos.see_ge(move, Value(-35 * depth / ONE_PLY * depth / ONE_PLY))) continue; } -- 2.39.2