when moveseen = 0, returning alpha in case of excluded move | bench 1293332

This commit is contained in:
rektdie committed 2026-10-01 22:47:27 +02:00
1 parent e64c6c60b9
commit f77c4c1fbd
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 (moveSeen == 0) {
if (inCheck) { // checkmate if (ctx->excluded) return alpha;
return -MATE_SCORE + ply; return inCheck ? -MATE_SCORE + ply : 0;
} else { // stalemate
return 0;
}
} }
if (searchStopped.load(std::memory_order_relaxed)) return 0; if (searchStopped.load(std::memory_order_relaxed)) return 0;