1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

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 <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2010-01-19 15:24:26 +01:00
parent 285df57a9a
commit 01ebb3d996

View file

@ -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;