From 68377cbf7b24f1b522a3c8edc3e077606042a658 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 28 Jul 2025 23:10:51 +0200 Subject: [PATCH] added cutnode to SE | bench 1894069 --- source/search.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index 3137491..d78ef1c 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -374,13 +374,10 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC if (!ctx->doingNullMove && staticEval >= beta) { 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; - copy.MakeMove(Move()); + const int reduction = 3 + improving; + ctx->doingNullMove = true; int score = -PVS(copy, depth - reduction, -beta, -beta + 1, ply + 1, ctx, !cutnode).score; ctx->doingNullMove = false; @@ -470,6 +467,8 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC if (score < sBeta) extension = 1; + else if (cutnode) + extension = -2; } // PVS SEE