Merge pull request #190 from rektdie/excluded-terminal-decision

when moveseen = 0, returning alpha in case of excluded move | bench 1293332
This commit was merged in pull request #190.
This commit is contained in:
rektdie authored and GitHub committed 2026-10-03 09:19:53 +02:00
commit 2c4292c485
1 file changed
+2 -5
+2 -5
View File
@@ -798,11 +798,8 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
}
if (moveSeen == 0) {
if (inCheck) { // checkmate
return -MATE_SCORE + ply;
} else { // stalemate
return 0;
}
if (ctx->excluded) return alpha;
return inCheck ? -MATE_SCORE + ply : 0;
}
if (searchStopped.load(std::memory_order_relaxed)) return 0;