From 31149c7450af3105cc1fde52a33c2798f03a564a Mon Sep 17 00:00:00 2001 From: rektdie Date: Wed, 23 Jul 2025 07:42:21 +0200 Subject: [PATCH] added including to nmp + lowered condition depth by one | bench 2172902 --- source/search.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index cc49c88..642c868 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -367,13 +367,15 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC // Null Move Pruning if (!ctx->doingNullMove && staticEval >= beta) { - if (depth >= 3 && !board.InPossibleZug()) { + if (depth > 1 && !board.InPossibleZug()) { Board copy = board; bool isLegal = copy.MakeMove(Move()); // Always legal so we dont check it + + const int reduction = 3 + improving; ctx->doingNullMove = true; - int score = -PVS(copy, depth - 3, -beta, -beta + 1, ply + 1, ctx, !cutnode).score; + int score = -PVS(copy, depth - reduction, -beta, -beta + 1, ply + 1, ctx, !cutnode).score; ctx->doingNullMove = false; if (ctx->searchStopped) return 0; -- 2.47.3