Qs tt read #39

Merged
rektdie merged 3 commits from qs_tt_read into main 2025-03-29 02:53:38 +01:00
Showing only changes of commit 58a415f9c4 - Show all commits
+3 -8
View File
@@ -137,20 +137,15 @@ static SearchResults Quiescence(Board board, int alpha, int beta, int ply) {
} }
} }
int bestScore = HCE::Evaluate(board);
if constexpr (!isPV) { if constexpr (!isPV) {
TTEntry *entry = TT.GetRawEntry(board.hashKey); TTEntry *entry = TT.GetRawEntry(board.hashKey);
if (entry->hashKey == board.hashKey) { if (entry->hashKey == board.hashKey) {
if (entry->nodeType == PV){ bestScore = entry->score;
return {entry->score, entry->bestMove};
} else if (entry->nodeType == AllNode && entry->score <= alpha) {
return entry->score;
} else if (entry->nodeType == CutNode && entry->score >= beta) {
return entry->score;
}
} }
} }
int bestScore = HCE::Evaluate(board);
if (bestScore >= beta) { if (bestScore >= beta) {
return bestScore; return bestScore;