From 50ceac43a7c75917114610d7db837dd6e94a1994 Mon Sep 17 00:00:00 2001 From: rektdie Date: Sun, 4 Oct 2026 14:09:13 +0200 Subject: [PATCH] depth filter in ttHit | bench 1130002 --- source/search.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index 8bac924..bf5e9f6 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -300,7 +300,7 @@ static SearchResults Quiescence(Board& board, int alpha, int beta, int ply, Sear bool ttHit = false; entry = ctx->TT->GetEntry(board.hashKey); - if (entry.hashKey == PackHashKey(board.hashKey)) { + if (entry.hashKey == PackHashKey(board.hashKey) && entry.depth > 0) { ttHit = true; switch (entry.nodeType) { @@ -423,13 +423,12 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC if (!ctx->excluded) entry = ctx->TT->GetEntry(board.hashKey); - const bool ttHit = entry.hashKey == PackHashKey(board.hashKey); + const bool ttHit = entry.hashKey == PackHashKey(board.hashKey) && entry.depth >= depth; const bool ttpv = isPV | entry.ttpv; if constexpr (!isPV) { if (ttHit) { - if (entry.depth >= depth && - ((entry.nodeType == PV) || + if (((entry.nodeType == PV) || (entry.nodeType == AllNode && entry.score <= alpha) || (entry.nodeType == CutNode && entry.score >= beta))) {