From 1d774b55d892ecb1c5fcfff4e136bd8584761d62 Mon Sep 17 00:00:00 2001 From: rektdie Date: Wed, 19 Mar 2025 21:38:19 +0100 Subject: [PATCH 1/2] changed LMR conditions | bench 351784 --- source/search.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index 10364b2..581c131 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -96,11 +96,11 @@ static bool IsThreefold(Board &board) { return false; } -static int GetReductions(Board &board, int depth, int moveSeen, int ply) { +static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int ply) { int reduction = 0; // Late Move Reduction - if (depth >= 3 && moveSeen >= 5 + 2 * (ply == 0) && !board.InCheck(board.sideToMove)) { + if (depth >= 3 && moveSeen >= 3 && !move.IsCapture()) { double base = 0.77; double divisor = 2.36; @@ -233,7 +233,7 @@ SearchResults PVS(Board board, int depth, int alpha, int beta, int ply) { Board copy = board; copy.MakeMove(currMove); - int reductions = GetReductions(board, depth, i, ply); + int reductions = GetReductions(board, currMove, depth, i, ply); // First move (suspected PV node) if (!i) { From 1dde3a924aae07a19a03716c468335cc16c54933 Mon Sep 17 00:00:00 2001 From: rektdie Date: Wed, 19 Mar 2025 21:56:44 +0100 Subject: [PATCH 2/2] floor instead of round | bench 345289 --- source/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/search.cpp b/source/search.cpp index 581c131..33f7db9 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -104,7 +104,7 @@ static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int double base = 0.77; double divisor = 2.36; - reduction = std::round(base + std::log(depth) * std::log(moveSeen) / divisor); + reduction = std::floor(base + std::log(depth) * std::log(moveSeen) / divisor); } return reduction;