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:
1 file changed
+2
-5
+2
-5
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user