Inferensys

Glossary

Conflict-Based Search (CBS)

Conflict-Based Search (CBS) is a two-level optimal algorithm for Multi-Agent Path Finding (MAPF) that resolves agent collisions by searching a tree of constraints at a high level and finding individual paths at a low level.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
MULTI-ROBOT COORDINATION

What is Conflict-Based Search (CBS)?

Conflict-Based Search (CBS) is a leading, optimal algorithm for solving the Multi-Agent Path Finding (MAPF) problem, which is fundamental to coordinating robots, warehouse automation, and video game character movement.

Conflict-Based Search (CBS) is a two-level, optimal algorithm for Multi-Agent Path Finding (MAPF) that systematically resolves collisions by searching a tree of constraints. At the high level, it detects conflicts—where two agents occupy the same location at the same time—and branches to impose constraints that forbid specific agents from being in that spatio-temporal cell. At the low level, a fast single-agent pathfinder (like A*) is called for each agent to find an optimal path that respects the current set of constraints. This hierarchical decoupling allows CBS to guarantee finding a conflict-free, optimal solution, typically minimizing the sum of costs (e.g., total time steps) for all agents.

The algorithm's power lies in its constraint tree, where each node represents a set of constraints and the corresponding individual agent paths. CBS expands the tree by resolving the most promising conflict, creating child nodes with new constraints. Its optimality is proven, but its primary limitation is scalability; the search space grows exponentially with the number of agents and conflicts. Variants like CBS with Prioritization (CBS-P) and Enhanced CBS (ECBS) introduce sub-optimality bounds to dramatically improve speed for large-scale problems, making it practical for real-world heterogeneous fleet coordination in logistics and autonomous mobile robot systems.

MULTI-AGENT PATH FINDING ALGORITHM

Key Characteristics of CBS

Conflict-Based Search (CBS) is a two-level, optimal algorithm for Multi-Agent Path Finding (MAPF). Its defining architecture separates high-level conflict resolution from low-level path planning, creating a systematic search for collision-free solutions.

01

Two-Level Search Architecture

CBS operates on two distinct levels:

  • High-Level (Constraint Tree Search): This level searches a binary tree where each node represents a set of constraints imposed on agents to resolve conflicts (e.g., "Agent A cannot be at cell (5,3) at timestep 7"). The algorithm expands nodes by identifying the first conflict in the current solution and creating two child nodes, each adding a constraint to one of the conflicting agents.
  • Low-Level (Single-Agent Planner): For each agent, a low-level search (typically A*) finds an optimal path from start to goal that satisfies all constraints currently assigned to that agent from the high-level node. This separation is key to CBS's optimality and modularity.
02

Optimality Guarantee

CBS is provably optimal for common MAPF cost functions like Sum of Costs (total timesteps for all agents) or Makespan (maximum finish time). It guarantees finding a conflict-free solution with the minimum possible cost because:

  • The high-level tree is systematically explored.
  • The low-level planner is optimal for the single-agent problem given its constraints.
  • The algorithm only prunes branches of the constraint tree when it can prove no better solution exists below them, ensuring no optimal solution is missed.
03

Constraint-Based Conflict Resolution

Conflicts are the core abstraction. A conflict is a tuple (a_i, a_j, v, t) where agents a_i and a_j occupy the same vertex v at timestep t (vertex conflict) or swap positions along an edge (edge conflict).

  • Resolution: CBS resolves a conflict by generating vertex constraints (a_i, v, t) or edge constraints (a_i, u, v, t).
  • Propagation: These constraints are passed to the low-level planners, which must replan paths that avoid the specified state at the given time. This method transforms a multi-agent problem into a series of constrained single-agent problems.
04

Primary Use Cases & Examples

CBS excels in structured, discrete environments where optimality is critical:

  • Warehouse Automation: Coordinating fleets of Autonomous Mobile Robots (AMRs) on a grid-based factory floor to move goods from shelves to packing stations without deadlocks.
  • Video Game AI: Planning optimal, collision-free paths for multiple non-player characters (NPCs) in strategy or simulation games.
  • Aircraft Towing: Scheduling optimal, conflict-free routes for vehicles towing planes on airport aprons.
  • Multi-Drone Delivery: Planning precise takeoff, flight, and landing sequences for a swarm of delivery drones in an urban airspace grid.
05

Advantages Over Alternatives

Compared to other MAPF approaches, CBS offers distinct benefits:

  • Optimality: Unlike reactive or prioritized planning, CBS guarantees an optimal solution.
  • Completeness: It will find a solution if one exists, unlike some heuristic methods.
  • Modularity: The low-level planner can be swapped (e.g., using Dijkstra's for weighted graphs) without altering the high-level logic.
  • Conceptual Clarity: The constraint-tree visualization makes the search process and conflict resolution transparent and debuggable.
06

Limitations and Computational Complexity

CBS's strengths come with trade-offs:

  • Scalability: The number of high-level tree nodes can grow exponentially with the number of agents and complexity of the environment. It is typically used for tens of agents, not hundreds.
  • Memory Usage: The entire constraint tree must be stored during search, which can be large.
  • Runtime: While optimal, it can be slower than suboptimal but fast algorithms like Prioritized Planning or Windowed Hierarchical Cooperative A* (WHCA*).
  • Continuous Domains: CBS is designed for discrete, graph-based environments. Applying it to continuous state spaces requires significant discretization.
MULTI-AGENT PATH FINDING ALGORITHM

How Conflict-Based Search (CBS) Works

Conflict-Based Search (CBS) is a leading, two-level algorithm for solving the Multi-Agent Path Finding (MAPF) problem optimally, ensuring collision-free paths for multiple robots or agents in a shared space.

Conflict-Based Search (CBS) is an optimal, two-level algorithm for Multi-Agent Path Finding (MAPF) that resolves collisions by searching a tree of constraints. At the high level, a constraint tree (CT) is built where each node contains a set of constraints (e.g., prohibiting an agent from being at a specific location at a specific time) and a solution where each agent's path satisfies its current constraints. The algorithm expands the tree by identifying the first conflict (e.g., a vertex or edge collision) between any two agents in the current solution and creating child nodes that add a new constraint for each agent involved in that conflict to resolve it.

The low level of CBS is a series of fast, single-agent A searches* that find the shortest path for an individual agent from start to goal, subject to the specific set of constraints passed down from the high-level node. This hierarchical decomposition separates the complexity of multi-agent coordination from efficient single-agent planning. CBS guarantees optimality (minimizing the sum of individual path costs) because the high-level search systematically explores all possible ways of resolving conflicts through constraints until it finds a conflict-free solution with the lowest total cost.

ALGORITHM COMPARISON

CBS vs. Other MAPF Approaches

A feature and performance comparison of Conflict-Based Search against other major algorithmic families for solving the Multi-Agent Path Finding problem.

Algorithmic Feature / MetricConflict-Based Search (CBS)Decoupled / Prioritized PlanningCentralized (A* with Joint State)Reactive / Local (e.g., ORCA)

Core Paradigm

Two-level optimal search (Constraint Tree)

Sequential path planning with priority ordering

Monolithic joint state-space search

Continuous velocity selection based on local sensing

Solution Guarantee

Optimal (w.r.t. sum-of-costs or makespan)

Suboptimal (highly priority-dependent)

Optimal (exhaustive)

No guarantee; may deadlock

Primary Search Space

Constraint space (high-level) & individual graphs (low-level)

Sequence of individual agent graphs

Exponential joint state space (Π |V_i|)

Continuous velocity space

Scalability (Agent Count)

Medium (tens of agents)

High (hundreds of agents)

Very Low (≤ 4 agents)

Very High (hundreds of agents)

Handles Complex Agent Kinematics

Computational Complexity

High (exponential in worst-case conflicts)

Low (linear in number of agents)

Very High (exponential in agents)

Very Low (constant per agent)

Typical Use Case

Warehouse logistics, structured automation

Video game NPCs, initial feasible plans

Academic benchmarking, small proof-of-concept

Crowd simulation, dynamic drone swarms

Plan Execution

Pre-computed, time-indexed paths

Pre-computed, time-indexed paths

Pre-computed, time-indexed paths

Online, continuous control

Requires Global Coordination

Robust to Agent Failures

Standard Benchmark Performance (Success Rate)

95% (on dense, structured maps)

~70-85% (priority-dependent)

100% (for solvable instances)

~60-80% (prone to livelock)

Memory Overhead

High (stores entire constraint tree)

Low (stores individual paths)

Prohibitively High (stores joint state)

Negligible (local state only)

MULTI-ROBOT COORDINATION SYSTEMS

Applications and Use Cases

Conflict-Based Search (CBS) is a foundational optimal algorithm for Multi-Agent Path Finding (MAPF). Its primary application is coordinating the collision-free movement of multiple agents in shared spaces, a critical requirement for modern automated systems.

04

Video Game & Simulation AI

CBS is extensively used in video game engines and crowd simulation software to generate natural-looking, collision-free movement for hundreds of non-player characters (NPCs). It is the preferred method when optimality guarantees are desired for squad-based tactics or complex crowd scenes. Unlike reactive methods, CBS plans full paths from start to goal, preventing oscillatory or deadlock behavior common in local methods.

  • Key Problem Solved: Creating believable, purposeful group movement in real-time simulations.
  • Performance: Modern adaptations like CBS with Prioritization (CBS-P) are used for real-time performance with dozens of agents.
05

Robotic Assembly & Kitting Cells

In flexible manufacturing cells, multiple robotic arms collaborate to assemble products. CBS coordinates their motions to avoid arm-to-arm collisions while minimizing the cycle time for the entire workcell. Each robot's path is a sequence of joint-space or Cartesian-space waypoints, and conflicts are defined as simultaneous occupancy of the same physical volume.

  • Key Problem Solved: Safe, efficient coordination of manipulators in a shared workspace.
  • Engineering Consideration: Must be integrated with real-time Motion Planning and Trajectory Optimization for smooth, dynamically feasible movements.
06

Advantages Over Alternative Methods

CBS is favored in applications requiring provable optimality (e.g., minimizing total makespan). Its two-level architecture offers distinct engineering advantages:

  • Modularity: The low-level pathfinder (e.g., A*) can be swapped for any graph search algorithm, even for continuous spaces.
  • Completeness: If a solution exists, CBS will find it.
  • Constraint-Based Reasoning: The constraint tree provides an explicit, auditable record of every conflict resolution decision, which is valuable for debugging and validation in safety-critical systems like aviation or healthcare robotics.

Contrast with Reactive Methods: Unlike Optimal Reciprocal Collision Avoidance (ORCA), which computes velocities instantaneously, CBS provides a full planned path, preventing myopic decisions that can lead to deadlocks in complex mazes.

CONFLICT-BASED SEARCH (CBS)

Frequently Asked Questions

Conflict-Based Search (CBS) is a foundational, optimal algorithm for Multi-Agent Path Finding (MAPF). These questions address its core mechanics, applications, and how it compares to other coordination methods.

Conflict-Based Search (CBS) is a two-level, optimal algorithm for solving the Multi-Agent Path Finding (MAPF) problem. It operates by recursively resolving conflicts between agent paths. At the high level, the algorithm searches a constraint tree. Each node in this tree represents a set of constraints (e.g., "agent A cannot be at cell (5,7) at timestep 10") imposed to resolve a detected conflict. When a conflict (like two agents occupying the same location at the same time) is found in a solution, the high level creates child nodes with new constraints forbidding that conflict for each involved agent. At the low level, a single-agent pathfinding algorithm (like A*) is run for each agent, but it must now find a path that respects all constraints generated by the current high-level node. The process continues until a node is found where all individual agent paths are conflict-free, guaranteeing an optimal solution relative to the chosen cost function (e.g., sum-of-costs).

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.