Skip to content

Commit

Permalink
Only do TT cutoffs when cutnode or fail-low
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Jan 8, 2025
1 parent 9bda39f commit 8ecc268
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Lynx/Search/NegaMax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,15 @@ private int NegaMax(int depth, int ply, int alpha, int beta, bool cutnode, Cance
// TT cutoffs
if (!pvNode
&& ttScore != EvaluationConstants.NoHashEntry
&& ttDepth >= depth)
&& ttDepth >= depth
&& (ttScore <= alpha || cutnode))
{
if (ttElementType == NodeType.Exact
|| (ttElementType == NodeType.Alpha && ttScore <= alpha)
|| (ttElementType == NodeType.Beta && ttScore >= beta))
{
return ttScore;
}
else if (depth <= 6)
{
++depth;
}
}

// Internal iterative reduction (IIR)
Expand Down

0 comments on commit 8ecc268

Please sign in to comment.