--seed: shuffle the order connections are routed in

The router is deterministic, but its result depends heavily on which
connection routes first. A seed shuffles that order reproducibly, so a
change can be judged over several orders instead of the one it happened
to get.
This commit is contained in:
2026-09-27 15:04:35 -06:00
parent cf8b7ece60
commit 76c3af94b8
6 changed files with 49 additions and 4 deletions
+2
View File
@@ -94,6 +94,7 @@ def route_board_exact(
edge_clearance: int | None = None,
resolution: int = 1,
heuristic_weight: float = 1.0,
seed: int | None = None,
) -> ExactRouteResult:
"""Route ``board`` orthogonally and verify the result with exact geometry.
@@ -122,6 +123,7 @@ def route_board_exact(
edge_clearance=edge_clearance,
resolution=resolution,
heuristic_weight=heuristic_weight,
seed=seed,
)
edge = 0 if edge_clearance is None else edge_clearance
outline = board.outline