From 6c8869040f6d6fe6c6ae1d798ca3d922c53b66a4 Mon Sep 17 00:00:00 2001 From: rektdie Date: Tue, 4 Nov 2025 21:27:23 +0100 Subject: [PATCH 1/3] razoring | bench 4070172 --- source/search.cpp | 9 +++++++++ source/tunables.h | 1 + 2 files changed, 10 insertions(+) diff --git a/source/search.cpp b/source/search.cpp index 20949d0..abb227a 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -466,6 +466,15 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC if (score >= beta) return score; } } + + // Razoring + if (!isPV && depth <= 3 && staticEval + razoringScalar * depth < alpha) { + int score = Quiescence(board, alpha, beta, ply, ctx).score; + + if (score < alpha) { + return score; + } + } } } diff --git a/source/tunables.h b/source/tunables.h index 16c5dc1..4af6b4d 100644 --- a/source/tunables.h +++ b/source/tunables.h @@ -18,6 +18,7 @@ X_INT(rfpBase, 25, 50, 200) \ X_INT(rfpMargin, 100, 50, 200) \ X_INT(fpMargin, 100, 50, 200) \ + X_INT(razoringScalar, 200, 50, 200) \ X_INT(doubleExtMargin, 30, 10, 60) \ X_INT(seeQuietThreshold, -80, -150, -20) \ X_INT(seeNoisyThreshold, -30, -80, 20) \ -- 2.47.3 From 49994dc4809e19c076d609e368faf31d9d4adf82 Mon Sep 17 00:00:00 2001 From: rektdie Date: Wed, 5 Nov 2025 16:44:54 +0100 Subject: [PATCH 2/3] moved razoring above nmp | bench 4070172 --- source/search.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index abb227a..d7c0359 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -448,6 +448,15 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC return (beta + (staticEval - beta) / 3); } + // Razoring + if (!isPV && depth <= 3 && staticEval + razoringScalar * depth < alpha) { + int score = Quiescence(board, alpha, beta, ply, ctx).score; + + if (score < alpha) { + return score; + } + } + // Null Move Pruning if (!ctx->doingNullMove && staticEval >= beta + nmpBetaMargin) { 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; } } - - // Razoring - if (!isPV && depth <= 3 && staticEval + razoringScalar * depth < alpha) { - int score = Quiescence(board, alpha, beta, ply, ctx).score; - - if (score < alpha) { - return score; - } - } } } -- 2.47.3 From cdedcbb5f59c8cb8a9a0f1412e097210f2389bea Mon Sep 17 00:00:00 2001 From: rektdie Date: Sun, 9 Nov 2025 06:43:27 +0100 Subject: [PATCH 3/3] no score check in razoring | bench 3942380 --- source/search.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index d7c0359..69e2924 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -450,11 +450,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC // Razoring if (!isPV && depth <= 3 && staticEval + razoringScalar * depth < alpha) { - int score = Quiescence(board, alpha, beta, ply, ctx).score; - - if (score < alpha) { - return score; - } + return Quiescence(board, alpha, beta, ply, ctx).score; } // Null Move Pruning -- 2.47.3