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;