Skip to content

Commit

Permalink
πŸ” Don't clear TT move if no best move is provided: keep old one II (#478
Browse files Browse the repository at this point in the history
)
  • Loading branch information
eduherminio authored Oct 30, 2023
1 parent 7bf6bc0 commit de685fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Lynx/Model/TranspositionTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public static (int Evaluation, Move BestMove) ProbeHash(this TranspositionTable
/// <param name="nodeType"></param>
/// <param name="move"></param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void RecordHash(this TranspositionTable tt, int ttMask, Position position, int depth, int ply, int eval, NodeType nodeType, Move? move = 0)
public static void RecordHash(this TranspositionTable tt, int ttMask, Position position, int depth, int ply, int eval, NodeType nodeType, Move? move = null)
{
if (!Configuration.EngineSettings.TranspositionTableEnabled)
{
Expand All @@ -172,8 +172,8 @@ public static void RecordHash(this TranspositionTable tt, int ttMask, Position p
entry.Key = position.UniqueIdentifier;
entry.Score = score;
entry.Depth = depth;
entry.Move = move ?? entry.Move; // Suggested by cj5716 instead of 0. https://github.com/lynx-chess/Lynx/pull/462
entry.Type = nodeType;
entry.Move = move ?? entry.Move; // Suggested by cj5716 instead of 0. https://github.com/lynx-chess/Lynx/pull/462
}

/// <summary>
Expand Down

0 comments on commit de685fe

Please sign in to comment.