Skip to content

Commit 741aaf8

Browse files
Viren6vondele
authored andcommitted
Introduce Quadruple Extensions
This patch introduces quadruple extensions, with the new condition of not ttPv. It also generalises all margins, so that extensions can still occur if conditions are only partially fulfilled, but with a stricter margin. Failed STC: LLR: -2.94 (-2.94,2.94) <0.00,2.00> Total: 16096 W: 3984 L: 4228 D: 7884 Ptnml(0-2): 72, 2067, 4002, 1847, 60 https://tests.stockfishchess.org/tests/view/66316422d01fb9ac9bcdbdcd Passed VVLTC 1: LLR: 2.94 (-2.94,2.94) <0.00,2.00> Total: 96660 W: 24550 L: 24210 D: 47900 Ptnml(0-2): 5, 8776, 30426, 9120, 3 https://tests.stockfishchess.org/tests/view/66361f2c74fa3f41ef2ee091 Passed VVLTC 2: LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 80546 W: 20495 L: 20120 D: 39931 Ptnml(0-2): 6, 7477, 24929, 7858, 3 https://tests.stockfishchess.org/tests/view/66350cf739ba8e443112b3fa closes #5211 bench 2233743
1 parent 351a2e2 commit 741aaf8

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

src/search.cpp

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,6 @@ Value Search::Worker::search(
593593
bestMove = Move::none();
594594
(ss + 2)->killers[0] = (ss + 2)->killers[1] = Move::none();
595595
(ss + 2)->cutoffCnt = 0;
596-
ss->multipleExtensions = (ss - 1)->multipleExtensions;
597596
Square prevSq = ((ss - 1)->currentMove).is_ok() ? ((ss - 1)->currentMove).to_sq() : SQ_NONE;
598597
ss->statScore = 0;
599598

@@ -1049,17 +1048,16 @@ Value Search::Worker::search(
10491048

10501049
if (value < singularBeta)
10511050
{
1052-
extension = 1;
1053-
1054-
// We make sure to limit the extensions in some way to avoid a search explosion
1055-
if (!PvNode && ss->multipleExtensions <= 16)
1056-
{
1057-
extension = 2 + (value < singularBeta - 11 && !ttCapture);
1058-
depth += depth < 14;
1059-
}
1060-
if (PvNode && !ttCapture && ss->multipleExtensions <= 5
1061-
&& value < singularBeta - 38)
1062-
extension = 2;
1051+
int doubleMargin = 251 * PvNode - 241 * !ttCapture;
1052+
int tripleMargin =
1053+
135 + 234 * PvNode - 248 * !ttCapture + 124 * (ss->ttPv || !ttCapture);
1054+
int quadMargin = 447 + 354 * PvNode - 300 * !ttCapture + 206 * ss->ttPv;
1055+
1056+
extension = 1 + (value < singularBeta - doubleMargin)
1057+
+ (value < singularBeta - tripleMargin)
1058+
+ (value < singularBeta - quadMargin);
1059+
1060+
depth += ((!PvNode) && (depth < 14));
10631061
}
10641062

10651063
// Multi-cut pruning
@@ -1104,7 +1102,6 @@ Value Search::Worker::search(
11041102

11051103
// Add extension to new depth
11061104
newDepth += extension;
1107-
ss->multipleExtensions = (ss - 1)->multipleExtensions + (extension >= 2);
11081105

11091106
// Speculative prefetch as early as possible
11101107
prefetch(tt.first_entry(pos.key_after(move)));

src/search.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ struct Stack {
7474
bool inCheck;
7575
bool ttPv;
7676
bool ttHit;
77-
int multipleExtensions;
7877
int cutoffCnt;
7978
};
8079

0 commit comments

Comments
 (0)