Repository navigation
Respect obstacles when smoothing paths - #88
Open
civilwarinfrance wants to merge 2 commits into
Open
civilwarinfrance wants to merge 2 commits into
civilwarinfrance wants to merge 2 commits into
Conversation
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
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.
Related #21, which identified the inverted obstacle check in an earlier, unmerged proposal.
With a blocked center cell, smoothing
[[0, 0], [0, 2], [2, 2]]currently removes the bend and returns a diagonal through the obstacle. The loop excludes the destination, so that final shortcut is never checked. On empty grids, the inverted condition also retains unnecessary waypoints.Keep the last visible waypoint when a shortcut is blocked, and check every candidate through the destination. Return empty/single-waypoint paths without indexing past the input. Correct the existing empty-grid test to expect just the endpoints, and add obstacle, reverse-direction and short-input regressions for both interpolation modes.
Validation:
AI assistance: This patch, tests and description were prepared with Codex (GPT-6).