Align ponder move and final PV output - #6679
Closed
robertnurnberg wants to merge 1 commit into
Closed
Conversation
Member
|
Do you have a set of positions which could serve as test cases demonstrating the effect(s) of the patch? |
Contributor
Author
|
One example is given in the linked issue. Several more can be constructed with a script like this, using the fastchess version from Disservin/fastchess#997. #!/bin/bash
count=0
while true; do
((count++))
echo "Starting Run #$count..."
./fastchess -engine name=sf-dev1 cmd=./stockfish tc=1+0.01 \
-engine name=sf-dev2 cmd=./stockfish tc=0.2+0.01 \
-rounds 500 -concurrency -1 -openings file=UHO_Lichess_4852_v1.epd \
format=epd -check-mate-pvs -check-ponder-pvs \
-log level=info engine=true file=engine_log.txt append=false > fc_log.txt
if grep -q "Warning" fc_log.txt; then
echo "STOPPED: 'Warning' found in fc_log.txt during Run #$count"
break
else
echo "Run #$count clean."
fi
doneSample log files: fc_log.txt.gz , engine_log_1m.txt.gz (first 1m lines) The binary from this PR runs cleanly, without any warnings. Directly looking at the code in master it is possible to reason about all the four cases mentioned in the PR description. |
ppigazzini
pushed a commit
to ppigazzini/zfish
that referenced
this pull request
Jul 12, 2026
In master for various reasons the given ponder move may get out of sync with (the second move of) the last PV sent to the GUI: 1. If a ponder move is extracted from the TT despite bestmove leading to a game ending draw. 2. If a ponder move is extracted from the TT from a fail high/low, since after the ponder move extraction no new PV is sent to the GUI. 3. If `syzygy_extend_pv()` from within the call to `pv()` changes the PV after the ponder move has been selected. 4. If the PV roll-back to protect mated-in scores differs in the second move from the final PV sent to the GUI. This PR keeps ponder move and the last printed PV in sync. Fixes #6676. closes official-stockfish/Stockfish#6679 No functional change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In master for various reasons the given ponder move may get out of sync with (the second move of) the last PV sent to the GUI:
syzygy_extend_pv()from within the call topv()changes the PV after the ponder move has been selected.This PR keeps ponder move and the last printed PV in sync.
Fixes #6676.
No functional change.