lmr rework | bench 4645054
This commit is contained in:
1 parent
222a079c1f
commit
48b40ec9ff
1 file changed
+6
-4
+6
-4
@@ -167,12 +167,13 @@ static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int
|
|||||||
int reduction = 0;
|
int reduction = 0;
|
||||||
|
|
||||||
// Late Move Reduction
|
// Late Move Reduction
|
||||||
if (depth >= 2 && moveSeen >= 2 + (2 * isPV) && !move.IsCapture()) {
|
if (depth >= 2 && moveSeen >= 2 + (2 * isPV)) {
|
||||||
reduction = lmrTable[move.IsQuiet()][depth][moveSeen] * 1024;
|
reduction = lmrTable[move.IsQuiet()][depth][moveSeen] * 1024;
|
||||||
|
|
||||||
if (cutnode)
|
if (cutnode)
|
||||||
reduction += lmrCutnode;
|
reduction += lmrCutnode;
|
||||||
|
|
||||||
|
if (!move.IsCapture()) {
|
||||||
if constexpr (isPV)
|
if constexpr (isPV)
|
||||||
reduction -= lmrIsPV;
|
reduction -= lmrIsPV;
|
||||||
|
|
||||||
@@ -191,12 +192,13 @@ static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int
|
|||||||
historyReduction += ctx->conthist.GetTwoPly(board, move, ctx, ply);
|
historyReduction += ctx->conthist.GetTwoPly(board, move, ctx, ply);
|
||||||
}
|
}
|
||||||
|
|
||||||
reduction /= 1024;
|
|
||||||
|
|
||||||
historyReduction = historyReduction / lmrHistoryDivisor;
|
historyReduction = historyReduction / lmrHistoryDivisor;
|
||||||
|
|
||||||
reduction -= historyReduction;
|
reduction -= historyReduction * 1024;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
reduction /= 1024;
|
||||||
|
|
||||||
return std::clamp(reduction, -1, depth - 1);
|
return std::clamp(reduction, -1, depth - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user