Skip to content

Commit

Permalink
πŸ› Avoid storing the same move duplicated in both killer moves (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Oct 24, 2023
1 parent 5ef074f commit 09a9a89
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 @@ -254,7 +254,7 @@ private int NegaMax(int depth, int ply, int alpha, int beta, bool isVerifyingNul
PrintMessage($"Pruning: {move} is enough");

// πŸ” Killer moves
if (!move.IsCapture() && move.PromotedPiece() == default)
if (!move.IsCapture() && move.PromotedPiece() == default && move != _killerMoves[0, ply])
{
_killerMoves[1, ply] = _killerMoves[0, ply];
_killerMoves[0, ply] = move;
Expand Down

0 comments on commit 09a9a89

Please sign in to comment.