Razoring #130

Merged
rektdie merged 3 commits from razoring into main 2025-12-04 18:47:41 +01:00
Showing only changes of commit 49994dc480 - Show all commits
+9 -9
View File
@@ -448,6 +448,15 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
return (beta + (staticEval - beta) / 3);
}
// Razoring
if (!isPV && depth <= 3 && staticEval + razoringScalar * depth < alpha) {
int score = Quiescence<mode>(board, alpha, beta, ply, ctx).score;
if (score < alpha) {
return score;
}
}
// Null Move Pruning
if (!ctx->doingNullMove && staticEval >= beta + nmpBetaMargin) {
if (depth > 1 && !board.InPossibleZug()) {
@@ -466,15 +475,6 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
if (score >= beta) return score;
}
}
// Razoring
if (!isPV && depth <= 3 && staticEval + razoringScalar * depth < alpha) {
int score = Quiescence<mode>(board, alpha, beta, ply, ctx).score;
if (score < alpha) {
return score;
}
}
}
}