low depth se | bench 1398874 #176

Merged
rektdie merged 1 commits from ldse into main 2026-04-01 01:55:05 +02:00
2 changed files with 33 additions and 31 deletions
Showing only changes of commit 372ab43e8b - Show all commits

No files matched your search

+32 -31
View File
@@ -617,41 +617,42 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
int extension = 0; int extension = 0;
if (ply && ply < ctx->rootDepth * 2 if (ply && ply < ctx->rootDepth * 2 && currMove == entry.bestMove && ctx->excluded == 0) {
&& depth >= 8 if (depth >= 8
&& ttHit && ttHit
&& currMove == entry.bestMove && entry.depth >= depth - 3
&& ctx->excluded == 0 && entry.nodeType != AllNode)
&& entry.depth >= depth - 3 {
&& entry.nodeType != AllNode) const int sBeta = std::max(-inf + 1, entry.score - depth * 2);
{ const int sDepth = (depth - 1) / 2;
const int sBeta = std::max(-inf + 1, entry.score - depth * 2);
const int sDepth = (depth - 1) / 2;
ctx->excluded = currMove; ctx->excluded = currMove;
const int singularScore = PVS<false, mode>(board, sDepth, sBeta-1, sBeta, ply, ctx, cutnode).score; const int singularScore = PVS<false, mode>(board, sDepth, sBeta-1, sBeta, ply, ctx, cutnode).score;
ctx->excluded = Move(); ctx->excluded = Move();
// Singular extension
if (singularScore < sBeta) {
extension++;
if constexpr (!isPV) { // Singular extension
// Double extension if (singularScore < sBeta) {
if (singularScore <= sBeta - 1 - doubleExtMargin) { extension++;
extension++;
if constexpr (!isPV) {
// Double extension
if (singularScore <= sBeta - 1 - doubleExtMargin) {
extension++;
}
} }
} }
} // Multicut
// Multicut else if (sBeta >= beta) {
else if (sBeta >= beta) { return sBeta;
return sBeta; }
} // Negative extension
// Negative extension else if (entry.score >= beta) {
else if (entry.score >= beta) { extension--;
extension--; } else if (cutnode) {
} else if (cutnode) { extension--;
extension--; }
} else if (depth <= 7 && !board.InCheck() && staticEval <= alpha - ldseMargin && entry.nodeType == CutNode) {
extension++;
} }
} }
+1
View File
@@ -35,6 +35,7 @@
X_INT(seeQueenValue, 900, 750, 1100) \ X_INT(seeQueenValue, 900, 750, 1100) \
X_INT(seeQsThreshold, 0, -50, 50) \ X_INT(seeQsThreshold, 0, -50, 50) \
X_INT(seeOrderingThreshold, -100, -120, -80) \ X_INT(seeOrderingThreshold, -100, -120, -80) \
X_INT(ldseMargin, 25, -120, -80) \
X_INT(historyBonusMultiplier, 300, 270, 330) \ X_INT(historyBonusMultiplier, 300, 270, 330) \
X_INT(historyBonusSub, 250, 230, 280) X_INT(historyBonusSub, 250, 230, 280)