Skip to content

Commit

Permalink
An attempt at official-stockfish#2717. Handle search again counter lo…
Browse files Browse the repository at this point in the history
…cally per thread. Use same TC and threads as test 6272a6afc8f14123163c1997 where this was shown to occur. low tp. Bench: 5845802
  • Loading branch information
miguel-l committed Jun 18, 2022
1 parent 6edc29d commit 07ac76c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ void Thread::search() {
optimism[~us] = -optimism[us];

int searchAgainCounter = 0;
bool increaseThreadDepth = true;

// Iterative deepening loop until requested to stop or the target depth is reached
while ( ++rootDepth < MAX_PLY
Expand All @@ -333,7 +334,13 @@ void Thread::search() {
pvLast = 0;

if (!Threads.increaseDepth)
searchAgainCounter++;
increaseThreadDepth = false;

if (!increaseThreadDepth)
{
searchAgainCounter++;
increaseThreadDepth = true;
}

// MultiPV loop. We perform a full root search for each PV line
for (pvIdx = 0; pvIdx < multiPV && !Threads.stop; ++pvIdx)
Expand Down

0 comments on commit 07ac76c

Please sign in to comment.