Tt test #87

Merged
rektdie merged 5 commits from tt-test into main 2025-08-06 16:53:28 +02:00
Showing only changes of commit 760894dd1a - Show all commits
+3 -2
View File
@@ -363,11 +363,12 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
if (!ctx->excluded) if (!ctx->excluded)
entry = ctx->TT.GetRawEntry(board.hashKey); entry = ctx->TT.GetRawEntry(board.hashKey);
const bool ttHit = entry != nullptr && entry->score != invalidEntry; const bool ttHit = entry != nullptr
&& entry->hashKey == board.hashKey;
if constexpr (!isPV) { if constexpr (!isPV) {
if (ttHit) { if (ttHit) {
if ((entry->hashKey == board.hashKey && entry->depth >= depth) && if (entry->depth >= depth &&
((entry->nodeType == PV) || ((entry->nodeType == PV) ||
(entry->nodeType == AllNode && entry->score <= alpha) || (entry->nodeType == AllNode && entry->score <= alpha) ||
(entry->nodeType == CutNode && entry->score >= beta))) { (entry->nodeType == CutNode && entry->score >= beta))) {