bloqade.lanes.heuristics.physical.nohome.NoHomePlacementStrategy
classNoHomePlacementStrategy¶source
bloqade.lanes.heuristics.physical.nohome.NoHomePlacementStrategy
Bases: NoReturnStrategyBase
Two-phase placement: return assignment + entangling routing.
Signature
class NoHomePlacementStrategy(arch_spec: ArchSpec, strategy: SearchStrategy = (lambda: SearchStrategy.IDS)(), max_expansions: int | None = 100, restarts: int = 20, deadlock_policy: DeadlockPolicy = (lambda: DeadlockPolicy.MOVE_BLOCKERS)(), top_c: int | None = None, gamma: float = 0.85, lambda_lookahead: float = 0.5, k_candidates: int = 8, top_bus_signatures: int = 6, bus_reward_rho: int = 1)Parameters
Section titled “Parameters”arch_spec:
Architecture specification.
strategy:
Inner search strategy as a SearchStrategy enum used for
the two routing phases. Default SearchStrategy.IDS.
max_expansions:
Maximum node expansions per solve call (shared across phases).
restarts:
Number of parallel restarts with perturbed scoring inside each
routing solve (return phase + entangling phase). The two-phase
Hungarian assignments themselves are deterministic; diversity
comes from the candidate-home-layout fan-out. Default 20.
deadlock_policy:
DeadlockPolicy enum value controlling how the heuristic
generator handles deadlocks during routing. Default
DeadlockPolicy.MOVE_BLOCKERS.
gamma:
Discount factor for future CZ layer weights in the return
assignment (default 0.85).
lambda_lookahead:
Blend weight for future proximity penalty in the return
assignment (default 0.5).
k_candidates:
Maximum candidate holes per returner for cost-matrix pruning
(default 8).
top_bus_signatures:
Number of bus-reward variant assignments to generate (default
6). Each variant rewards edges sharing a high-coverage lane
signature, biasing the assignment toward layouts with parallel
routing.
bus_reward_rho:
Per-edge hop-count discount applied to edges using a top
signature when building bus-reward variant cost matrices
(default 1).
Unlike NoReturnPlacementStrategy and
RecedingHorizonNoReturnPlacementStrategy, this strategy does
not pass top_c to SolveOptions (it inherits the base default
None), matching the historical behaviour of the two-phase
solve_nohome entry point.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
arch_spec | ArchSpec | required | |
strategy | SearchStrategy | (lambda: SearchStrategy.IDS)() | |
max_expansions | int | None | 100 | |
restarts | int | 20 | |
deadlock_policy | DeadlockPolicy | (lambda: DeadlockPolicy.MOVE_BLOCKERS)() | |
top_c | int | None | None | |
gamma | float | 0.85 | |
lambda_lookahead | float | 0.5 | |
k_candidates | int | 8 | |
top_bus_signatures | int | 6 | |
bus_reward_rho | int | 1 |
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
restarts | int | 20 | |
gamma | float | 0.85 | |
lambda_lookahead | float | 0.5 | |
k_candidates | int | 8 | |
top_bus_signatures | int | 6 | |
bus_reward_rho | int | 1 |