Merge pull request #136 from rektdie/tt-adjusted-rfp

Tt adjusted rfp

bench 1774202
This commit was merged in pull request #136.
This commit is contained in:
rektdie authored and GitHub committed 2026-02-15 08:44:14 +01:00
commit fd2168d529
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() && ttHit &&
((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 (ttAdjustedEval - margin >= beta && depth < 7) {
return (beta + (ttAdjustedEval - beta) / 3);
}
// Razoring