mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 05:07:46 +00:00
Output from a fix depth onward, instead of 3s.
To avoid output that depends on timing, output currmove and similar only from depth > 30 onward. Current choice of 3s makes the output of the same search depending on the system load, and doesn't always start at move 1. Depth 30 is nowadays reached in a few seconds on most systems. closes https://github.com/official-stockfish/Stockfish/pull/5436 No functional change
This commit is contained in:
+5
-5
@@ -349,10 +349,10 @@ void Search::Worker::iterative_deepening() {
|
|||||||
if (threads.stop)
|
if (threads.stop)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// When failing high/low give some update (without cluttering
|
// When failing high/low give some update before a re-search.
|
||||||
// the UI) before a re-search.
|
// To avoid excessive output, only start at rootDepth > 30.
|
||||||
if (mainThread && multiPV == 1 && (bestValue <= alpha || bestValue >= beta)
|
if (mainThread && multiPV == 1 && (bestValue <= alpha || bestValue >= beta)
|
||||||
&& elapsed_time() > 3000)
|
&& rootDepth > 30)
|
||||||
main_manager()->pv(*this, threads, tt, rootDepth);
|
main_manager()->pv(*this, threads, tt, rootDepth);
|
||||||
|
|
||||||
// In case of failing low/high increase aspiration window and
|
// In case of failing low/high increase aspiration window and
|
||||||
@@ -383,7 +383,7 @@ void Search::Worker::iterative_deepening() {
|
|||||||
std::stable_sort(rootMoves.begin() + pvFirst, rootMoves.begin() + pvIdx + 1);
|
std::stable_sort(rootMoves.begin() + pvFirst, rootMoves.begin() + pvIdx + 1);
|
||||||
|
|
||||||
if (mainThread
|
if (mainThread
|
||||||
&& (threads.stop || pvIdx + 1 == multiPV || elapsed_time() > 3000)
|
&& (threads.stop || pvIdx + 1 == multiPV || rootDepth > 30)
|
||||||
// A thread that aborted search can have mated-in/TB-loss PV and score
|
// A thread that aborted search can have mated-in/TB-loss PV and score
|
||||||
// that cannot be trusted, i.e. it can be delayed or refuted if we would have
|
// that cannot be trusted, i.e. it can be delayed or refuted if we would have
|
||||||
// had time to fully search other root-moves. Thus we suppress this output and
|
// had time to fully search other root-moves. Thus we suppress this output and
|
||||||
@@ -974,7 +974,7 @@ moves_loop: // When in check, search starts here
|
|||||||
|
|
||||||
ss->moveCount = ++moveCount;
|
ss->moveCount = ++moveCount;
|
||||||
|
|
||||||
if (rootNode && is_mainthread() && elapsed_time() > 3000)
|
if (rootNode && is_mainthread() && rootDepth > 30)
|
||||||
{
|
{
|
||||||
main_manager()->updates.onIter(
|
main_manager()->updates.onIter(
|
||||||
{depth, UCIEngine::move(move, pos.is_chess960()), moveCount + thisThread->pvIdx});
|
{depth, UCIEngine::move(move, pos.is_chess960()), moveCount + thisThread->pvIdx});
|
||||||
|
|||||||
Reference in New Issue
Block a user