Phased Null-Agent Swapping (PHANS)
- The paper introduces PHANS as a heuristic algorithm that treats empty cells as mobile null agents to facilitate route clearance in environments where only a few agents have designated goals.
- PHANS deploys a two-phase architecture involving prioritized A* target-path planning combined with localized null-agent swapping to resolve blockages under strict collision rules.
- Empirical evaluations demonstrate that PHANS maintains high success rates and low runtimes in dense grids, offering a scalable alternative to ILP-based and other MAPF methods.
Phased Null-Agent Swapping (PHANS) is a heuristic algorithm for high-density multi-agent path finding in which empty vertices are treated as mobile “null agents” and propagated through a crowded grid by phased local swaps with neighboring agents in order to clear paths for designated target agents (Makino et al., 8 Sep 2025). It was introduced for the MAPF-HD setting, where only a subset of agents have goals, most occupied cells are held by obstructing agents, and movement is constrained by a stricter collision model based on vertex conflict and following conflict rather than the standard edge-conflict formulation. In a broader graph-reconfiguration context, PHANS also admits a useful conceptual comparison to earlier decentralized replacement schemes in which a “removed” role is transferred hop by hop along a graph until it reaches a noncritical endpoint, although the formal objective in that literature is connectivity maintenance rather than MAPF makespan minimization (Aksaray et al., 2013).
1. Definition and scope
PHANS was proposed within “MAPF-HD: Multi-Agent Path Finding in High-Density Environments” as a method for environments in which “almost all free cells are occupied by agents,” only some agents are targets, and empty cells are scarce (Makino et al., 8 Sep 2025). The method operates by separating the problem into target-path planning and path clearing. Rather than computing globally optimized trajectories for all agents simultaneously, PHANS plans routes for target agents and then incrementally evacuates blockers by routing nearby empty cells toward them.
The defining abstraction is the null agent. Any empty vertex is modeled as a special agent with no goal. When a target’s next step is blocked, PHANS identifies a nearby null agent, computes a path from that empty vertex to the obstructing agent, and then advances the null agent one hop at a time by swapping it with agents along that path. The empty space therefore migrates through the population, and the obstructing agent is displaced into the null’s original location. The target then advances when its next path vertex becomes empty.
A recurrent misconception is to treat PHANS as a generic solver for ordinary low-density MAPF. The formulation in which it is defined is narrower and more specialized. MAPF-HD assumes that only target agents need to reach specified goals, obstructing agents can terminate anywhere, the environment contains at least one empty vertex, and the optimization objective is makespan rather than sum-of-costs. The choice of makespan is explicit: because obstructing agents have no goals, their movements would dominate a sum-of-costs objective and obscure the intended planning criterion (Makino et al., 8 Sep 2025).
2. Problem model and collision semantics
The environment is a 4-connected grid graph , with vertices
and edges
The Manhattan metric is
Targets have both start and goal vertices, whereas obstructing agents have only start vertices; their final positions are unconstrained (Makino et al., 8 Sep 2025).
Time is discrete and movement is synchronous. At each step an agent either stays in place or moves to an adjacent vertex. The collision model departs from standard MAPF by using vertex conflict together with following conflict. Vertex conflict forbids two agents from occupying the same vertex at the same time. Following conflict forbids one agent from stepping into a cell immediately after another leaves it: for distinct . This is stricter than the usual edge-conflict rule and is motivated as a more realistic constraint for very high-density robotic systems, where near-synchronous adjacent motions are considered unsafe or unrealistic (Makino et al., 8 Sep 2025).
The structural assumptions are also integral to the algorithm. Initial positions are distinct, and the occupancy satisfies , so at least one empty vertex exists. PHANS relies on that empty space as a movable resource. If no empty cell exists, the null-agent mechanism disappears and the method cannot operate. This requirement is not a secondary implementation detail; it is part of the formal MAPF-HD specification used in the paper.
3. Two-phase algorithmic architecture
PHANS is organized around two main phases: target-path planning and null-agent swapping (Makino et al., 8 Sep 2025). The first phase computes target routes without explicitly solving a coupled trajectory optimization for the obstructing population. The second phase clears those routes by moving empty cells through the environment.
In the planning phase, PHANS uses Prioritized Planning. Target agents are sorted in descending order of Manhattan distance from start to goal, so agents with farther goals receive higher priority. For each target, a path is then computed with A*. The evaluation function is
where is the cost accumulated from start, is a heuristic estimate to the goal, typically Manhattan distance, and 0 is an additional heuristic term meant to approximate evacuation delay caused by obstructing agents. The added term is defined as
1
where 2 is estimated from the Manhattan distance between an obstructing agent and its nearest empty vertex. The function is intentionally heuristic rather than admissible: the combined heuristic 3 is stated to be neither admissible nor consistent, and no path-optimality guarantee is claimed.
In the execution phase, PHANS repeatedly identifies obstructing agents located on target paths. Those blockers are prioritized by the remaining length of the target-path segment they obstruct. For each blocker, the algorithm assigns the nearest null agent, with an important exclusion rule: the chosen null agent must not lie between the target and the blocker along the target path. Those nulls are effectively reserved for direct use by the target and are not diverted to side evacuations.
Once a null agent has been assigned, PHANS plans a path from that empty vertex to the obstructing agent. The null agent then advances along the path by repeated local swaps, each step moving into an adjacent occupied cell and pushing the empty space forward. Targets themselves advance only when the next cell on their planned path is null. Obstructing agents likewise move only when their next assigned cell is null. This rule is central to the implementation: by allowing moves only into empty vertices, the algorithm avoids vertex and following conflicts in the abstract discrete-time schedule.
The resulting behavior is incremental and local. PHANS does not build a time-expanded network, does not solve for simultaneous optimal motion of all agents, and does not attempt global path replanning for every obstruction event. Instead, it alternates between limited routing decisions for targets and localized null-agent propagation that clears the next segments of those routes.
4. Formal properties and computational profile
The paper argues that PHANS always terminates under its stated assumptions, and therefore is complete for the MAPF-HD problem variant it defines (Makino et al., 8 Sep 2025). The termination argument uses the set 4 of vertices occupied by obstructing agents that lie on target paths and introduces, for a vertex 5, the quantity 6, the length of the shortest path from 7 to the nearest empty vertex at time 8. For the currently prioritized blocker 9, each null-agent swap strictly decreases this distance: 0 After finitely many swaps, the blocker’s position becomes empty, enabling a target move. Since target paths are finite and at least one target advances in each such cycle, the whole process finishes after finitely many swaps.
Completeness should not be conflated with optimality. PHANS is explicitly suboptimal. The target-planning heuristic is non-admissible and non-consistent, null-agent assignment is greedy, and relocation decisions are made by local priority rules rather than global optimization. Accordingly, neither optimal makespan nor optimal aggregate movement is guaranteed. This is a deliberate design trade-off: the method sacrifices optimality to obtain tractable behavior in environments where globally optimized formulations become expensive.
The worst-case complexity reflects this trade-off. A* on a graph 1 with a Fibonacci heap has worst-case complexity
2
Because PHANS invokes A* for target-path planning and repeatedly for null-agent path planning, the paper derives a worst-case time complexity of
3
where 4 is the number of target agents and 5 is the maximum length of any target path (Makino et al., 8 Sep 2025). The comparison point is the ILP-based MAPF-HD literature, which uses time-expanded networks over a horizon 6 and is summarized with worst-case complexity
7
The polynomial-versus-exponential contrast is the paper’s principal computational motivation for introducing PHANS.
5. Empirical behavior and comparative evaluation
The empirical picture presented for PHANS is that of a method designed to remain effective in dense, large-scale environments where ILP-based and standard MAPF methods degrade sharply (Makino et al., 8 Sep 2025). In the abstract, the method is said to solve MAPF-HD “within seconds to tens of seconds, even in large environments containing more than 8 cells,” whereas ILP-based methods may require “tens to hundreds of seconds” even on grids with fewer than 9 cells.
The smallest reported setting is a 0 open grid with 1 targets and obstructing-agent densities from 2 to 3. In this experiment, PHANS achieves a 4 success rate across densities, has very low runtime, and at 5 density averages approximately 6 s. Its makespan is generally worse than ILP by approximately 7–8 at high density, but significantly smaller than PIBT’s. The trade-off is therefore explicit: PHANS gives up optimality relative to ILP but preserves low runtime.
The most important scalability result is Experiment 3 on a 9 grid, totaling 0 cells, with 1 target agents and densities up to 2. Here PHANS maintains a 3 success rate under a 4 s cap. Runtime increases with density up to roughly 5, then slightly decreases, and at 6 density the average runtime is reported as 7 s. Makespan stays below 8 for densities below 9, then rises sharply beyond 0 as fewer null agents are available and more blockers must be evacuated.
The comparisons to ILP, EECBS, and PIBT are structurally informative. ILP provides the shortest makespans when it succeeds, but becomes computationally prohibitive and on the large 1 grid cannot find solutions within 2 s; even with 3 s it fails at 4 density. EECBS suffers from runtime and success-rate deterioration as density increases because its conflict-resolution burden explodes. PIBT remains scalable in some respects, but its reactive conflict handling and backtracking become expensive when empty cells are scarce, and its makespans in high-density settings are substantially larger than PHANS’s (Makino et al., 8 Sep 2025).
Experiment 4 adds 5 static obstacles to the 6 grid. PHANS retains a high success rate and fails in only one trial at 7 density, where the paper attributes failure to deadlock involving static obstacles and high-priority targets. This result is important because it shows both the strength and the limit of the approach: null-agent swapping remains effective in obstacle-rich settings, but static target paths can still induce difficult deadlocks.
6. Relation to decentralized swapping and connectivity-maintenance research
Although PHANS is introduced for MAPF-HD, its phased local-swap structure has a close conceptual analogue in earlier work on decentralized connectivity maintenance during agent removal (Aksaray et al., 2013). In that graph-theoretic setting, the system is modeled as an undirected connected graph 8, node criticality is defined via removal of a node and its incident edges, and the objective is to maintain communication connectivity when an arbitrary agent leaves. The proposed message passing strategy (MPS) constructs a simple path
9
starting at the removed node 0, forwarding a token through unvisited neighbors according to
1
until the path becomes maximal: 2 A theorem then guarantees that the endpoint of a maximal simple path is noncritical, so the sequence of replacements terminates at a node whose removal does not disconnect the graph (Aksaray et al., 2013).
The 2013 paper further introduces 3-criticality, a neighborhood-based local approximation to global articulation structure. A node is 4-hop critical if the subgraph induced by its 5-neighborhood disconnects when that node is removed. This local criticality is then used to bias neighbor selection and reduce unnecessary replacements. The paper reports that incorporating 6-criticality can move mean replacement cost much closer to a centralized optimum; for example, on random connected graphs with 7 nodes, one entry in Table I reports a centralized mean cost of 8, baseline MPS cost of 9, 0-criticality MPS cost of 1, and 2-criticality MPS cost of 3 (Aksaray et al., 2013).
In the synthesis accompanying that paper, the mapping to PHANS terminology is explicit: the initially removed node 4 can be interpreted as the null agent, each replacement as a swap, and each message-passing iteration as a phase. This does not make the two algorithms identical. The invariants differ sharply. MPS is designed for arbitrary single-agent removal while preserving graph connectivity; PHANS is designed for high-density path finding with scarce empty cells and makespan minimization. Still, the comparison is technically revealing. It suggests a shared local reconfiguration template in which a privileged status—vacancy, removal, or nullness—is transferred hop by hop through neighboring swaps until a global constraint is satisfied. In MPS the terminal certificate is noncriticality; in PHANS it is the clearing of a target-path segment.
7. Applications, limitations, and open directions
The intended application domains for PHANS are environments such as automated warehouses, automated valet parking, and abstracted traffic management or crowd-control scenarios in which only a subset of agents are active and many others can be temporarily relocated (Makino et al., 8 Sep 2025). The method is particularly well aligned with settings where fast planning is more valuable than strict optimality and where the underlying workspace is naturally discretized into a grid or parking/viewpoint graph.
Several limitations are structural rather than incidental. PHANS assumes a discrete grid and synchronous time steps. Real systems must therefore translate its schedules into continuous trajectories while respecting kinematic constraints and the conservative following-conflict model. It also assumes at least one empty cell at all times, and its target paths are static once planned. The paper identifies this last feature as a source of deadlock in complex obstacle configurations, including the single failure reported in the obstacle-rich large-grid experiment. Static obstacles are allowed, but dynamic obstacle handling is not explicit; the suggested mitigation is to rerun the algorithm frequently because its runtime is typically in seconds rather than minutes (Makino et al., 8 Sep 2025).
Implementation details matter. Targets are ordered by decreasing Manhattan start-goal distance. The added A* heuristic requires estimating evacuation cost via nearest-empty distances. Null agents assigned to blockers must exclude those lying between the target and the blocker on the target path. Low-level execution must ensure that two agents do not attempt to step into the same null cell simultaneously, which the paper notes can be handled by deterministic ordering or tie-breaking. These are not peripheral considerations; they are the operational rules that make the abstract null-agent model realizable.
The open directions identified in the paper are consistent with its current limitations: adaptive target-path replanning, improved null-agent assignment strategies, dynamic-obstacle handling, non-grid graphs, continuous-time or kinematics-aware variants, integration with task allocation, and tighter theoretical bounds on suboptimality (Makino et al., 8 Sep 2025). A plausible implication is that PHANS is best understood not as a finished optimal planner but as a scalable local-reconfiguration framework whose central innovation is the treatment of empty space as an explicit planning resource. That perspective also explains its conceptual resonance with earlier swap-based connectivity-maintenance methods, while preserving the specificity of its MAPF-HD formulation.