Choices are More Important than Efforts: LLM Enables Efficient Multi-Agent Exploration

Yun Qu, Boyuan Wang, Yuhang Jiang, Jianzhun Shao, Yixiu Mao, Chang Liu, Cheems Wang, Xiangyang Ji · Submission to ICLR 2025 · Rejected

TL;DR

Multi-Agent Reinforcement Learning (MARL) in sparse-reward environments often stalls because agents waste vast amounts of time exploring task-irrelevant states. LEMAE leverages Large Language Models (LLMs) to write reusable Python discriminator functions that automatically spot critical intermediate milestones ("key states") within agent trajectories. By pairing these milestones with a memory tree and subspace-targeted intrinsic rewards, LEMAE reduces exploration redundancy and achieves up to a 10× speedup over prior state-of-the-art methods while requiring fewer than three LLM calls per task.

What Problem Does This Paper Address?

In cooperative MARL, the joint state-action space grows exponentially with each additional agent. When tasks provide only sparse reward signals (e.g., win/loss upon completion), standard exploration techniques that chase novelty or curiosity struggle: agents spend millions of steps exploring irrelevant states because they lack any sense of which behaviors are productive.

While LLMs possess broad common-sense knowledge that could guide exploration, two major bottlenecks exist:

  1. The Representation Gap: Grounding linguistic concepts into symbolic or low-level environment states is brittle and prone to hallucination.
  2. Inference Overhead: Calling an LLM at every timestep or running LLM-in-the-loop planners is too slow and computationally expensive for standard RL loops.

Methods

LEMAE bridges the gap between linguistic knowledge and RL exploration without putting the LLM directly in the agent's control loop. It consists of two primary stages:

+-------------------------------------------------------------+
| 1. Key State Localization (LLM, Offline)                    |
|    Prompt (Task & State Spec) -> Self-Check -> Python Code  |
|    Discriminators: Fi(s) -> {0, 1}                          |
+-------------------------------------------------------------+
                               |
                               v
+-------------------------------------------------------------+
| 2. Key State-Guided Exploration (Online RL)                 |
|    - Segment trajectories at detected key states            |
|    - Subspace Hindsight Intrinsic Rewards (SHIR)            |
|    - Key State Memory Tree (KSMT) for structured search     |
+-------------------------------------------------------------+
  • Key States via Code Discrimination: Instead of asking the LLM to generate specific state vectors or select actions step-by-step, LEMAE prompts the LLM once to generate lightweight Python discriminator functions, $F_i(s) \to \{0, 1\}$. Each function checks whether a global state satisfies the conditions of a semantic subgoal (e.g., standing on a switch or reducing enemy shield levels). A Self-Check mechanism verifies that the generated code is bug-free and executable using real environment state inputs.
  • Subspace-based Hindsight Intrinsic Reward (SHIR): Once key states are detected in rollout trajectories, trajectories are segmented into sub-goals. To avoid noise from unrelated state dimensions, intrinsic rewards are computed purely over the specific state subspace inspected by the discriminator (e.g., coordinates of the door and agents).
  • Key States Memory Tree (KSMT): A dynamic tree that tracks valid transitions between key states across episodes. When agents reach known nodes, KSMT balances breadth and depth exploration via a mixed-randomness strategy ($\epsilon_h$ vs. $\epsilon_l$). Trajectories that fail to discover a new key state are guided toward probable child nodes stored in the tree. Unproductive branches are pruned once the success state is reached.

Datasets and Benchmarks

The authors evaluated LEMAE across multiple environments under fully sparse-reward settings:

  • Multiple-Particle Environment (MPE): Four cooperative tasks (Pass, Secret-Room, Push-Box, Large-Pass).
  • StarCraft Multi-Agent Challenge (SMAC & SMACv2): Six micro-scenarios (2m_vs_1z, 1c3s5z, 3s_vs_5z, 5m_vs_6m, 3s5z_vs_3s6z, MMM2) and stochastic variants in SMACv2 (protoss_5_vs_5, terran_5_vs_5, zerg_5_vs_5).
  • River (Novel Benchmark): A newly handcrafted MPE-style puzzle where agent Alice fears water and agent Bob must hold position inside rivers to act as a bridge. This benchmark was designed to ensure LLMs were not merely reciting memorized environments.
  • Additional extensions: Visual-input navigation (Visual-Pass evaluated with GPT-4o) and multi-agent continuous robotics (MaMuJoCo).

Key Insights and Ideas

  • Discrimination is Easier Than Generation: Having an LLM output exact continuous state coordinates is notoriously unreliable and brittle under partial observability. By contrast, asking the LLM to write a high-level boolean rule (discrimination) requires far less precision, is easily verifiable, and drastically limits hallucinations.
  • Extreme Efficiency in LLM Budget: Because the generated code is compiled into standard Python functions executed inside the replay buffer/rollout worker, the method typically consumes under three LLM calls per task (costing less than $0.05), avoiding the heavy runtime costs of LLM-as-policy frameworks.
  • Subspace Targeting Prevents Distraction: Calculating distance bonuses over the full state space introduces noise and exploration bias. Computing distance bonuses exclusively on the subspace indices that matter for the current key state ensures purposeful guidance.

Key Results

  • Significant Acceleration: In MPE, LEMAE reached the success state 4.6× to 13.8× faster than the prior state-of-the-art cooperative exploration method, CMAE (e.g., $153\text{k}$ vs. $2.1\text{M}$ steps on Pass).
  • Dominating Sparse SMAC: Baseline algorithms (QMIX, MAVEN, CDS, MASER) scored near 0% win rates on difficult sparse maps. LEMAE achieved high win rates (e.g., 89% on MMM2 and 73% on 3s5z_vs_3s6z), matching or outperforming QMIX-DR, which was trained using human-engineered dense rewards.
  • Algorithmic Agnosticism: Integrating LEMAE onto diverse MARL backbones (IPPO, QMIX, QPLEX, and VMIX) consistently rescued them from total failure in sparse environments.
  • Generalization to Unseen & Vision Tasks: LEMAE solved the previously unseen River task and transferred successfully to image-based states in Visual-Pass using GPT-4o with a 98% discriminator accuracy.

Limitations and Future Work

  • Reliance on State Semantics: LEMAE requires task documentation and semantic descriptions of each dimension in the state vector so the LLM can write the logic.
  • Single-Pass Prompting Bottlenecks: Although the Self-Check catches syntax and runtime execution errors, the LLM could still produce semantically incorrect subgoals if the environment's underlying physics are counterintuitive.
  • Future Work: The authors propose incorporating vision-language models to automatically parse environments via multimodal self-exploration, alongside online feedback loops to correct faulty discriminator logic during training.

Summary updated

Abstract

With expansive state-action spaces, efficient multi-agent exploration remains a longstanding challenge in reinforcement learning. Although pursuing novelty, diversity, or uncertainty attracts increasing attention, redundant efforts brought by exploration without proper guidance choices poses a practical issue for the community. This paper introduces a systematic approach, termed LEMAE, choosing to channel informative task-relevant guidance from a knowledgeable Large Language Model (LLM) for Efficient Multi-Agent Exploration. Specifically, we ground linguistic knowledge from LLM into symbolic key states, that are critical for task fulfillment, in a discriminative manner at low LLM inference costs. To unleash the power of key states, we design Subspace-based Hindsight Intrinsic Reward (SHIR) to guide agents toward key states by increasing reward density. Additionally, we build the Key State Memory Tree (KSMT) to track transitions between key states in a specific task for organized exploration. Benefiting from diminishing redundant explorations, LEMAE outperforms existing SOTA approaches on the challenging benchmarks (e.g., SMAC and MPE) by a large margin, achieving a 10x acceleration in certain scenarios. Our code is available at https://anonymous.4open.science/r/LEMAE.
BibTeX
@misc{qu2024choices,
  author = {Yun Qu and Boyuan Wang and Yuhang Jiang and Jianzhun Shao and Yixiu Mao and Chang Liu and Cheems Wang and Xiangyang Ji},
  title = {{Choices are More Important than Efforts: LLM Enables Efficient Multi-Agent Exploration}},
  year = {2024},
  eprint = {2410.02511},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.02511},
}

Loading related content...

Figure