Introduction
Multi-Agent Path Finding (MAPF) is the problem of finding collision-free paths for multiple robots to reach their destinations simultaneously.
As the number of warehouse robots increases, the risk of deadlocks and livelocks grows. This article explains the mathematical definitions of collisions in MAPF and the optimization objectives.
Collision Definitions
MAPF considers two types of collisions.
Vertex Conflict
Two agents and occupy the same node at the same timestep :
where denotes the position of agent at timestep .
Edge Conflict
Two agents traverse the same edge in opposite directions at the same timestep:
Optimization Objectives
MAPF has two common optimization objectives.
Makespan Minimization
Minimize the latest arrival time across all agents:
Sum-of-Costs Minimization
Minimize the total path cost of all agents:
| Objective | Characteristic | Use Case |
|---|---|---|
| Makespan | Minimizes latest arrival | Throughput-focused |
| Sum-of-Costs | Minimizes total movement | Energy efficiency |
CBS Algorithm
Conflict-Based Search (CBS) is the foundational MAPF algorithm.
def cbs(agents, graph):
root = CTNode(constraints=[], solution=find_individual_paths(agents))
open_list = [root]
while open_list:
node = open_list.pop(0) # lowest cost
conflict = find_first_conflict(node.solution)
if conflict is None:
return node.solution # conflict-free
for constraint in resolve(conflict):
child = CTNode(
constraints=node.constraints + [constraint],
solution=replan(node, constraint)
)
open_list.append(child)
return None # no solutionInline Math Examples
Given agents, vertices, and edges, the state space is . In practice, however, the constraint tree branching is limited, drastically reducing the search space.
Conclusion
MAPF is NP-hard in terms of computational complexity, but CBS-family algorithms make it possible to solve practical-scale problems. Rovnou leverages this research to deliver real-time path optimization for warehouse robots.
This article was written with reference to MAPF research overview.