From 24351da373790a8c669dfb8b19587dd03b89272f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20C=C3=A1ceres?= Date: Thu, 2 Jan 2025 19:17:38 +0100 Subject: [PATCH] Always save static eval to TT instead of final eval --- src/Lynx/Search/NegaMax.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Lynx/Search/NegaMax.cs b/src/Lynx/Search/NegaMax.cs index fee6ee1f2..06748efa0 100644 --- a/src/Lynx/Search/NegaMax.cs +++ b/src/Lynx/Search/NegaMax.cs @@ -497,7 +497,7 @@ void RevertMove() Debug.Assert(bestMove is null); var finalEval = Position.EvaluateFinalPosition(ply, isInCheck); - _tt.RecordHash(position, finalEval, depth, ply, finalEval, NodeType.Exact); + _tt.RecordHash(position, staticEval, depth, ply, finalEval, NodeType.Exact); return finalEval; } @@ -677,7 +677,7 @@ public int QuiescenceSearch(int ply, int alpha, int beta, CancellationToken canc Debug.Assert(bestMove is null); var finalEval = Position.EvaluateFinalPosition(ply, position.IsInCheck()); - _tt.RecordHash(position, finalEval, 0, ply, finalEval, NodeType.Exact); + _tt.RecordHash(position, staticEval, 0, ply, finalEval, NodeType.Exact); return finalEval; }