From 97c9d6fc52a1e630c58ce981d7be2655c29f850e Mon Sep 17 00:00:00 2001 From: Kevin Lu Date: Thu, 30 Apr 2026 18:41:37 -0700 Subject: [PATCH] Only do TT cutoffs if tt eval is below alpha in ALL nodes Bench: 4171649 --- engine/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/search.cpp b/engine/search.cpp index 3bd5f71..cc7649b 100644 --- a/engine/search.cpp +++ b/engine/search.cpp @@ -431,7 +431,7 @@ Value negamax(Position &pos, ThreadInfo &ti, int depth, Value alpha = -VALUE_INF Value tteval = -VALUE_INFINITE; bool ttcapt = false; if (tentry && is_valid_score(tentry->eval)) tteval = tt_to_score(tentry->eval, ply); - if (!pv && tentry && is_valid_score(tteval) && tentry->depth >= depth && ti.line[ply].excl == NullMove) { + if (!pv && tentry && is_valid_score(tteval) && tentry->depth >= depth && !excluded && (tteval <= alpha || cutnode)) { // Check for cutoffs if (tentry->bound() == EXACT) { return tteval;