fix: guide cross-layer search through the route graph - #146
Draft
ShiboSoftwareDev wants to merge 7 commits into
Draft
fix: guide cross-layer search through the route graph#146ShiboSoftwareDev wants to merge 7 commits into
ShiboSoftwareDev wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Benchmark This PRRun benchmarks by commenting on this PR: Everything after Examples:
Any PR whose title contains |
This was referenced Aug 2, 2026
fix(pathing): use directed graph guidance for cross-layer routes
tscircuit/tscircuit-autorouter#1870
Draft
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.
Problem
The A* queue tracks a directed state: a port plus the region it will enter next. The old heuristic only measured the port position, so a port entering a dead end could look better than a port entering the legal detour.
Fix
For cross-layer routes, setup now counts the remaining directed graph hops from each candidate state to the goal. While the candidate remains on the start layer, A* combines that graph distance with its existing XY estimate. After changing layers, the existing heuristic is unchanged.
This only changes search order. It does not add or split regions, change layer availability, create vias, or relax collision rules.
Reproduction and snapshot
This PR is stacked on #143 and uses its fixture unchanged. The top frame is the input topology. In the bottom frame, the route now ignores the nearby dead ends, travels right through the ordinary multilayer region, changes from z0 to z1, and returns to the goal.
Hosted verification
All execution and snapshot generation ran in GitHub Actions. Nothing was run locally.