Merge pull request #126 from rektdie/corrplexity-lmr
added corrplexity to lmr | bench 4317404
This commit was merged in pull request #126.
This commit is contained in:
2 files changed
+10
-3
No files matched your search
+9
-3
@@ -153,7 +153,7 @@ bool IsDraw(Board &board, SearchContext* ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <bool isPV>
|
template <bool isPV>
|
||||||
static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int ply, bool cutnode, bool improving, SearchContext* ctx) {
|
static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int ply, bool cutnode, bool improving, bool corrplexity, SearchContext* ctx) {
|
||||||
int reduction = 0;
|
int reduction = 0;
|
||||||
|
|
||||||
// Late Move Reduction
|
// Late Move Reduction
|
||||||
@@ -169,6 +169,9 @@ static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int
|
|||||||
if (!improving)
|
if (!improving)
|
||||||
reduction += lmrImproving;
|
reduction += lmrImproving;
|
||||||
|
|
||||||
|
if (corrplexity)
|
||||||
|
reduction -= lmrCorrplexity;
|
||||||
|
|
||||||
if (move.IsQuiet()) {
|
if (move.IsQuiet()) {
|
||||||
// History LMR
|
// History LMR
|
||||||
|
|
||||||
@@ -427,9 +430,12 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
|
|||||||
|
|
||||||
if (depth <= 0) return Quiescence<mode>(board, alpha, beta, ply, ctx);
|
if (depth <= 0) return Quiescence<mode>(board, alpha, beta, ply, ctx);
|
||||||
|
|
||||||
const int staticEval = AdjustEval(board, ctx, NNUE::net.Evaluate(board));
|
int rawEval = NNUE::net.Evaluate(board);
|
||||||
|
const int staticEval = AdjustEval(board, ctx, rawEval);
|
||||||
ctx->ss[ply].eval = staticEval;
|
ctx->ss[ply].eval = staticEval;
|
||||||
|
|
||||||
|
bool corrplexity = std::abs(rawEval - staticEval) > 70;
|
||||||
|
|
||||||
const bool improving = [&]
|
const bool improving = [&]
|
||||||
{
|
{
|
||||||
if (board.InCheck())
|
if (board.InCheck())
|
||||||
@@ -643,7 +649,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
|
|||||||
if (ply && depth <= 10 && !SEE(board, currMove, SEEThreshold))
|
if (ply && depth <= 10 && !SEE(board, currMove, SEEThreshold))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int reductions = GetReductions<isPV>(board, currMove, depth, moveSeen, ply, cutnode, improving, ctx);
|
int reductions = GetReductions<isPV>(board, currMove, depth, moveSeen, ply, cutnode, improving, corrplexity, ctx);
|
||||||
|
|
||||||
int newDepth = depth + copy.InCheck() - 1 + extension;
|
int newDepth = depth + copy.InCheck() - 1 + extension;
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
X_INT(lmrIsPV, 1024, 512, 2048) \
|
X_INT(lmrIsPV, 1024, 512, 2048) \
|
||||||
X_INT(lmrHistoryDivisor, 8192, 6000, 10000) \
|
X_INT(lmrHistoryDivisor, 8192, 6000, 10000) \
|
||||||
X_INT(lmrImproving, 1024, 6000, 10000) \
|
X_INT(lmrImproving, 1024, 6000, 10000) \
|
||||||
|
X_INT(lmrCorrplexity, 1024, 6000, 10000) \
|
||||||
X_INT(rfpBase, 25, 50, 200) \
|
X_INT(rfpBase, 25, 50, 200) \
|
||||||
X_INT(rfpMargin, 100, 50, 200) \
|
X_INT(rfpMargin, 100, 50, 200) \
|
||||||
X_INT(fpMargin, 100, 50, 200) \
|
X_INT(fpMargin, 100, 50, 200) \
|
||||||
|
|||||||
Reference in new issue
Block a user