From 83a574ff271ec5924976b48cf65ac62278f87558 Mon Sep 17 00:00:00 2001 From: Reuven Peleg Date: Tue, 3 Jun 2014 11:32:45 +0200 Subject: [PATCH] Decrease reduction for moves that escape a capture Passed both STC LLR: 2.96 (-2.94,2.94) [-1.50,4.50] Total: 10094 W: 1833 L: 1704 D: 6557 and LTC LLR: 2.95 (-2.94,2.94) [0.00,6.00] Total: 27738 W: 4147 L: 3928 D: 19663 bench : 8599236 --- src/search.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/search.cpp b/src/search.cpp index 99b89459..85d702c4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -868,6 +868,12 @@ moves_loop: // When in check and at SpNode search starts from here if (move == countermoves[0] || move == countermoves[1]) ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY); + // Decrease reduction for moves that escape a capture + if ( ss->reduction + && type_of(pos.piece_on(to_sq(move))) != PAWN + && pos.see_sign(make_move(to_sq(move), from_sq(move))) < 0) + ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY); + Depth d = std::max(newDepth - ss->reduction, ONE_PLY); if (SpNode) alpha = splitPoint->alpha; -- 2.39.2