reducing more when not improving | bench 6594120 #99

Merged
rektdie merged 1 commits from lmr-improving-more into main 2025-09-08 00:17:10 +02:00
2 changed files with 6 additions and 2 deletions

No files matched your search

+5 -2
View File
@@ -153,7 +153,7 @@ bool IsDraw(Board &board, SearchContext* ctx) {
}
template <bool isPV>
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<isPV>(board, currMove, depth, moveSeen, ply, cutnode, ctx);
int reductions = GetReductions<isPV>(board, currMove, depth, moveSeen, ply, cutnode, improving, ctx);
int newDepth = depth + copy.InCheck() - 1 + extension;
+1
View File
@@ -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) \