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:
1 file changed
+12
-2
+12
-2
@@ -443,6 +443,16 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
|
|||||||
const int staticEval = AdjustEval(board, ctx, rawEval);
|
const int staticEval = AdjustEval(board, ctx, rawEval);
|
||||||
ctx->ss[ply].eval = staticEval;
|
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;
|
bool corrplexity = std::abs(rawEval - staticEval) > 70;
|
||||||
|
|
||||||
const bool improving = [&]
|
const bool improving = [&]
|
||||||
@@ -461,8 +471,8 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
|
|||||||
if (ply) {
|
if (ply) {
|
||||||
// Reverse Futility Pruning
|
// Reverse Futility Pruning
|
||||||
int margin = rfpBase + rfpMargin * (depth - improving);
|
int margin = rfpBase + rfpMargin * (depth - improving);
|
||||||
if (!ttHit && staticEval - margin >= beta && depth < 7) {
|
if (ttAdjustedEval - margin >= beta && depth < 7) {
|
||||||
return (beta + (staticEval - beta) / 3);
|
return (beta + (ttAdjustedEval - beta) / 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Razoring
|
// Razoring
|
||||||
|
|||||||
Reference in new issue
Block a user