tt adjusted rfp | bench 4065988

This commit is contained in:
rektdie committed 2026-02-14 20:31:27 +01:00
1 parent 931b6fa999
commit 2fd3cf0d2a
1 file changed
+12 -2
+12 -2
View File
@@ -443,6 +443,16 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
const int staticEval = AdjustEval(board, ctx, rawEval);
ctx->ss[ply].eval = staticEval;
int ttAdjustedEval = staticEval;
if (!ctx->excluded && !board.InCheck() && entry.bestMove &&
((entry.nodeType == PV) ||
(entry.nodeType == AllNode && entry.score <= staticEval) ||
(entry.nodeType == CutNode && entry.score >= staticEval))) {
ttAdjustedEval = entry.score;
}
bool corrplexity = std::abs(rawEval - staticEval) > 70;
const bool improving = [&]
@@ -461,8 +471,8 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
if (ply) {
// Reverse Futility Pruning
int margin = rfpBase + rfpMargin * (depth - improving);
if (!ttHit && staticEval - margin >= beta && depth < 7) {
return (beta + (staticEval - beta) / 3);
if (!ttHit && ttAdjustedEval - margin >= beta && depth < 7) {
return (beta + (ttAdjustedEval - beta) / 3);
}
// Razoring