Manuscript Offprint
arXiv:2611.07528Goal-Branching LaCAM: Temporary Goals as Search Branches in Dense Multi-Agent Pathfinding
Abstract
LaCAM is a search-based solver for multi-agent pathfinding (MAPF) that runs a depth-first search over joint configurations, using PIBT to generate successors and lazily adding single-agent constraints to explore alternatives. Although LaCAM is complete, it can struggle on dense, corridor-heavy instances because extracting blocking agents from deadlocks requires coordinated moves of several agents, often away from their goals, which PIBT's greedy one-step successors rarely propose and which LaCAM can only reach by enumerating constraints one agent at a time. This paper proposes Goal-Branching, where blocking agents are given temporary goals, each tried as an additional branch of LaCAM's search. We examine random and corridor-aware rules for choosing these temporary goals and show that completeness is preserved for any such rule. On dense instances (60–90% of free cells occupied) of three maze and room maps, Goal-Branching solves 89% of instances against 44% for LaCAM*, and, on instances both solve, it finds a first solution 10–14× faster on maze-32-32-2 and room-32-32-4, and nearly 200× faster in median time at 75% density on room-32-32-4. Solution cost increases by 15–22% on instances both solve, while on open maps and the full MovingAI benchmark its solutions cost no more than those of LaCAM* and it is at most 3% slower.
Code — https://github.com/Elysium8/gb-lacam2
1 Introduction
Multi-agent pathfinding (MAPF) asks for collision-free paths that move a team of agents from their start locations to their goals on a shared graph (Stern et al. 2019). It underpins applications such as automated warehouses, where hundreds of robots share narrow aisles (Wurman, D'Andrea, and Mountz 2008), and it is NP-hard to solve optimally (Yu and LaValle 2013). Many of the practically hard instances are dense ones, in which agents occupy a large fraction of the free space and must repeatedly make room for one another.
Optimal and bounded-suboptimal solvers such as CBS (Sharon et al. 2015) and EECBS (Li, Ruml, and Koenig 2021) provide quality guarantees but do not scale to large, dense instances. Scalable solvers trade these guarantees for speed, with different strengths. Rule-based planners such as PIBT (Okumura et al. 2022) compute one step at a time and handle thousands of agents, but are incomplete. Repair-based methods built on large neighbourhood search, such
as MAPF-LNS2 (Li et al. 2022) and its extensions (Wang et al. 2025), iteratively remove collisions from an initial plan and are among the strongest solvers on dense instances, often with better solution quality, but are also incomplete. LaCAM (Okumura 2023b) takes a third route, a search over joint configurations that uses PIBT to generate successors; it is complete and finds first solutions quickly at scale, though these are often costly.
LaCAM is complete, and LaCAM*, its anytime extension, is proven to converge to an optimal solution given sufficient time. However, both can struggle to solve dense instances with dead-end corridors and other bottlenecks in a reasonable time. This is because PIBT, the configuration generator underlying both solvers, often deadlocks or livelocks in such settings, and the search is then reduced to a systematic but uninformed enumeration of successors, one agent constraint at a time. Some work has augmented the configuration generator for these situations, such as the swap technique (Okumura 2023a), which resolves livelocks between pairs of agents by pulling one of them towards a branching vertex where the two can exchange places, and tie-breaking heuristics that discourage agents from blocking each other's routes (Okumura and Nagai 2025). However, these extensions only change how agents rank their moves towards fixed goals, and the swap technique handles one pair of agents at a time. Jams that require several agents to move away from their goals at once therefore still fall to the constraint search. In this paper we introduce Goal-Branching, a novel extension to LaCAM that resolves such jams directly. When PIBT's step jams, Goal-Branching uses the agents that PIBT failed to move to propose temporary goals for those blocking the way, and tries each choice as a separate branch of the search before LaCAM's own constraints. Temporary goals change where agents are heading, not the problem being solved, so the search keeps its guarantees, and the branches are cheap to generate from information PIBT already computes. Our contributions are:
- Goal-Branching, an extension of LaCAM* that turns PIBT jams into temporary-goal branches of the search (Section 3);
- proofs that Goal-Branching preserves completeness and eventual optimality, and leaves LaCAM* unchanged on runs without jams (Section 3.7);
- an evaluation showing that on dense maze and room in-
stances Goal-Branching solves 89% of instances against 44% for LaCAM* and finds first solutions up to faster on average, and in some settings over faster. On open maps and the full MovingAI benchmark it is never more than 3% slower, its solutions cost no more, and it solves 41 more runs than LaCAM* (Section 4).
2.1 Problem Definition
An instance consists of an undirected graph and agents , each with a distinct start and a distinct goal . A configuration places every agent on a distinct vertex; is the location of agent , and , are the start and goal configurations. In one timestep each agent moves to an adjacent vertex or stays. A transition is valid if no two agents occupy the same vertex ( ) and no two agents swap along an edge ( is forbidden). A solution is a sequence of valid transitions from to . We measure its quality by the sum of costs, the sum over agents of the last timestep at which each agent arrives at its goal. denotes the shortest-path distance in .
2.2 LaCAM and PIBT
PIBT (Okumura et al. 2022) computes one valid transition from Q. Agents are processed in a priority order; each takes the unreserved vertex among its neighbours and its current vertex that is closest to its goal, breaking ties at random. If that vertex is occupied by an agent j that has not yet moved, j inherits the priority and must move first; if j cannot move, the agent tries its next-best vertex, and fails if none remains. The swap technique of LaCAM additionally lets two agents in a head-on conflict exchange places via a nearby branching vertex.
LaCAM* (Okumura 2023b,a) runs a depth-first search over configurations. A node stores a configuration , its parent and neighbours, costs , and , an agent order by decreasing dynamic priority (which grows by one each step agent is away from , and resets on arrival), and a constraint tree . Each node of fixes the moves of the first agents of ; its root fixes none. Successors of are generated one at a time by taking the next node of , adding its children (all moves of the next agent in ), and running PIBT under its constraints. A new configuration becomes a child node and is pushed onto the stack OPEN; a configuration already in EXPLORED instead has its costs rewired and its node pushed again, or, with small probability, the start node (a random restart). After the first solution, of cost , the search continues and discards nodes with .
2.3 Related Work
Improving LaCAM's configuration generator. Most work on LaCAM in dense settings changes how PIBT ranks moves. LaCAM* adds the swap technique (Okumura 2023a); LaCAM3 adds Monte-Carlo configuration generation, spread-out guide paths and iterative refinement (Okumura 2024); hindrance and regret penalise moves that block a neighbour's route (Okumura and Nagai 2025); LG-LaCAM steers PIBT along short windowed guide paths (Arita and Okumura 2026); and LaGAT learns move preferences with a graph attention network (Jain et al. 2026). All of these bias the choice of move towards fixed goals. Goal-Branching is complementary: it changes what agents are heading for, and offers several alternatives as branches of the search. LaGAT also detects deadlocks, as an agent that has not moved while its neighbours are unchanged, but responds by reverting to PIBT's default preferences rather than by branching.
Temporary goals and evacuation. Moving blocking agents aside and restoring them later is a long-standing idea in rule-based MAPF. Push and Swap and Push and Rotate push agents, including ones already at their goals, off a path and return them afterwards (Luna and Bekris 2011; de Wilde, ter Mors, and Witteveen 2013), and the Corridor Generating Algorithm evacuates the occupants of a corridor to the nearest free vertex outside it (Pertzovsky, Stern, and Zivan 2024). Temporary priorities have been used in PIBT to push agents out of dead-end trees (Fujitani et al. 2022), and within LaCAM, BRaP-PIBT gives agents temporary goals in block rearrangement, where goals are anonymous (Fu et al. 2025). These methods either commit to a single rule-based choice or address anonymous goals; none derives temporary goals from detected jams and tries several of them as branches of a complete search.
Goal-Branching bears a resemblance to the Multi-Agent Corridor Generating Algorithm (MACGA) (Pertzovskiy et al. 2025), in the sense that both algorithms attempt to resolve corridor blockages by evacuating blocking agents. However, MACGA is a rule-based, polynomial-time planner: it detects corridors from the map's separating vertices, moves their occupants to the nearest free vertices outside the corridor, and commits to a single such plan, which makes it incomplete. Goal-Branching instead operates inside LaCAM*’s search. Evacuations are triggered by jams that PIBT itself detects, rather than by map geometry, and several candidate temporary goals are offered as alternative branches that the search can backtrack over. Because LaCAM*’s constraint tree remains as the fallback, completeness is retained. Moreover, MACGA’s evacuations cannot pass through agents already following an evacuation plan, and fail in that case, whereas in Goal-Branching an agent heading to a temporary goal can itself cause further temporary goals to be assigned to the agents blocking its way, so evacuations compose across successive jams.
3 Goal-Branching
At a high level, Goal-Branching triggers when LaCAM*’s PIBT step jams, that is, when the unconstrained step returns a configuration that has already been explored. Instead of relying only on the constraint tree to find, one agent at a time, the coordinated moves that resolve the jam. Goal-Branching gives the blocking agents candidate temporary goals and tries each as a separate branch of the search. Each branch runs one PIBT step under its temporary goals, and the resulting configuration is added as a new successor of the high-level node, tried before the node’s constraint tree. Search states, costs, heuristics and the structure of the constraint tree are unchanged, which is why completeness is preserved (Section 3.7). We first define temporary goals and the extended search nodes, then describe how jams yield branches and how the search uses them, and close with a worked example and the theoretical properties.
3.1 Temporary and Effective Goals
Goal-Branching steers agents through temporary goals, which change where an agent is heading without changing the problem it must solve. A temporary goal for agent is a record : target vertex , pusher (the agent whose way is clearing), the pusher's distance to its goal when the record is set, , and age . We write when agent holds no temporary goal. The effective goal of is
Within a PIBT step, every agent ranks its candidate vertices by , breaking ties at random, and the swap technique of LaCAM* likewise tests effective rather than real goals. An agent without a temporary goal therefore behaves exactly as in LaCAM*. Temporary goals affect only which successors PIBT proposes: edge costs and the heuristic are always computed from the real goals , so solution quality and the admissibility of are measured against the original problem.
Temporary goals are passed from a node to its children and expire on their own. When a successor with configuration is created, every record ages by one step, , and is released ( ) if
where is a hold limit ( by default). That is, a temporary goal with a pusher is held until the pusher has reached its goal or has made real progress towards it. Arriving at alone does not release it, so the holder stays out of the way, and bounds how long any agent can be diverted.
3.2 Extended Search Nodes
In addition to the fields of Sec. 2.2, Goal-Branching adds three fields:
• , the temporary goals in force at ( if agent has none). A child inherits after ageing and the release rule (Eq. (2)) are applied.
• N.B, a queue of goal branches still to be tried at N.
• N.jam, set once a jam at N has been handled, so that branches are queued at most once per node.
Nodes are still identified by N.Q alone: a configuration reached again is treated as already explored, whatever temporary goals it was reached with, and keeps the of the node that first generated it.
The agent order sorts agents by the key
in decreasing order, where is LaCAM 's dynamic priority: it grows by one at every step that agent i is away from its real goal and resets once the agent arrives. Holders of a temporary goal are therefore planned first, and constrained first in . Within a goal branch, the agents the branch assigns goals to are placed ahead of all others.
3.3 Jams and Blocking Pairs
Definition 1 (Jam). The unconstrained PIBT step at node N jams if it returns a configuration already in the explored set.
The unconstrained step is the first one LaCAM* takes at , before any constraint from is applied. A jam is handled at most once per node, recorded by .
When a jam occurs, Goal-Branching collects candidate blockers from the failures of that PIBT step. Whenever agent is reached through priority inheritance from agent (that is, wants 's vertex) and fails to secure any vertex, the blocking pair is recorded: is in 's way and could not move. Failures of agents that were not pushed carry no pusher and are ignored. This yields a list in the order PIBT recorded the failures. Failed pushes are typical of a jam: in a dense configuration a pushed agent often has nowhere to go, so it and its pusher both stay put, and the step either returns itself or shuffles back to a configuration explored earlier.
If no push failed, is empty and is filled by a fallback scan instead: going through the agents in the order , for each agent with we take its neighbour closest to (ties broken by neighbour order), and if another agent stands on , the pair is added, until holds pairs. The scan is rarely needed: on the dense instances of Section 4, a push failed in 97% of jams with the random rule and 94% with the corridor rule.
In both cases, only the first distinct blocking agents in are kept ( by default). Each of them becomes a candidate for a temporary goal (Sec. 3.4).
3.4 Generating Branches
A goal branch is a set of entries , each giving agent the temporary goal with pusher . MAKEBRANCHES takes the first distinct blocking agents of (Sec. 3.3) in order and, for each such agent and the pusher of its first pair in , creates branches using one of two goal rules.
Random rule. Each of the branches is , where is drawn uniformly from the vertices unoccupied in , or, if a radius is given, from those within distance of . Only the blocking agent's goal changes; the rule uses no knowledge of the map.
Corridor rule. The corridor rule instead sends somewhere it is out of 's way. It first works out where is going: is a shortest path from to , and is the dead end must enter, that is, the part of the graph around that cuts off from the rest, provided it is a tree. A pocket is a vertex can reach from without stepping on or entering ; a breadth-first search finds the nearest, preferring free vertices and vertices that are no agent's goal. The rule then queues two kinds of branch, in this order:
Algorithm 1: LaCAM* with Goal-Branching (changes in blue)
1: OPEN, EXPLORED ← , with for all 2: while OPEN do 3: 4: if or then pop OPEN; continue 5: if then record it, update ; continue 6: if then 7: 8: 9: if then INSERT() 10: continue 11: end if 12: 13: 14: if is the root and the step jams and then 15: 16: end if 17: if then INSERT() 18: if the step jammed, and then push 19: end while
-
Retreat, if none of the pockets is free. Since has nowhere to go, makes way instead: a search from that does not pass finds up to vertices off 's shortest path to its goal, and a branch sends to each, so that can pass.
-
Pockets. One branch per pocket sends there. If is occupied by an agent , the branch also sends to its own nearest pocket, with as pusher (recursion).
Each blocking pair therefore yields at most branches with the random rule and with the corridor rule, so a jam queues at most
branches. We use , and (no radius) by default.
3.5 Search with Goal Branches
Algorithm 1 shows the search; text in blue marks Goal-Branching's additions and changes to LaCAM*. The search is a depth-first search over configurations: is the cost of the best solution found so far ( initially), and in first-solution mode the search stops when the first solution is recorded.
INSERT() is LaCAM*'s successor handling. If , the edge is added, costs are rewired, and the existing node is pushed again, or, with a small probability, the start node (LaCAM*'s random restart); the temporary goals are discarded. Otherwise a child with is created and pushed, with obtained from by ageing every record and applying the release rule (Eq. (2)).
Goal-Branching changes the loop in three places. When the unconstrained step at jams (Line 14), the blocking
pairs of that step are turned into a queue of goal branches (Sec. 3.4). If that step reached an explored node other than , INSERT pushes that node, and is then pushed back on top of it (Line 18). Whenever is at the top of OPEN and is non-empty, one branch is tried before 's next constraint (Lines 6–10): its temporary goals are written into a copy of with age 0 and set to the pusher's current distance to its goal, its agents are placed first in the order, and PIBT is run without constraints.
The first branch of is therefore tried at the iteration after the jam: when the jam is a self-loop (, no agent moves), INSERT pushes itself again, and otherwise is pushed back above the explored node. Later branches are consumed one per visit of . A new successor is pushed on top of , so the search continues from it, and the remaining branches are tried only if the search returns to .
None of these changes affects how nodes are identified (by alone), the structure of the constraint tree, or the costs, which is what the analysis in Sec. 3.7 relies on.
3.6 Worked Example
Figure 1 shows Goal-Branching on a seven-cell corridor with two pockets. starts on its goal at the mouth of a dead end that and must both enter, so has to leave the dead end entirely and get past , which is possible only at the far pocket . PIBT instead pushes all three agents into the dead end in the wrong order, and from the search oscillates: the swap technique pulls out, and , first in the priority order, pushes it straight back (b). At this jam every push succeeds: pushes , and can still move back into the pocket, so PIBT records no blocking pair. The fallback is used instead, and since 's best next cell is occupied by , it gives the pair , and the first branch gives the temporary goal with pusher and (c). As a holder, is now planned first. It drives back along the corridor, the two pass using the pocket , and waits at while returns, since arriving at does not release a temporary goal that has a pusher (d). When reaches its goal at , is released (e), and returns to its own goal (f). Goal-Branching solves this instance in 20 search iterations with a single branch, while LaCAM* needs between 1,477 and 3,387 iterations (depending on seed), since the detour takes four cells away from its goal and PIBT never proposes it.
This run is the best case for Goal-Branching. In about half of the runs that reach this jam, a random tie-break makes push first, and that failed push becomes the only blocking pair , so every branch goes to and none resolves the jam. Even with first, only two of the six free vertices, and , take it past , so a random temporary goal works only a third of the time; over all runs, the first branch succeeds in about one in five. The outcome is still reliable, because a poor temporary goal at worst leads to another jam with a fresh set of branches, and the constraint tree remains as a fallback. Over 20 seeds, Goal-Branching needed at most 618 search iterations (median 66.5), against at least 1,477 for LaCAM*.

Figure 1: Worked example (Goal-Branching with the random rule). Circles are agents and is the goal of agent . (a) Start. (b) The swap technique pulls out of the pocket at , but at the highest-priority agent pushes it back, so the step returns to an explored configuration. (c) Goal-Branching gives the temporary goal with pusher . (d) leads, steps into the pocket , and passes to . (e) reaches its goal and is released. (f) Final solved configuration.
3.7 Theoretical Properties
Let be the (finite) set of configurations. Each jam fills at most once, with at most branches (Sec. 3.4).
Lemma 1 (Okumura 2023b). For any node and any fixed agent order , if is consumed entirely, every configuration with is generated as a successor of .
Proof. A low-level node at depth constrains every agent, one per level in the order , and every combination of moves appears at that depth. The constrained configuration is exactly , and it is generated whenever it is collision-free.
Theorem 1 (Completeness). For any temporary-goal selection rule, LaCAM* with Goal-Branching returns a solution in finite time if one exists, and otherwise terminates reporting that none exists.
Proof. Termination. Each iteration either pops a node from OPEN, consumes one branch from some , or consumes one low-level node from some , and pushes at most one node, plus itself after a jam (at most once per node), plus nodes whose -value strictly decreases during rewiring, which happens finitely often since -values are non-negative integers. is finite and each configuration is inserted into the explored set at most once, so there are finitely many high-level nodes. Each has a finite constraint tree and at most branches, so the consumable items are finite, the number of pushes is finite, and the search terminates.
Correctness of a negative answer. Suppose the search terminates with OPEN empty and no goal found. A node leaves OPEN only once is exhausted. (Before a solution exists, no node is discarded by the -bound.) Every high-level node therefore had its constraint tree consumed. By Lemma 1, applied with each node's own fixed order, every successor of every generated configuration was itself generated. The generated configurations are thus closed under , and contain every configuration reachable from . Since was not among them, no solution exists.
Validity of a positive answer. Every edge in the returned path is either a constraint-tree successor or a branch successor. In both cases it is a configuration produced by PIBT from its parent, hence a collision-free transition. Temporary goals change which transitions PIBT proposes, never whether they are collision-free.
Proposition 1 (Eventual optimality). Under the conditions for which LaCAM* is eventually optimal (Okumura 2023a), so is LaCAM* with Goal-Branching.
Proof. Edge costs and -values are computed from the real goals and never from . They are therefore the same functions of configurations as in LaCAM*, and remains admissible. Every branch successor is a valid transition and is recorded as a neighbour edge, either at creation or by rewiring, so Goal-Branching adds only true edges of the configuration graph. Nodes are discarded only when , exactly as in LaCAM*, and every other node has its constraint tree exhausted. By Lemma 1, every edge LaCAM* would discover is therefore discovered. Dijkstra rewiring over a superset of correctly weighted edges converges to the same optimal cost, so the argument of Okumura (2023a) applies unchanged.
Proposition 2 (Conservative extension). Fix an instance and a random seed. If, in the run of LaCAM*, the unconstrained PIBT step of every expanded node produces a configuration not yet explored, then LaCAM* with Goal-Branching generates the same sequence of nodes and returns the same solution.
Proof. By induction over iterations, the two runs have identical OPEN, explored set, node priorities and orders, and random-number state. With no jam, no branch is queued, so for every node and agent, and every effective goal equals the real goal. PIBT's move ranking, swap checks and random tie-breaks are then identical. The priority boost adds nothing, so is identical. Jam detection only queries the explored set and draws no random numbers. Releasing temporary goals is a no-op. Hence each iteration produces the same successor in both runs, and since the hypothesis guarantees that no jam occurs in the Goal-Branching run either, the induction goes through. □
4 Experiments
4.1 Setup
We implemented Goal-Branching on top of the reference implementation of LaCAM* (lacam2) in C++, so that the only differences from LaCAM* are those described in Section 3. All experiments were run on an AMD Ryzen 5 7600X under WSL2. Each run used a single thread pinned to its own physical core, with four runs in parallel, a time limit of 30 s and a memory limit of 5 GB. A run that exceeded either limit counts as a failure.
We used six 32 × 32 maps from the MovingAI benchmark (Stern et al. 2019). Three of them contain narrow corridors and dead ends (maze-32-32-2, maze-32-32-4 and room-32-32-4), and three are open (random-32-32-10, random-32-32-20 and empty-32-32). The benchmark's scenarios contain at most half as many agents as free cells, so we generated 25 denser scenarios per map, drawing starts and goals uniformly at random from the free cells and using the first agents of each scenario for an instance with agents. Densities range from 60% to 90% of the free cells on the bottleneck maps and from 70% to 95% on the open maps, in steps of 5%. Each instance is run with five random seeds (0–4), giving 125 runs per map and density. Tables give values over all runs and, where useful, the standard deviation across the five seeds.
We compare Goal-Branching with the random and corridor rules () against LaCAM* (lacam2, commit 61a4c40) and LaCAM3 (Okumura 2024) (commit 1c3ecf8), all stopping at their first solution. Both baselines use their default parameters, except that LaCAM3 is run single-threaded and without its anytime refinement (-no-star -no-multi-thread). We report the success rate within the time and memory limits, the time to the first solution, and the sum of costs divided by the sum of start-to-goal distances, a lower bound on the optimal sum of costs.
4.2 Dense Instances
Figure 2 and Table 1 show the results on the three bottleneck maps. Goal-Branching solves 89% of the 2,625 runs with either goal rule, against 44% for LaCAM* and 33% for LaCAM3. The advantage holds on every map and grows with density. LaCAM* solves fewer than half of the runs from 70% density on maze-32-32-2 and from 80% on the other two maps, and none above 80%, while Goal-Branching still solves 52–72% of the runs at 85% on the mazes and the random rule solves every run on room-32-32-4 at 90%. Goal-Branching with the random rule solved 1,161 runs that LaCAM* did not, and LaCAM* solved none that it did not.
Time and cost in Figure 2 are taken over each solver's own solved runs, so once a solver starts failing they reflect only the instances it could still solve. Table 1 therefore also compares Goal-Branching and LaCAM* on the runs both solved. On these runs Goal-Branching finds its first solution 13.8 times
| Map | Solved (%) | Speed-up | Cost | |||||
|---|---|---|---|---|---|---|---|---|
| L* | L3 | GB-r | GB-c | GB-r | GB-c | GB-r | GB-c | |
| maze-2 | 30±1 | 28±1 | 86±2 | 87±2 | 13.8× | 9.7× | 1.36 | 1.30 |
| maze-4 | 53±2 | 27±3 | 80±1 | 80±1 | 1.9× | 2.0× | 1.26 | 1.14 |
| room-4 | 50±1 | 45±2 | 100±0 | 100±0 | 10.6× | 9.7× | 1.10 | 1.08 |
| all | 44±1 | 33±1 | 89±1 | 89±1 | 5.7× | 5.2× | 1.22 | 1.15 |
Table 1: Dense bottleneck maps, 60–90% density, 875 runs per map; maze-2, maze-4 and room-4 are maze-32-32-2, maze-32-32-4 and room-32-32-4. L*/L3: LaCAM*/LaCAM3; GB-r/GB-c: Goal-Branching with the random/corridor rule. Speed-up and cost relative to LaCAM* (speed-up > 1 is faster): geometric mean over runs that both LaCAM* and the GB variant solved. Subscripts: standard deviation of the solved % across the five seeds. GB-r solved 1,161 runs that LaCAM* did not, and LaCAM* none that GB-r did not.
faster on maze-32-32-2 and 10.6 times faster on room-32-32-4 (geometric means), and at 75% density on room-32-32-4 the median time falls from 8.2 s to 0.04 s. On maze-32-32-4 the gain on the runs both solve is smaller (1.9 times faster on average, with a median of 1.21), and most of the gain there is in the runs LaCAM* cannot solve at all. Figure 3 shows the same picture as a function of the time budget. LaCAM3 is slower than LaCAM* throughout, because before searching it computes spread-out guide paths for the agents, which costs time on every instance.
Solutions found by Goal-Branching cost 22% more than those of LaCAM* on the runs both solved (10% on room-32-32-4 and 26–36% on the mazes). On the densest instances, where LaCAM* solves fewer than five of the 125 runs, first solutions are much longer, with median costs of about 60 to 360 times the lower bound (random rule), and over 900 times at 90% on maze-32-32-4. The two goal rules perform similarly. The random rule solves 2,327 runs and the corridor rule 2,340, with 79 and 92 runs solved by only one of them (), and the corridor rule's solutions are 11% cheaper, at a cost of 18% more time.
4.3 Open Maps
On the open maps, all solvers solve 98–100% of the runs, and Goal-Branching behaves almost exactly like LaCAM* (Table 2). On random-32-32-10 and empty-32-32 it takes at most 3% more time on the runs both solve, and its solutions cost the same; 84–91% of its plans are identical to those of LaCAM*, and, as Proposition 2 predicts, every run without a jam returns exactly LaCAM*'s plan. On random-32-32-20 jams are more common and only 28–29% of plans are identical, but Goal-Branching is about 15% faster there and its solutions are 1–4% cheaper. LaCAM3 solves 99–100% of the runs on these maps and finds cheaper first solutions, but takes 19 to 28 times longer than LaCAM*.
4.4 MovingAI Benchmarks
Finally, we also ran the four solvers on all 33 maps of the MovingAI benchmark (Stern et al. 2019), with the 25 random scenarios of each map at 20, 40, 60, 80 and 100% of the

Figure 2: Dense bottleneck maps: success rate (top), time to first solution (middle) and sum of costs relative to the lower bound (bottom) against density, with agent counts along the top. Time and cost are medians over solved runs, shown where at least 5 runs were solved; the dotted line is the 30s time limit. 125 runs per point (25 scenarios, five seeds). Error bars: range of the per-seed success rate (top) and interquartile range (middle, bottom).
scenario's agents (at most 1,000), 4,125 runs per solver under the same limits with seed 0. All four solved every run on 32 of the maps. On the remaining map, maze-128-128-1, GB-r solved 121 of 125 runs against 80 for LaCAM*, 90 for GB-c and 69 for LaCAM3; GB-r solved 41 runs that LaCAM* did not, and LaCAM* none that GB-r did not. GB-r never jammed on 92.7% of the runs it solved, and on every one of them it returned exactly the plan of LaCAM*. Over the 4,080 runs both solved, the geometric means of its time to first solution and cost relative to LaCAM* were 1.00 and 1.001. LaCAM3 was about ten times slower than LaCAM* on the runs both solved, but its plans were 19% cheaper.
4.5 Ablation
We evaluated variants of Goal-Branching on the three bottleneck maps at three high densities each (70–80% on maze-32-32-2, 75–85% on maze-32-32-4 and 80–90% on room-32-32-4), with the same 25 scenarios and three random seeds
| Map | Speed-up | Identical plans | ||
|---|---|---|---|---|
| GB-r | GB-c | GB-r | GB-c | |
| random-32-32-10 | 84% | 84% | ||
| random-32-32-20 | 29% | 28% | ||
| empty-32-32 | 91% | 91% | ||
Table 2: Open maps, 70–95% density, 750 runs per map. All solvers solve 98–100% of runs. Speed-up: LaCAM*’s time to first solution over Goal-Branching’s, on runs both solved (geometric mean with SD across seeds; > 1 is faster); cost is within 0.96–1.00. Identical plans: runs where Goal-Branching returns exactly LaCAM*’s plan.
each, giving 675 runs per variant (Table 3). Trying a jammed node's first branch immediately matters most. Without it, 28 fewer runs are solved (), with fewer on every map, and on the runs both solve, first solutions take about twice as

Figure 3: Runs solved against time to first solution, pooled over the three bottleneck maps (2,625 runs per solver). A point at means the solver solved runs within seconds; the legend gives the number solved within 30 s.
long and cost 31% more. The number of temporary goals per blocking agent () and the number of blocking agents per jam () make no significant difference, so Goal-Branching is not sensitive to how many branches it queues, and shortening the hold limit to solves exactly as many runs. Restricting random goals to within distance 8 of the blocking agent, however, solves 131 fewer runs, which suggests that good temporary goals are often far from the blocking agent. We also tested two other ways of choosing blocking pairs. A failure recorded during PIBT is absorbed if an agent further up the same chain still obtains a vertex as good as its best option, as when a pushed agent fails but its pusher simply takes another, equally good vertex. Such failures may suggest temporary goals for agents that were not really in the way, so the first variant discards them (no absorbed). The second ignores PIBT's failures altogether and always uses the fallback pairs of Section 3.3 (fallback only). Discarding absorbed failures makes no difference (one more run solved, ). Using only the fallback pairs solves 16 fewer runs (; more on maze-32-32-2 but fewer on the other maps) and roughly doubles the cost of solutions, so the pairs taken from PIBT's failures lead to cheaper solutions and, overall, to more solved runs. The corridor rule solves about as many runs as the random rule (one more, ), and its solutions are 16% cheaper, at a cost of 22% more time. Removing recursion from the corridor rule makes no difference (two more runs solved, ), but then removing retreat as well solves 31 fewer runs (), and its solutions cost 21% more.
5 Discussion
Overall, Goal-Branching consistently improves LaCAM* on dense instances with corridors and dead ends, both in the number of instances solved and in the time to a first solution, and costs almost nothing on open maps, where it is never more than 3% slower and is faster on random-32-32-20. The random rule is as reliable as the corridor rule on the
| Variant | Solved | Δ | p | Speed-up | Cost |
|---|---|---|---|---|---|
| Goal-Branching (default) | 622 | - | - | 1.00 | 1.00 |
| No immediate branches | 594 | -28 | <.001 | 0.51 | 1.31 |
| K = 1 | 619 | -3 | .70 | 0.97 | 1.02 |
| K = 5 | 614 | -8 | .22 | 1.00 | 1.01 |
| P = 1 | 619 | -3 | .74 | 0.98 | 1.01 |
| P = 8 | 616 | -6 | .39 | 1.00 | 1.03 |
| H = 16 | 622 | 0 | 1.0 | 0.99 | 0.97 |
| Radius R = 8 | 491 | -131 | <.001 | 0.48 | 1.08 |
| Pairs: no absorbed | 623 | +1 | 1.0 | 0.85 | 1.04 |
| Pairs: fallback only | 606 | -16 | .023 | 0.68 | 1.94 |
| Corridor rule | 623 | +1 | 1.0 | 0.82 | 0.84 |
| no recursion | 625 | +2 | .69 | 1.02 | 1.01 |
| no retreat | 594 | -31 | <.001 | 0.87 | 1.21 |
Table 3: Ablation on 675 dense runs (maze-32-32-2, maze-32-32-4, room-32-32-4; three densities each). Default: random rule, K=3, P=4, H=64. No immediate branches: a jammed node's goal branches are tried only when the search returns to it. : solved relative to the default, or for the indented rows, relative to the row above; p: McNemar exact test; Speed-up: time to first solution of the reference over the variant's (> 1 is faster); Cost: sum of costs relative to the reference. Speed-up and cost are geometric means over runs both solved.
dense maps and more reliable on maze-128-128-1, and the method is insensitive to how many branches it creates. This suggests that Goal-Branching's strength lies less in choosing a good temporary goal than in the search's ability to try several as soon as a jam occurs and recover from poor ones, as long as temporary goals can be far from the blocking agent. The corridor rule finds cheaper solutions but is slower, and its pocket search cannot look past the pusher, which limits it on instances like our worked example. The main cost of Goal-Branching is solution quality, since its first solutions are longer than those of LaCAM*, although LaCAM*'s anytime refinement applies unchanged. Considering these observations, our suggestion is to use the random rule with its default parameters, and the corridor rule when solution cost matters more than runtime.
Implementing Goal-Branching on top of LaCAM* is the safe choice because the existing constraint framework means that temporary goals that lead to failure or to repeated configurations are handled by the high-level search. We are also interested in applying this approach to PIBT alone, without LaCAM*'s guarantees, to understand whether it can reduce or even eliminate deadlocks in PIBT. This will require a much more careful selection of temporary goal locations, since there is no search to recover from a poor choice.
Temporary goal branches can be thought of as a single example of inserting informed branches into LaCAM*'s search ahead of its constraint tree. Our completeness proof only requires that each node receives finitely many extra successors and that each of them is a valid transition, so other kinds of branches could be added in the same way. Other examples could include evacuation plans from rule-based planners such as MACGA, rotations of several agents around a cycle, or PIBT steps that use a different tie-breaking rule such as hindrance.
We also believe that intelligent heuristics for the location of temporary goals could improve Goal-Branching further. Our corridor rule does not solve significantly more instances than random goals, although its solutions are 11–16% cheaper, and restricting random goals to nearby vertices makes Goal-Branching much worse (Section 4.5), which suggests that good temporary goals are often far from the blocking agent. The worked example shows why, because the corridor rule only looks for pockets on the near side of the pusher and so can never send past to the far pocket. A rule that can look past the pusher, or one that learns where temporary goals tend to succeed, might keep the reliability of random goals while lowering solution cost.
6 Conclusion
We presented Goal-Branching, an extension of LaCAM that responds to jams in PIBT by giving blocking agents temporary goals and trying each choice as a separate branch of the search. Goal-Branching preserves completeness and eventual optimality for any rule for choosing temporary goals. On dense instances with corridors and dead ends it solves substantially more instances than LaCAM , often an order of magnitude faster, and on the full MovingAI benchmark it never solves fewer runs and matches LaCAM 's cost and speed on average. Promising directions for future work are goal-selection rules that reduce solution cost, and combining Goal-Branching with methods that improve PIBT's move preferences, such as hindrance.
References
Arita, T.; and Okumura, K. 2026. Local Guidance for Configuration-Based Multi-Agent Pathfinding. In Koenig, S.; Jenkins, C.; and Taylor, M. E., eds., Fortieth AAAI Conference on Artificial Intelligence, Thirty-Eighth Conference on Innovative Applications of Artificial Intelligence, Sixteenth Symposium on Educational Advances in Artificial Intelligence, AAAI 2026, Singapore, January 20-27, 2026, 29296–29304. AAAI Press.
de Wilde, B.; ter Mors, A.; and Witteveen, C. 2013. Push and rotate: cooperative multi-agent path planning. In Gini, M. L.; Shehory, O.; Ito, T.; and Jonker, C. M., eds., International conference on Autonomous Agents and Multi-Agent Systems, AAMAS '13, Saint Paul, MN, USA, May 6-10, 2013, 87–94. IFAAMAS.
Fu, B.; Chen, Z.; Chandan, R.; Barbosa, A. O. G.; Caldara, M.; Durham, J. W.; and Pecora, F. 2025. Symbolic Planning and Multi-Agent Path Finding in Extremely Dense Environments with Movable Obstacles. CoRR, abs/2509.01022.
Fujitani, Y.; Yamauchi, T.; Miyashita, Y.; and Sugawara, T. 2022. Deadlock-Free Method for Multi-Agent Pickup and Delivery Problem Using Priority Inheritance with Temporary Priority. In Cristani, M.; Toro, C.; Zanni-Merk, C.; Howlett, R. J.; and Jain, L. C., eds., Knowledge-Based and Intelligent Information & Engineering Systems: Proceedings of the 26th International Conference KES-2022, Verona, Italy and Virtual Event, 7-9 September 2022, volume 207 of Procedia Computer Science, 1552–1561. Elsevier.
Jain, R.; Okumura, K.; Amir, M.; and Prorok, A. 2026. Graph Attention-Guided Search for Dense Multi-Agent Pathfinding. In Koenig, S.; Jenkins, C.; and Taylor, M. E., eds., Fortieth AAAI Conference on Artificial Intelligence, Thirty-Eighth Conference on Innovative Applications of Artificial Intelligence, Sixteenth Symposium on Educational Advances in Artificial Intelligence, AAAI 2026, Singapore, January 20-27, 2026, 29504–29512. AAAI Press.
Li, J.; Chen, Z.; Harabor, D.; Stuckey, P. J.; and Koenig, S. 2022. MAPF-LNS2: Fast Repairing for Multi-Agent Path Finding via Large Neighborhood Search. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth Conference on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelfth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, 10256–10265. AAAI Press.
Li, J.; Ruml, W.; and Koenig, S. 2021. EECBS: A Bounded-Suboptimal Search for Multi-Agent Path Finding. In Thirty-Fifth AAAI Conference on Artificial Intelligence, AAAI 2021, Thirty-Third Conference on Innovative Applications of Artificial Intelligence, IAAI 2021, The Eleventh Symposium on Educational Advances in Artificial Intelligence, EAAI 2021, Virtual Event, February 2-9, 2021, 12353–12362. AAAI Press.
Luna, R.; and Bekris, K. E. 2011. Push and Swap: Fast Cooperative Path-Finding with Completeness Guarantees. In Walsh, T., ed., IJCAI 2011, Proceedings of the 22nd International Joint Conference on Artificial Intelligence, Barcelona, Catalonia, Spain, July 16-22, 2011, 294–300. IJCAI/AAAI.
Okumura, K. 2023a. Improving LaCAM for Scalable Eventually Optimal Multi-Agent Pathfinding. In Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, IJCAI 2023, 19th-25th August 2023, Macao, SAR, China, 243–251. ijcai.org.
Okumura, K. 2023b. Lacam: Search-based algorithm for quick multi-agent pathfinding. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, 11655–11662.
Okumura, K. 2024. Engineering LaCAM*: Towards Real-time, Large-scale, and Near-optimal Multi-agent Pathfinding. In Dastani, M.; Sichman, J. S.; Alechina, N.; and Dignum, V., eds., Proceedings of the 23rd International Conference on Autonomous Agents and Multiagent Systems, AAMAS 2024, Auckland, New Zealand, May 6-10, 2024, 1501–1509. International Foundation for Autonomous Agents and Multiagent Systems / ACM.
Okumura, K.; Machida, M.; Défago, X.; and Tamura, Y. 2022. Priority inheritance with backtracking for iterative multi-agent path finding. Artif. Intell., 310: 103752.
Okumura, K.; and Nagai, H. 2025. Lightweight and Effective Preference Construction in PIBT for Large-Scale Multi-Agent Pathfinding. In Likhachev, M.; Rudová, H.; and Scala, E., eds., Eighteenth International Symposium on Combinatorial Search, SOCS 2025, University of Glasgow, Scotland, United Kingdom, August 12-15, 2025, 110–117. AAAI Press.
Pertzovskiy, A.; Stern, R.; Zivan, R.; and Felner, A. 2025. Multi-Agent Corridor Generating Algorithm. In Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2025, Montreal, Canada, August 16-22, 2025, 240–247. ijcai.org.
Pertzovsky, A.; Stern, R.; and Zivan, R. 2024. CGA: Corridor Generating Algorithm for Multi-Agent Environments. In IEEE/RSJ International Conference on Intelligent Robots and Systems, IROS 2024, Abu Dhabi, United Arab Emirates, October 14-18, 2024, 3455–3462. IEEE.
Sharon, G.; Stern, R.; Felner, A.; and Sturtevant, N. R. 2015. Conflict-based search for optimal multi-agent pathfinding. Artif. Intell., 219: 40–66.
Stern, R.; Sturtevant, N. R.; Felner, A.; Koenig, S.; Ma, H.; Walker, T. T.; Li, J.; Atzmon, D.; Cohen, L.; Kumar, T. K. S.; Barták, R.; and Boyarski, E. 2019. Multi-Agent Pathfinding: Definitions, Variants, and Benchmarks. In Surynek, P.; and Yeoh, W., eds., Proceedings of the Twelfth International Symposium on Combinatorial Search, SOCS 2019, Napa, California, 16-17 July 2019, 151–158. AAAI Press.
Wang, Y.; Duhan, T.; Li, J.; and Sartoretti, G. 2025. LNS2+RL: Combining Multi-agent Reinforcement Learning with Large Neighborhood Search in Multi-agent Path Finding. In Walsh, T.; Shah, J.; and Kolter, Z., eds., Thirty-Ninth AAAI Conference on Artificial Intelligence, Thirty-Seventh Conference on Innovative Applications of Artificial Intelligence, Fifteenth Symposium on Educational Advances in Artificial Intelligence, AAAI 2025, Philadelphia, PA, USA, February 25 - March 4, 2025, 23343–23350. AAAI Press.
Wurman, P. R.; D'Andrea, R.; and Mountz, M. 2008. Coordinating Hundreds of Cooperative, Autonomous Vehicles in Warehouses. AI Mag., 29(1): 9–20.
Yu, J.; and LaValle, S. M. 2013. Structure and Intractability of Optimal Multi-Robot Path Planning on Graphs. In des-Jardins, M.; and Littman, M. L., eds., Proceedings of the Twenty-Seventh AAAI Conference on Artificial Intelligence, July 14-18, 2013, Bellevue, Washington, USA, 1443–1449. AAAI Press.