Repository navigation
Reset search state for spanning-tree traversal - #90
Open
civilwarinfrance wants to merge 1 commit into
Open
civilwarinfrance wants to merge 1 commit into
civilwarinfrance wants to merge 1 commit into
Conversation
AI-assisted by Codex (GPT-6).
Owner
|
This bug does not exist, find_path cleans the tree. |
Contributor
Author
|
Thanks for checking it! You're right that |
Owner
|
Thanks for the clarification, I'll take a deeper look into Grid and if it should call find_path directly later, so I reopened this PR and assigned myself. |
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.
Calling
MinimumSpanningTree.tree()twice on a three-cell grid returns all three cells the first time, but only the starting cell the second time.tree()anditertree()do not clean or mark the grid dirty, reset the run counter, or initialize the clock. Consequently, a finitetime_limitalso makes a fresh tree traversal fail immediately, and tree traversal can interfere with a later route search on the same grid.Initialize search state in
itertree(), which is shared bytree()andfind_path(), and remove the duplicate initialization fromfind_path(). Reset the root's costs as well. The traversal algorithm is unchanged.Validation on macOS / Python 3.14.6:
This PR is based directly on main and does not include the pending smoothing or identical-endpoint patches.
AI assistance: This patch, tests and description were prepared with Codex (GPT-6).