Merge pull request #54 from rektdie/LMP

Lmp bench 1422551
This commit was merged in pull request #54.
This commit is contained in:
rektdie authored and GitHub committed 2025-04-14 07:35:32 +02:00
commit 4209f2c871
1 file changed
+13
+13
View File
@@ -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 && !board.InCheck() && currMove.IsQuiet() && results.score > (-MATE_SCORE + MAX_PLY)) {
int lmpBase = 7;
int lmpThreshold = lmpBase + 4 * 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