Skip to content

Commit

Permalink
Use visited legal moves instead of move index
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Jan 8, 2025
1 parent 7136587 commit 4bb989d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lynx/Search/NegaMax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,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 (moveIndex >= Configuration.EngineSettings.LMP_BaseMovesToTry + (depth * depth / (improving ? 1 : 2))) // Based on formula suggested by Antares
if (visitedMovesCounter >= Configuration.EngineSettings.LMP_BaseMovesToTry + (depth * depth / (improving ? 1 : 2)))
{
RevertMove();
break;
Expand Down

0 comments on commit 4bb989d

Please sign in to comment.