From: Marco Costalba Date: Tue, 19 Jan 2010 14:24:26 +0000 (+0100) Subject: If near beta generate checks at -OnePly X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=01ebb3d99688cf4ac3d3b9b4ea95e8b431d0b8c1 If near beta generate checks at -OnePly In qsearch() try to get a cutoff with the help of an extra check if we are already very near. Small increase in actual games but a good result in tactical test sets where this patch makes SF more tactical. Mod vs Orig +197 =620 -181 +6 ELO Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index c63d2ec6..0c6cf8be 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1687,10 +1687,14 @@ namespace { if (bestValue > alpha) alpha = bestValue; + // If we are near beta then try to get a cutoff pushing checks a bit further + bool deepChecks = depth == -OnePly && staticValue >= beta - PawnValueMidgame / 8; + // Initialize a MovePicker object for the current position, and prepare - // to search the moves. Because the depth is <= 0 here, only captures, - // queen promotions and checks (only if depth == 0) will be generated. - MovePicker mp = MovePicker(pos, ttMove, depth, H); + // to search the moves. Because the depth is <= 0 here, only captures, + // queen promotions and checks (only if depth == 0 or depth == -OnePly + // and we are near beta) will be generated. + MovePicker mp = MovePicker(pos, ttMove, deepChecks ? Depth(0) : depth, H); CheckInfo ci(pos); enoughMaterial = pos.non_pawn_material(pos.side_to_move()) > RookValueMidgame; futilityBase = staticValue + FutilityMarginQS + ei.futilityMargin;