From c2135c3190ca1684b1f64dbe2dd5a41900a775d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20C=C3=A1ceres?= Date: Wed, 8 Jan 2025 15:10:22 +0100 Subject: [PATCH] `LMP_BaseMovesToTry + (LMP_MovesDepthMultiplier * depth * (improving ? 2 : 1))` -> `LMP_BaseMovesToTry + (depth * depth / (improving ? 1 : 2))` --- src/Lynx/Configuration.cs | 5 +---- src/Lynx/Search/NegaMax.cs | 2 +- src/Lynx/UCIHandler.cs | 8 -------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/Lynx/Configuration.cs b/src/Lynx/Configuration.cs index a4df158a8..8b033e9c0 100644 --- a/src/Lynx/Configuration.cs +++ b/src/Lynx/Configuration.cs @@ -202,10 +202,7 @@ public int Threads public int LMP_MaxDepth { get; set; } = 8; [SPSA(0, 10, 0.5)] - public int LMP_BaseMovesToTry { get; set; } = 1; - - [SPSA(0, 10, 0.5)] - public int LMP_MovesDepthMultiplier { get; set; } = 3; + public int LMP_BaseMovesToTry { get; set; } = 3; public int History_MaxMoveValue { get; set; } = 8_192; diff --git a/src/Lynx/Search/NegaMax.cs b/src/Lynx/Search/NegaMax.cs index 028abb81d..76cc3eb5b 100644 --- a/src/Lynx/Search/NegaMax.cs +++ b/src/Lynx/Search/NegaMax.cs @@ -320,7 +320,7 @@ void RevertMove() // 🔍 Late Move Pruning (LMP) - all quiet moves can be pruned // after searching the first few given by the move ordering algorithm if (depth <= Configuration.EngineSettings.LMP_MaxDepth - && moveIndex >= Configuration.EngineSettings.LMP_BaseMovesToTry + (Configuration.EngineSettings.LMP_MovesDepthMultiplier * depth * (improving ? 2 : 1))) // Based on formula suggested by Antares + && moveIndex >= Configuration.EngineSettings.LMP_BaseMovesToTry + (depth * depth / (improving ? 1 : 2))) // Based on formula suggested by Antares { RevertMove(); break; diff --git a/src/Lynx/UCIHandler.cs b/src/Lynx/UCIHandler.cs index 7d1128b54..fa47d1b72 100644 --- a/src/Lynx/UCIHandler.cs +++ b/src/Lynx/UCIHandler.cs @@ -478,14 +478,6 @@ private void HandleSetOption(ReadOnlySpan command) } break; } - case "lmp_movesdepthmultiplier": - { - if (length > 4 && int.TryParse(command[commandItems[4]], out var value)) - { - Configuration.EngineSettings.LMP_MovesDepthMultiplier = value; - } - break; - } case "history_maxmovevalue": { if (length > 4 && int.TryParse(command[commandItems[4]], out var value))