Skip to content

Commit

Permalink
`LMP_BaseMovesToTry + (LMP_MovesDepthMultiplier * depth * (improving …
Browse files Browse the repository at this point in the history
…? 2 : 1))` -> `LMP_BaseMovesToTry + (depth * depth / (improving ? 1 : 2))`
  • Loading branch information
eduherminio committed Jan 8, 2025
1 parent 4083bca commit c2135c3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
5 changes: 1 addition & 4 deletions src/Lynx/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,7 @@ public int Threads
public int LMP_MaxDepth { get; set; } = 8;

[SPSA<int>(0, 10, 0.5)]
public int LMP_BaseMovesToTry { get; set; } = 1;

[SPSA<int>(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;

Expand Down
2 changes: 1 addition & 1 deletion src/Lynx/Search/NegaMax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions src/Lynx/UCIHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,14 +478,6 @@ private void HandleSetOption(ReadOnlySpan<char> 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))
Expand Down

0 comments on commit c2135c3

Please sign in to comment.