moved razoring above nmp | bench 4070172

This commit is contained in:
rektdie committed 2025-12-04 01:48:05 +01:00
1 parent 6c8869040f
commit 49994dc480
1 file changed
+9 -9
+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); 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 // Null Move Pruning
if (!ctx->doingNullMove && staticEval >= beta + nmpBetaMargin) { if (!ctx->doingNullMove && staticEval >= beta + nmpBetaMargin) {
if (depth > 1 && !board.InPossibleZug()) { 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; 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;
}
}
} }
} }