Merge pull request #81 from rektdie/lmr-move-number

changed lmr condition | bench 2450653
This commit was merged in pull request #81.
This commit is contained in:
rektdie authored and GitHub committed 2025-07-22 07:36:38 +02:00
commit 7dbde30f08
1 file changed
+3 -2
+3 -2
View File
@@ -125,11 +125,12 @@ bool IsDraw(Board &board, SearchContext* ctx) {
return IsFifty(board) || IsInsuffMat(board) || IsThreefold(board, ctx);
}
template <bool isPV>
static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int ply, bool cutnode, SearchContext* ctx) {
int reduction = 0;
// Late Move Reduction
if (depth >= 3 && moveSeen >= 3 && !move.IsCapture()) {
if (depth >= 3 && moveSeen >= 2 + (2 * isPV) && !move.IsCapture()) {
reduction = lmrTable[depth][moveSeen];
if (cutnode)
@@ -446,7 +447,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<isPV>(board, currMove, depth, moveSeen, ply, cutnode, ctx);
int newDepth = depth + copy.InCheck() - 1;