---
title: Multi-Agent Pathfinding Algorithms
url: https://www.emergentmind.com/topics/multi-agent-pathfinding
type: topic
---

# Multi-Agent Pathfinding Algorithms

Multi-Agent Pathfinding (MAPF) is the algorithmic problem of computing collision-free paths for multiple agents so that each agent reaches its assigned goal from its start location. The critical challenge is ensuring that all agents can execute their paths concurrently without colliding, under various assumptions on environment structure, agent constraints, time discretization, and objectives. MAPF is central in robotics, logistics, computer games, automated warehouses, autonomous vehicles, and many large-scale coordination domains.

## 1. Formal Foundations and Classical Problem Definition

Classical MAPF is defined as the tuple $\langle G, s, t \rangle$, where $G = (V, E)$ is a (typically undirected) graph, $s: [1, \ldots, k] \rightarrow V$ and $t: [1, \ldots, k] \rightarrow V$ assign start and target vertices for each of $k$ agents. Time is discretized. Agents move synchronously through $G$, choosing at each timestep either to wait at their current vertex or to advance along an adjacent edge. A plan for agent $i$ is a sequence $\pi_i$ of actions $a : V \rightarrow V$ such that $\pi_i[0] = s(i)$, $\pi_i[|\pi_i|] = t(i)$, and every $a(\cdot)$ is either the identity (wait) or moves along an edge.

The challenge emerges from enforcing non-collision constraints so that agents may execute these plans without interfering. Multiple conflict types have been formalized:

- **Vertex conflict**: $\exists x: \pi_i[x] = \pi_j[x]$
- **Edge conflict**: $\exists x: \pi_i[x]=\pi_j[x], \pi_i[x+1]=\pi_j[x+1]$
- **Following, cycle, and swapping conflicts**: Variants involving agents following, cycling, or swapping vertices at the same time.

Additional modeling assumptions include whether agents "stay at target" or "disappear at target" upon arrival (with significant consequences for the cost objective), and whether time is uniformly discretized or continuous [1906.08291].

MAPF is typically NP-hard and remains intractable for many optimality objectives, mandating sophisticated exact or bounded-suboptimal algorithms for real-world domains.

## 2. Objectives, Variants, and Extensions

MAPF research has formalized diverse objectives and extensions [1906.08291]:

| Objective          | Formula                                                                | Context                |
|--------------------|------------------------------------------------------------------------|------------------------|
| Makespan          | $\max_{i=1}^k |\pi_i|$                                                | Time until last agent  |
| Sum-of-costs      | $\sum_{i=1}^k |\pi_i|$                                                | Collective efficiency  |

Classical MAPF can be extended in several directions:
- **Weighted Graphs**: Edge traversal times are not uniform; e.g., diagonal moves cost $\sqrt{2}$.
- **Large Agents and Kinematics**: Agents may have non-point geometry, volume, or complex dynamics (e.g., orientation, minimum-radius turns). This necessitates geometric and temporal conflict checking as in car-like MAPF [2011.00441] and large-agent MAPF [2208.12236].
- **Continuous-Time and Any-Angle MAPF**: Time may be modeled as a continuous variable, with agents executing actions of arbitrary, non-uniform durations and traversing arbitrary straight-line (any-angle) paths [1901.05506, 2404.16379].
- **Dynamic and Online MAPF**: Agents, start/goal pairs, and obstacles may appear on-the-fly, with replanning and reallocation requirements [2301.04446].
- **Movable Obstacles ("Terraforming")**: Some agents can manipulate the environment by moving obstacles to relieve congestion [2203.10540].

## 3. Algorithmic Methodologies

**Conflict-Based Search (CBS) and Beyond:**  
CBS is a canonical optimal solver for classical MAPF. It performs a two-level search:
- High-level: Maintains a constraint tree (CT), where each node corresponds to a set of forbidden agent-time vertex/edge occupancies.
- Low-level: Computes single-agent shortest paths consistent with the accumulated constraints (typically via A* or variants).

CBS has been generalized:
- **Continuous-Time Conflict-Based Search (CCBS) [1901.05506]:** Removes assumptions of discrete timesteps, unit-duration actions, and point agents. CCBS detects conflicts using geometry (disk agents), formulates them as $(a_i, t_i, a_j, t_j)$, and introduces *unsafe intervals* (continuous forbidden time ranges per action). The low-level is adapted Safe Interval Path Planning (SIPP): per-agent, per-location plans over maximal safe time intervals.
- **Car-like CBS (CL-CBS) [2011.00441]:** Introduces a body conflict tree, works with kinematic constraints (steering angle, velocity bounds), and uses a hybrid-state A* planner in $(t, x, y, \theta)$ space.
- **Decentralized and Distributed Methods [2106.05188, 2106.11365]:** Agents may plan in decentralized or distributed settings, negotiating plans with local resource managers (as "Routers"), or via multi-agent learning with local communication (using graph convolution).
- **Online MAPF with Sustainable Information [2301.04446]:** Proactively reuses prior search context to allow rapid incremental replanning as agents/obstacles are introduced.
- **MAPF with Movable Obstacles ("Terraforming") [2203.10540]:** Extends CBS/PBS with mover agents and additional constraints to prevent premature access to locations still blocked by movable obstacles.

For large or nonholonomic agents, reductions to "pebble motion" problems, edge-clearing routines, and kinematic simulation become central [2208.12236]. Performance and completeness trade-offs become especially stark when dealing with complex geometry or large agent populations.

## 4. Learning-Based and Data-Driven Approaches

Recent work applies deep reinforcement learning, communication-aware neural planning, and imitation learning to MAPF:

- **Cooperative RL and Reward Shaping [2407.10403]:** Independent Q-learning (IQL) is augmented with a cooperative reward term that reflects the expected benefit to neighbors through each agent's actions, decoupled via a local maximization, promoting cooperation despite decentralized execution.
- **Graph Transformers and Global Context [2310.08350, 2502.06440]:** ALPHA uses graph transformers to fuse local grid observations with abstracted global graph features and short-term intention prediction. SIGMA introduces a sheaf-theoretic latent consensus mechanism, aligning latent representations ("stalks") of neighboring agents via self-supervised loss that enforces consistency, enabling decentralized but globally coordinated decision-making.
- **Pure Imitation Learning Foundation Models [2409.00134, 2506.23793]:** MAPF-GPT is trained on millions of expert trajectories, tokenizing per-agent neighborhoods and context; the model operates non-autoregressively and demonstrates zero-shot generalization. MAPF-GPT-DDG introduces a delta-data generation mechanism for focused, active fine-tuning: problematic states with maximal solution cost increase along a trajectory are identified and relabeled with expert solutions, accelerating fine-tuning and improving both success rates and cost efficiency for massive scale (up to one million agents).

Empirically, such neural models rival or surpass earlier centralized planners for density and scale, especially when equipped with global context or consensus mechanisms.

## 5. Practical Benchmarks and Empirical Methodology

Benchmarking is facilitated by a suite of grid-based and domain-specific environments [1906.08291]:
- **Open grids, maze-like, urban/city, warehouse, and game maps**, with scenario generators for randomized source–target assignment and increasing agent counts.
- **Performance metrics**: Fraction of instances solved (within a computational budget), average sum-of-costs (SOC), makespan, and computational time.
- **MAPF variants with large agents, movable obstacles, or dynamic/online conditions** are evaluated for solution quality, throughput, adaptability, and computational scalability.
- **Distributed/cloud platforms**: Decentralized and distributed algorithms exploit multi-core or multi-host execution, crucial for scalability in practical deployments.

Experiments repeatedly demonstrate trade-offs:
- **Solution quality vs. runtime**: Exploiting continuous-time and any-angle motion [1901.05506, 2404.16379] or learned cooperation [2310.08350, 2409.00134] yields lower SOC but may increase computation or require increased data/model/communication complexity.
- **Completeness vs. speed**: Decentralized and distributed methods [2106.05188, 2106.11365] offer fast convergence at the expense of solution optimality.
- **Heuristic acceleration**: Conflict-based planners benefit from hybrid cardinal/past-conflicts heuristics and multi-constraint pruning to reduce the search tree expansion (notably necessary in continuous and any-angle settings [2404.16379]).

## 6. Applications and Advanced Variants

MAPF is integral to domains such as:
- **Automated warehouses**: Coordinated fleets of robots must avoid collisions in dense, obstacle-rich layouts [1906.08291, 2203.10540].
- **Autonomous driving and urban mobility**: Coordination for nonholonomic, car-like agents with realistic physical constraints [2011.00441].
- **Large-scale logistics and rescue**: Planning for hundreds to millions of agents in real-time, both in simulation and robotic field deployments [2506.23793].
- **Exploration and adaptive sampling**: Information-driven MAPF formulations optimize both coverage and information gain, framed as multi-agent POMDPs with mutual information-based heuristics and dynamic distributed planning based on communication proximity [2409.13065].
- **Quantum-classical and diffusion-based methods**: Quantum annealing subroutines address combinatorial bottlenecks in branch-and-cut-and-price hybrid methods [2501.14568], while projected diffusion models generate continuous-space, constraint-satisfying trajectories via a combination of sampling and augmented Lagrangian projection [2412.17993].

## 7. Open Problems, Challenges, and Future Directions

Key research directions and open challenges in MAPF include:
- **Optimality vs. Scalability**: Achieving optimal or bounded suboptimal solutions on very large or continuous domains remains challenging; hybridizations (e.g., bounded-suboptimal algorithms, incremental replanning, multi-constraint pruning) help bridge the gap [2404.16379].
- **Expressivity for Realistic Agents**: Extending methods to nonholonomic, high-dimensional, continuous, or deformable agents, and integrating complex task constraints.
- **Integrating Learning and Combinatorial Search**: Combining high-capacity learned policies with search-based or optimization-based planning for robustness and adaptability.
- **Information Gathering and Lifelong MAPF**: Jointly optimizing for collision-free execution and multi-agent active sensing, especially under limited and dynamic communication [2409.13065].
- **Distributed, Decentralized, and Explainable Solvers**: Developing practical, scalable algorithms that operate with minimal centralized communication and provide explainable feedback and plan revision capabilities [2109.08299, 2301.04446].

Comprehensive MAPF research now spans foundational combinatorial algorithms, learning and optimization-based techniques, and application-driven variants. Ongoing progress continues to drive both theoretical advancements and practical deployment in increasingly complex, real-world multi-agent environments.

Source: https://www.emergentmind.com/topics/multi-agent-pathfinding