From 2eb8c30e54e63de76e88f38a6132107bc4a347a1 Mon Sep 17 00:00:00 2001 From: rektdie Date: Sun, 13 Apr 2025 21:17:50 +0200 Subject: [PATCH 1/6] added simple LMP | bench 1150841 --- source/search.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/search.cpp b/source/search.cpp index 5b6f8f3..296d31b 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -273,6 +273,19 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC for (int i = 0; i < board.currentMoveIndex; i++) { Move currMove = board.moveList[i]; + // Late move pruning + // If we are near a leaf node we prune moves + // that are late in the list + if (!isPV && ply && currMove.IsQuiet() && results.score > (-MATE_SCORE + MAX_PLY)) { + int lmpBase = 3; + + int lmpThreshold = lmpBase + depth * depth; + + if (moveSeen >= lmpThreshold) { + continue; + } + } + // Futility pruning // If our static eval is far below alpha, there is only a small chance // that a quiet move will help us so we skip them -- 2.47.3 From 1239a77f9520ae63744a7e39c60a87400a3de7d9 Mon Sep 17 00:00:00 2001 From: rektdie Date: Sun, 13 Apr 2025 21:31:49 +0200 Subject: [PATCH 2/6] more conservative LMP | bench 1234590 --- source/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/search.cpp b/source/search.cpp index 296d31b..90812fb 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -276,7 +276,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC // Late move pruning // If we are near a leaf node we prune moves // that are late in the list - if (!isPV && ply && currMove.IsQuiet() && results.score > (-MATE_SCORE + MAX_PLY)) { + if (!isPV && !board.InCheck() && currMove.IsQuiet() && results.score > (-MATE_SCORE + MAX_PLY)) { int lmpBase = 3; int lmpThreshold = lmpBase + depth * depth; -- 2.47.3 From 7a521d79326e9afb392f4ec391d68c131db7ba99 Mon Sep 17 00:00:00 2001 From: rektdie Date: Sun, 13 Apr 2025 21:40:50 +0200 Subject: [PATCH 3/6] changed LMP formula | bench 1108042 --- source/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/search.cpp b/source/search.cpp index 90812fb..9aadc7b 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -279,7 +279,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC if (!isPV && !board.InCheck() && currMove.IsQuiet() && results.score > (-MATE_SCORE + MAX_PLY)) { int lmpBase = 3; - int lmpThreshold = lmpBase + depth * depth; + int lmpThreshold = lmpBase + 4 * depth; if (moveSeen >= lmpThreshold) { continue; -- 2.47.3 From 7aec4b6f9f431deca2199268c6f2658efb4450dd Mon Sep 17 00:00:00 2001 From: rektdie Date: Sun, 13 Apr 2025 21:56:39 +0200 Subject: [PATCH 4/6] increased lmp base | bench 1211640 --- source/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/search.cpp b/source/search.cpp index 9aadc7b..bec63bb 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -277,7 +277,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC // If we are near a leaf node we prune moves // that are late in the list if (!isPV && !board.InCheck() && currMove.IsQuiet() && results.score > (-MATE_SCORE + MAX_PLY)) { - int lmpBase = 3; + int lmpBase = 6; int lmpThreshold = lmpBase + 4 * depth; -- 2.47.3 From ea8c2959c2cbf8bd91ef2c40cee090d2b5f8f2ad Mon Sep 17 00:00:00 2001 From: rektdie Date: Sun, 13 Apr 2025 22:42:07 +0200 Subject: [PATCH 5/6] changed lmp base to 4 | bench 1139199 --- source/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/search.cpp b/source/search.cpp index bec63bb..f36c593 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -277,7 +277,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC // If we are near a leaf node we prune moves // that are late in the list if (!isPV && !board.InCheck() && currMove.IsQuiet() && results.score > (-MATE_SCORE + MAX_PLY)) { - int lmpBase = 6; + int lmpBase = 4; int lmpThreshold = lmpBase + 4 * depth; -- 2.47.3 From 675034b5765ef3129d38f5d0d7e38c6c631c9041 Mon Sep 17 00:00:00 2001 From: rektdie Date: Sun, 13 Apr 2025 22:49:36 +0200 Subject: [PATCH 6/6] lmp base 7 | bench 1422551 --- source/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/search.cpp b/source/search.cpp index f36c593..6e3e9a0 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -277,7 +277,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC // If we are near a leaf node we prune moves // that are late in the list if (!isPV && !board.InCheck() && currMove.IsQuiet() && results.score > (-MATE_SCORE + MAX_PLY)) { - int lmpBase = 4; + int lmpBase = 7; int lmpThreshold = lmpBase + 4 * depth; -- 2.47.3