Conversation
Validate terminal positions by replay before accepting absent snapshots. Preserve nonterminal snapshot checks and add a deterministic pass/pass regression. Port the isolated test-only fix from the fork without search or near-end changes.
Keep the deterministic terminal regression silent; all assertions remain active without adding an unrecorded line to runoutputtests.sh output.
This branch has not been deployed
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.
The visit-cap checker in
runNNLessSearchTests()currently requires a snapshot whenever a capped node reaches its visit cap. A terminal leaf can exceed that cap without a snapshot: terminal playouts record the outcome and return before NN evaluation or child expansion, so there is no child distribution to freeze.This patch distinguishes those terminal leaves from nonterminal nodes. Before accepting an absent snapshot, the checker replays the root-to-node path and verifies that the position is finished, the player matches, the node is not forced nonterminal, and it remains unevaluated with no child capacity. Tree-search mode and unique parents are asserted for the replay. The existing snapshot and distribution checks for nonterminal nodes remain intact.
A deterministic pass/pass fixture exercises a capped terminal leaf beyond three times its cap. The fixture is silent and retains all assertions, so it does not add a line to the recorded output. This changes only
cpp/tests/testsearchnonn.cpp; production search behavior is unchanged.Validation
runtests, the repository'scpp/runoutputtests.sh, and five additionalrunoutputtestsrepetitions passed for0750698f6a12ee6e2b5f9adc5ce30a9cf33f4833. Linux/Windows ONNX CPU and Windows DirectML jobs also passed at that source revision.The branch is based directly on
d91ea855110dae533f0aada947b2b7d78cc8a4e1and contains only this test correction.