From 95945633f142b33c2b19f002a8bd9c85b1fc8b72 Mon Sep 17 00:00:00 2001 From: rektdie Date: Sun, 7 Sep 2025 22:30:19 +0200 Subject: [PATCH] reducing more when not improving | bench 6594120 --- source/search.cpp | 7 +++++-- source/tunables.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index cf777ee..505edcc 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -153,7 +153,7 @@ bool IsDraw(Board &board, SearchContext* ctx) { } template -static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int ply, bool cutnode, SearchContext* ctx) { +static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int ply, bool cutnode, bool improving, SearchContext* ctx) { int reduction = 0; // Late Move Reduction @@ -165,6 +165,9 @@ static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int if constexpr (isPV) reduction -= lmrIsPV; + + if (!improving) + reduction += lmrImproving; // History LMR int historyReduction = ctx->history[board.sideToMove][move.MoveFrom()][move.MoveTo()]; @@ -541,7 +544,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC if (ply && depth <= 10 && !SEE(board, currMove, SEEThreshold)) continue; - int reductions = GetReductions(board, currMove, depth, moveSeen, ply, cutnode, ctx); + int reductions = GetReductions(board, currMove, depth, moveSeen, ply, cutnode, improving, ctx); int newDepth = depth + copy.InCheck() - 1 + extension; diff --git a/source/tunables.h b/source/tunables.h index fb5fd4c..439b633 100644 --- a/source/tunables.h +++ b/source/tunables.h @@ -11,6 +11,7 @@ X_INT(lmrCutnode, 2048, 1024, 3072) \ X_INT(lmrIsPV, 1024, 512, 2048) \ X_INT(lmrHistoryDivisor, 8192, 6000, 10000) \ + X_INT(lmrImproving, 1024, 6000, 10000) \ X_INT(rfpMargin, 100, 50, 200) \ X_INT(fpMargin, 100, 50, 200) \ X_INT(doubleExtMargin, 30, 10, 60) \ -- 2.47.3