Skip to content

M*

M*

Multi-agent pathfinding algorithm that finds collision-free paths for multiple agents by resolving conflicts and coordinating their movements.

Family: Planning Algorithms Status: โœ… Complete

Need Help Understanding This Algorithm?

๐Ÿค– Ask ChatGPT about M*

Overview

M is a multi-agent pathfinding algorithm that extends A search to handle multiple agents simultaneously.

The algorithm finds collision-free paths for multiple agents by detecting conflicts between their planned paths and resolving them through coordination and replanning.

The key insight is that agents can plan their paths independently initially, but when conflicts arise (agents occupying the same location at the same time), the algorithm expands the search space to include coordinated movements that resolve these conflicts.

Mathematical Formulation

๐Ÿงฎ Ask ChatGPT about Mathematical Formulation

Mathematical Properties

Multi-Agent State

s = (sโ‚, sโ‚‚, ..., sโ‚™) where sแตข is state of agent i

Joint state of all agents


Conflict Detection

conflict(s, s') if โˆƒi,j: sแตข = s'โฑผ and i โ‰  j

Agents occupy same location


Coordination Graph

G = (V, E) where V is agents and E is conflicts

Graph showing which agents need coordination


Expanded Search Space

S' = S โˆช {coordinated_moves}

Search space including coordinated actions


Key Properties

๐Ÿ”‘ Ask ChatGPT about Key Properties

  • Multi-Agent


    Handles multiple agents simultaneously

  • Conflict Resolution


    Detects and resolves agent conflicts

  • Coordination


    Coordinates agent movements when needed

  • Scalable


    Efficient for moderate numbers of agents

Implementation Approaches

๐Ÿ’ป Ask ChatGPT about Implementation

Classic M* implementation with conflict detection and resolution

Complexity:

  • Time: O(b^d * nยฒ)
  • Space: O(b^d * n)

Advantages

  • Handles multiple agents simultaneously

  • Finds collision-free paths

  • Coordinates agent movements

  • Extends A* to multi-agent domain

  • Good for moderate numbers of agents

Disadvantages

  • Exponential complexity with number of agents

  • May not scale to many agents

  • Requires coordination graph computation

  • Can be memory intensive

Use Cases & Applications

๐ŸŒ Ask ChatGPT about Applications

Application Categories

Multi-Robot Systems

  • warehouse robots: warehouse robots

  • swarm robotics: swarm robotics

  • autonomous vehicles: autonomous vehicles

Game AI

  • strategy games: strategy games

  • real-time strategy: real-time strategy

  • multi-agent games: multi-agent games

Logistics

  • delivery systems: delivery systems

  • traffic management: traffic management

  • supply chain: supply chain

Simulation

  • crowd simulation: crowd simulation

  • traffic simulation: traffic simulation

  • evacuation planning: evacuation planning

Educational Value

  • Understanding multi-agent systems: Understanding multi-agent systems

  • Conflict resolution strategies: Conflict resolution strategies

  • Coordination algorithms: Coordination algorithms

  • Extension of single-agent algorithms: Extension of single-agent algorithms

References & Further Reading

:material-book: Core Textbooks

:material-file-document:
:material-file-document:

Interactive Learning

Try implementing the different approaches yourself! This progression will give you deep insight into the algorithm's principles and applications.

Pro Tip: Start with the simplest implementation and gradually work your way up to more complex variants.

Related Algorithms in Planning Algorithms:

  • A* Search - Optimal pathfinding algorithm that uses heuristics to efficiently find the shortest path from start to goal in weighted graphs.

  • Depth-First Search - Graph traversal algorithm that explores as far as possible along each branch before backtracking, using stack-based or recursive implementation.

  • Breadth-First Search - Graph traversal algorithm that explores all nodes at the current depth level before moving to the next level, guaranteeing shortest path in unweighted graphs.