Skip to content

fix: guide cross-layer routes through legal transition regions - #144

Closed
ShiboSoftwareDev wants to merge 6 commits into
agent/repro-cross-layer-heuristic-detourfrom
agent/fix-cross-layer-heuristic-detour
Closed

fix: guide cross-layer routes through legal transition regions#144
ShiboSoftwareDev wants to merge 6 commits into
agent/repro-cross-layer-heuristic-detourfrom
agent/fix-cross-layer-heuristic-detour

Conversation

@ShiboSoftwareDev

@ShiboSoftwareDev ShiboSoftwareDev commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Problem

For cross-layer routes, the A* heuristic only measured XY distance to the goal. It could spend its iteration budget near the goal on the wrong layer instead of moving toward an existing legal layer-change region.

Fix

During setup, each cross-layer route now selects the cheapest existing ordinary region that:

  • has real incident ports on both endpoint layers;
  • is available on both layers; and
  • is free or reserved for the route's own net.

While the route is still on its start layer, the heuristic estimates distance through that region and includes its normal via cost. After the layer changes, the existing direct-distance estimate is used.

This changes search order only. It does not create connectivity, add a region type, permit a via, or weaken collision checks.

Snapshot

This PR is stacked on #143 and uses the same unchanged fixture. The bottom view now contains one completed path: it leaves the nearby dead ends, crosses layers in the ordinary multilayer region, and reaches the goal on z1.

Guided cross-layer route

Hosted verification

  • formatter check on the stack's TypeScript files: passed
  • full TypeScript check: passed
  • full test suite: 109 passed

All checks and snapshot generation ran in GitHub Actions. No project command was run locally.

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tiny-hypergraph Ready Ready Preview Aug 2, 2026 7:49pm

Request Review

@tscircuitbot

Copy link
Copy Markdown

Benchmark This PR

Run benchmarks by commenting on this PR:

/benchmark [benchmark.sh args...]
/benchmark --dataset <hg07|srj18> --limit <n> --solver <core|poly> --families <default|default+deep|all> --concurrency <n|auto>

Everything after /benchmark is forwarded directly to ./benchmark.sh.
The result comment shows the matching dataset from the latest stored main-branch benchmark artifact beside the PR run; main is not rerun for each PR benchmark request.

Examples:

  • /benchmark -> hg07, all samples, core solver
  • /benchmark --dataset srj18 --limit 20 -> first 20 srj18 samples
  • /benchmark --dataset srj18 --concurrency auto -> srj18 samples with runner CPU-count concurrency
  • /benchmark --sample sample002 -> one hg07 sample
  • /benchmark --limit 20 --solver poly -> first 20 hg07 samples with the poly solver
  • /benchmark --limit 40 --families default+deep -> first 40 hg07 samples with deeper candidate families

Any PR whose title contains [BENCHMARK TEST] will automatically run the benchmark workflow on PR updates.

@ShiboSoftwareDev

Copy link
Copy Markdown
Contributor Author

Superseded by #146. The sample 4 diagnostic showed that selecting a transition by XY center distance still leaves A* wandering the real graph on z0. #146 guides the existing directed graph state instead and does not select or invent a transition region.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants