From c6f2c3cacbfee3405819f4af3207a4cd6d8fdde6 Mon Sep 17 00:00:00 2001 From: rektdie Date: Wed, 29 Oct 2025 00:05:08 +0100 Subject: [PATCH 1/2] added lmrdepth to fp | bench 5012961 --- source/search.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/search.cpp b/source/search.cpp index 5aa592c..fb56d05 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -542,6 +542,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC continue; bool notMated = results.score > (-MATE_SCORE + MAX_PLY); + int lmrDepth = depth - lmrTable[currMove.IsQuiet()][depth][moveSeen]; // Late move pruning // If we are near a leaf node we prune moves @@ -573,7 +574,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC int margin = fpMargin * (depth + improving) + historyScore / 32; if (!isPV && ply && currMove.IsQuiet() - && depth <= 5 && staticEval + margin < alpha && notMated) { + && lmrDepth <= 5 && staticEval + margin < alpha && notMated) { continue; } From 6ed9e6f0c8ab53f643bfc28aca857dd44c53e7c2 Mon Sep 17 00:00:00 2001 From: rektdie Date: Wed, 29 Oct 2025 02:35:52 +0100 Subject: [PATCH 2/2] forgot to change depth multiplier | bench 4230568 --- source/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/search.cpp b/source/search.cpp index fb56d05..006fd91 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -571,7 +571,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC historyScore += ctx->conthist.GetNPly(board, currMove, ctx, ply, 2); } - int margin = fpMargin * (depth + improving) + historyScore / 32; + int margin = fpMargin * (lmrDepth + improving) + historyScore / 32; if (!isPV && ply && currMove.IsQuiet() && lmrDepth <= 5 && staticEval + margin < alpha && notMated) {