Repository navigation
Show bot search progress and let the player cut a search short - #4
Merged
Merged
Conversation
A Move search publishes a snapshot when it starts, after each completed iteration and when it returns. ProgressOf reads the latest without taking any lock or starting work; hint and analysis searches do not touch it. The progress tests run under the race detector by name.
The thinking line shows elapsed time and the deepest completed iteration of the search behind the coming move, bound to that request under the serialiser. esc while the bot searches plays its last completed choice, or its legal ordering pick, exactly once; i shows the finished search's figures. A search left running by a finished game can no longer have its move played in the rematch.
i now chooses the widest whole-item form of the finished search's figures that fits, so the move and completed depth survive the narrowest status line and nodes and time survive from forty columns. The manual and changelog describe play now as the tier's ordinary choice from the completed work: the beginner tier still picks among its near-best candidates.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Summary
Delivers RM-04 on top of v0.7.0.
internal/bot: a Move search publishes an immutableSearchProgresssnapshot when it starts, after every completed deepening iteration and when it returns.bot.ProgressOfreads the latest one without a lock and without starting work. Hint and analysis searches leave it untouched.Moveand captures the final snapshot right after it, so a search left over from a finished game can never lend its figures to the rematch.escwhile the bot searches plays now: the search is cancelled without invalidating its move, and the tier's ordinary choice from the completed work (or its ordering pick before any iteration) is played exactly once.esckeeps its link-mode and confirm meanings.ishows the finished search's figures (completed depth, nodes and time in all, stop reason), shortened by whole items to fit the width.Scope
No search-strength change, no principal variation, no disk or wire change. The Windows input-dependency pin is unchanged.
Verification
-raceoninternal/appand on the progress tests. The progress tests now run under the race detector in CI by name.TestPlayNowCutsAMaxSearchShortdrives a real max search on 24×24, presses escape and checks one legal stored reply and theifigures; it accepts both the completed-depth and the before-any-iteration wording so slow runners stay valid. It is required on native Windows.depth 5 done · 119426 nodeswhile thinking, escape played early from depth 5,ireported the figures.