Post

Multi-Agent Path Finding: Conflict-Based Search

Multi-Agent Path Finding: Conflict-Based Search

Multi-Agent Path Finding: Conflict-Based Search

Implemented an efficient Conflict-Based Search (CBS) algorithm for Multi-Agent Path Finding, with an OpenCV-based animation system to visualize agent movements and path planning in grid-based environments.

MAPF Animation Real-time visualization of the CBS algorithm solving multi-agent pathfinding conflicts

Project Overview

In the multi-agent path finding problem (MAPF), paths should be found for several agents, each with a different start and goal position such that agents do not collide. This implementation provides a complete solution using the CBS algorithm with real-time visualization.

Algorithm Implementation

Conflict-Based Search (CBS)

CBS is a two-level algorithm that provides optimal solutions:

  • High Level: Search performed on a tree based on conflicts between agents
  • Low Level: Search performed for a single agent at a time
  • Advantage: Examines fewer states than A* while maintaining optimality

Demo Video

Watch the algorithm in action:

CBS MAPF Demo

Research Background

This implementation is based on the seminal paper:

Conflict Based Search (CBS) - Sharon, G., Stern, R., Felner, A., & Sturtevant, N. R. (2015). “Conflict-based search for optimal multi-agent pathfinding.” Artificial Intelligence, 219, 40-66.

Performance Results

  • Optimality: Guaranteed optimal solutions
  • Efficiency: Significant speedup over global A*-based approaches
  • Scalability: Tested with multiple agents in various grid configurations
  • Real-time Visualization: Smooth animation at 30+ FPS

Technologies Used

  • Python: Core implementation language
  • OpenCV: Visualization and animation
  • NumPy: Numerical computations
  • Matplotlib: Additional plotting capabilities
  • Algorithm Design: A*, CBS, conflict detection

Repository

Explore the complete implementation with detailed documentation:

View Project on GitHub

Credit: RAP-Lab from SJTU for research guidance and algorithmic insights.

Applications

This MAPF solution has applications in:

  • Warehouse Robotics: Multiple robots navigating shared spaces
  • Autonomous Vehicles: Coordinated vehicle routing
  • Game AI: Strategic unit movement in real-time strategy games
  • Drone Swarms: Coordinated multi-drone operations
This post is licensed under CC BY 4.0 by the author.