Skip to content

Commit 560c776

Browse files
Vizvezdenecvondele
authored andcommitted
Do more reductions for late quiet moves in case of consecutive fail highs.
Idea of this patch can be described as following - in case we have consecutive fail highs and we reach late enough moves at root node probability of remaining quiet moves being able to produce even bigger value than moves that produced previous cutoff (so ones that should be high in move ordering but now they fail to produce beta cutoff because we actually reached high move count) should be quiet small so we can reduce them more. passed STC LLR: 2.94 (-2.94,2.94) {-0.25,1.25} Total: 53392 W: 5681 L: 5474 D: 42237 Ptnml(0-2): 214, 4104, 17894, 4229, 255 https://tests.stockfishchess.org/tests/view/5f88501adcdad978fe8c527e passed LTC LLR: 2.94 (-2.94,2.94) {0.25,1.25} Total: 59136 W: 2773 L: 2564 D: 53799 Ptnml(0-2): 30, 2117, 25078, 2300, 43 https://tests.stockfishchess.org/tests/view/5f884dbfdcdad978fe8c527a closes #3184 Bench: 4066972
1 parent 281d520 commit 560c776

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/search.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ void Thread::search() {
417417
// Start with a small aspiration window and, in the case of a fail
418418
// high/low, re-search with a bigger window until we don't fail
419419
// high/low anymore.
420-
int failedHighCnt = 0;
420+
failedHighCnt = 0;
421421
while (true)
422422
{
423423
Depth adjustedDepth = std::max(1, rootDepth - failedHighCnt - searchAgainCounter);
@@ -1177,6 +1177,9 @@ namespace {
11771177
if (ttCapture)
11781178
r++;
11791179

1180+
// Increase reduction at root if failing high
1181+
r += rootNode ? thisThread->failedHighCnt * thisThread->failedHighCnt * moveCount / 512 : 0;
1182+
11801183
// Increase reduction for cut nodes (~10 Elo)
11811184
if (cutNode)
11821185
r += 2;

src/thread.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class Thread {
7373
CapturePieceToHistory captureHistory;
7474
ContinuationHistory continuationHistory[2][2];
7575
Score contempt;
76+
int failedHighCnt;
7677
};
7778

7879

0 commit comments

Comments
 (0)