Skip to content

Commit

Permalink
An attempt at official-stockfish#2717. Check if handling search again…
Browse files Browse the repository at this point in the history
… counter locally per thread helps. Use same TC and threads (but with low throughput) as test 6272a6afc8f14123163c1997 where this was known to occur. I may try to check pgns from time to time and stop the test earlier if the issue persists. Bench: 5845802
  • Loading branch information
miguel-l committed Jun 18, 2022
1 parent 6edc29d commit 451d822
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 451d822

Please sign in to comment.