From 82a4fcdeaf08c3005a231737c1fcdceaea51bc1c Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 21 Jul 2025 19:08:51 +0200 Subject: [PATCH] changed lmr condition | bench 2450653 --- source/search.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index 74c4448..cc49c88 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -125,11 +125,12 @@ bool IsDraw(Board &board, SearchContext* ctx) { return IsFifty(board) || IsInsuffMat(board) || IsThreefold(board, ctx); } +template 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(board, currMove, depth, moveSeen, ply, cutnode, ctx); int newDepth = depth + copy.InCheck() - 1; -- 2.47.3