removed adj and pruning disabling during datagen | bench 26088050

This commit is contained in:
rektdie committed 2025-07-31 07:34:34 +02:00
1 parent e6318f6ff4
commit 720fd40176
2 files changed
+21 -69

No files matched your search

+18 -21
View File
@@ -410,34 +410,31 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
bool notMated = results.score > (-MATE_SCORE + MAX_PLY);
// We disable pruning in PV nodes in datagen
if constexpr(!(mode == datagen && isPV)) {
// Late move pruning
// If we are near a leaf node we prune moves
// that are late in the list
if (!isPV && !board.InCheck() && currMove.IsQuiet() && notMated) {
int lmpBase = 7;
// Late move pruning
// If we are near a leaf node we prune moves
// that are late in the list
if (!isPV && !board.InCheck() && currMove.IsQuiet() && notMated) {
int lmpBase = 7;
int lmpThreshold = lmpBase + 4 * depth;
int lmpThreshold = lmpBase + 4 * depth;
if (moveSeen >= lmpThreshold) {
continue;
}
}
// Futility pruning
// If our static eval is far below alpha, there is only a small chance
// that a quiet move will help us so we skip them
int historyScore = ctx->history[board.sideToMove][currMove.MoveFrom()][currMove.MoveTo()];
int fpMargin = 100 * depth + historyScore / 32;
if (!isPV && ply && currMove.IsQuiet()
&& depth <= 5 && staticEval + fpMargin < alpha && notMated) {
if (moveSeen >= lmpThreshold) {
continue;
}
}
// Futility pruning
// If our static eval is far below alpha, there is only a small chance
// that a quiet move will help us so we skip them
int historyScore = ctx->history[board.sideToMove][currMove.MoveFrom()][currMove.MoveTo()];
int fpMargin = 100 * depth + historyScore / 32;
if (!isPV && ply && currMove.IsQuiet()
&& depth <= 5 && staticEval + fpMargin < alpha && notMated) {
continue;
}
Board copy = board;
bool isLegal = copy.MakeMove(currMove);