Why Solving Multi-agent Path Finding with Large Language Model has not Succeeded Yet

Weizhe Chen, Sven Koenig, Bistra DilkinaarXiv 2024 · DOI

Abstract

Multi-agent Path Finding (MAPF) is a cornerstone of automated logistics, requiring precise coordination to move multiple agents to their targets without collisions. While Large Language Models (LLMs) have demonstrated remarkable reasoning capabilities in other domains, their application to MAPF remains fraught with challenges. This paper investigates the performance of GPT-4-Turbo in MAPF, identifying critical failures in spatial reasoning, context management, and the fundamental way these models perceive obstacles.

Introduction

In automated warehouses, moving a fleet of robots efficiently is a complex optimization problem. Traditional algorithms like A* search variants are effective but can be rigid. Researchers have explored whether the "reasoning" capabilities of LLMs could provide a more flexible, zero-shot approach to coordination. However, MAPF requires a tight coupling between high-level strategy and low-level spatial planning—a combination that currently eludes general-purpose LLMs.

Methodology

The study evaluated GPT-4-Turbo using an iterative prompting framework. Rather than asking for a complete path in one go, which proved to be a total failure, the researchers implemented a Step-by-Step (SBS) approach.

The iterative prompting framework for LLM-based MAPF, featuring a solution checker and error feedback loop.

As illustrated in the framework above, the LLM acts as a solver that proposes moves for each agent at every timestep. To assist the model, a rule-based Solution Checker detects collisions. If the LLM suggests an invalid move, it receives specific error information and is prompted to regenerate the step. The researchers also tested various map representations, including multimodal images, coordinate lists, and symbol-based textual grids.

Experimental Setup and Datasets

The performance was benchmarked on standard MAPF suites:

  • EMPTY-8-8: An open 8x8 grid.
  • ROOM-32-32-4: A 32x32 grid with four rooms connected by narrow doors.
  • MAZE-32-32-2: A 32x32 maze with narrow, 2-cell wide corridors.

Key Insights

The "Wait" and Symmetry Breaking Problem

LLMs struggle with "symmetry breaking"—deciding which agent should yield in a narrow passage. Models often force inefficient detours rather than understanding that "doing nothing" (waiting) for one turn is frequently the optimal move.

Vision vs. Textual Perception

Surprisingly, multimodal input (GPT-4V) performed the worst. While the model could identify the presence of walls, it could not translate visual data into the precise coordinate-level data required for collision-free planning. The most successful representation was the Textual Map (TOM), which uses a grid of symbols (e.g., '.' and '@'), suggesting LLMs are better at parsing spatial relationships through structured text patterns.

The Context Length Trap

MAPF is a long-horizon task. As the number of agents and steps increases, the conversation history grows rapidly. When the LLM reaches its token limit and must "restart" from its current position, it loses the memory of previously explored areas, leading it to wander aimlessly.

An execution trace showing the LLM attempting a move, detecting a collision via the checker, and successfully regenerating a valid step.

As shown in the execution trace, while the LLM can correct its mistakes when prompted by the checker, the process is computationally expensive and slow.

Results and Discussion

  • Success Rates: GPT-4 achieved 100% success on the Empty map with up to 8 agents. However, success plummeted to 20% on the Room map and 0% on the Maze map, even with only 2 agents.
  • Efficiency: Even when successful, LLM-generated paths were often 1.5x longer than optimal paths due to a preference for long detours over simple wait actions.
  • Latency: Traditional solvers find paths in milliseconds, whereas the LLM-based approach takes 15–30 seconds per step, making it impractical for real-time robotics.

Conclusion

For LLMs to succeed in MAPF, improvements are needed in spatial encoding and context management. Future research should explore fine-tuning models on pathfinding-specific datasets or developing hybrid systems where LLMs handle high-level strategic coordination while traditional algorithms manage low-level, precision pathing.

Summary updated

BibTeX
@misc{chen2024why,
  author = {Weizhe Chen and Sven Koenig and Bistra Dilkina},
  title = {{Why Solving Multi-agent Path Finding with Large Language Model has not Succeeded Yet}},
  year = {2024},
  eprint = {2401.03630},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.03630},
}
Figure