added including to nmp + lowered condition depth by one | bench 2172902

This commit is contained in:
rektdie committed 2025-07-23 07:42:21 +02:00
1 parent 7dbde30f08
commit 31149c7450
1 file changed
+4 -2
+4 -2
View File
@@ -367,13 +367,15 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
// Null Move Pruning // Null Move Pruning
if (!ctx->doingNullMove && staticEval >= beta) { if (!ctx->doingNullMove && staticEval >= beta) {
if (depth >= 3 && !board.InPossibleZug()) { if (depth > 1 && !board.InPossibleZug()) {
Board copy = board; Board copy = board;
bool isLegal = copy.MakeMove(Move()); bool isLegal = copy.MakeMove(Move());
// Always legal so we dont check it // Always legal so we dont check it
const int reduction = 3 + improving;
ctx->doingNullMove = true; ctx->doingNullMove = true;
int score = -PVS<false, mode>(copy, depth - 3, -beta, -beta + 1, ply + 1, ctx, !cutnode).score; int score = -PVS<false, mode>(copy, depth - reduction, -beta, -beta + 1, ply + 1, ctx, !cutnode).score;
ctx->doingNullMove = false; ctx->doingNullMove = false;
if (ctx->searchStopped) return 0; if (ctx->searchStopped) return 0;