From 1f24a43819a2bbce8d137e445f5a5ba762a71dc8 Mon Sep 17 00:00:00 2001 From: rektdie Date: Sat, 31 May 2025 23:42:16 +0200 Subject: [PATCH] added PVS SEE pruning | bench 3721183 --- source/search.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/search.cpp b/source/search.cpp index c57b81b..08b1bbc 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -405,6 +405,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC continue; } + Board copy = board; bool isLegal = copy.MakeMove(currMove); @@ -415,6 +416,13 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC ctx.positionHistory[copy.positionIndex] = copy.hashKey; ctx.nodes++; + // PVS SEE + int SEEThreshold = currMove.IsQuiet() ? -80 * depth : -30 * depth * depth; + + if (ply && depth <= 10 && !SEE(board, currMove, SEEThreshold)) + continue; + + int reductions = GetReductions(board, currMove, depth, moveSeen, ply, cutnode, ctx); int newDepth = depth + copy.InCheck() - 1; -- 2.47.3