Merge pull request #99 from rektdie/lmr-improving-more
reducing more when not improving | bench 6594120
This commit was merged in pull request #99.
This commit is contained in:
2 files changed
+6
-2
No files matched your search
+5
-2
@@ -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, SearchContext* ctx) {
|
static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int ply, bool cutnode, bool improving, SearchContext* ctx) {
|
||||||
int reduction = 0;
|
int reduction = 0;
|
||||||
|
|
||||||
// Late Move Reduction
|
// Late Move Reduction
|
||||||
@@ -166,6 +166,9 @@ static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int
|
|||||||
if constexpr (isPV)
|
if constexpr (isPV)
|
||||||
reduction -= lmrIsPV;
|
reduction -= lmrIsPV;
|
||||||
|
|
||||||
|
if (!improving)
|
||||||
|
reduction += lmrImproving;
|
||||||
|
|
||||||
// History LMR
|
// History LMR
|
||||||
int historyReduction = ctx->history[board.sideToMove][move.MoveFrom()][move.MoveTo()];
|
int historyReduction = ctx->history[board.sideToMove][move.MoveFrom()][move.MoveTo()];
|
||||||
if (ply > 0)
|
if (ply > 0)
|
||||||
@@ -541,7 +544,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, ctx);
|
int reductions = GetReductions<isPV>(board, currMove, depth, moveSeen, ply, cutnode, improving, ctx);
|
||||||
|
|
||||||
int newDepth = depth + copy.InCheck() - 1 + extension;
|
int newDepth = depth + copy.InCheck() - 1 + extension;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
X_INT(lmrCutnode, 2048, 1024, 3072) \
|
X_INT(lmrCutnode, 2048, 1024, 3072) \
|
||||||
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(rfpMargin, 100, 50, 200) \
|
X_INT(rfpMargin, 100, 50, 200) \
|
||||||
X_INT(fpMargin, 100, 50, 200) \
|
X_INT(fpMargin, 100, 50, 200) \
|
||||||
X_INT(doubleExtMargin, 30, 10, 60) \
|
X_INT(doubleExtMargin, 30, 10, 60) \
|
||||||
|
|||||||
Reference in new issue
Block a user