SMAC-Hard: Enabling Mixed Opponent Strategy Script and Self-play on SMAC

Yue Deng, Yan Yu, Weiyu Ma, Zirui Wang, Wenhui Zhu, Jian Zhao, Yin ZhangarXiv 2024 · OpenReview

Abstract

The availability of challenging simulation environments is pivotal for advancing the field of Multi-Agent Reinforcement Learning (MARL). In cooperative MARL settings, the StarCraft Multi-Agent Challenge (SMAC) has gained prominence as a benchmark for algorithms following the centralized training with decentralized execution paradigm. However, with continual advancements in SMAC, many algorithms now exhibit near-optimal performance, complicating the evaluation of their true effectiveness. To alleviate this problem, we highlight a critical issue: the default opponent policy in these environments lacks sufficient diversity, leading MARL algorithms to overfit and exploit unintended vulnerabilities rather than learning robust strategies. To overcome these limitations, we propose SMAC-HARD, a novel benchmark designed to enhance training robustness and evaluation comprehensiveness. SMAC-HARD supports customizable opponent strategies, randomization of adversarial policies, and interfaces for MARL self-play, enabling agents to generalize to varying opponent behaviors and improve model stability. Furthermore, we introduce a black-box testing framework wherein agents are trained without exposure to the edited opponent scripts but are tested against these scripts to evaluate the policy coverage and adaptability of MARL algorithms. We envision SMAC-HARD as a critical step toward benchmarking the next generation of MARL algorithms, fostering progress in self-play methods for multi-agent systems.

Introduction

For years, the StarCraft Multi-Agent Challenge (SMAC) has served as the primary benchmark for cooperative Multi-Agent Reinforcement Learning (MARL). However, the benchmark has recently reached a point of saturation, with state-of-the-art (SOTA) algorithms achieving near-perfect win rates across most maps. This high performance often masks a significant underlying issue: agents are not necessarily learning complex tactical intelligence but are instead overfitting to the static, predictable behaviors of the default StarCraft II AI.

The default AI typically follows rigid patterns, such as moving toward fixed coordinates or attacking the nearest unit. Agents learn to exploit these "bugs"—for instance, by kiting a Zealot that becomes stuck in a movement loop—rather than developing robust strategies. SMAC-Hard is introduced to address this lack of diversity by providing a framework for editable opponent scripts and self-play, forcing agents to generalize across a wider spectrum of adversarial behaviors.

Methodology

To transform SMAC into a more rigorous benchmark, four key architectural enhancements were implemented:

  1. Opponent Script Editing: Opponent logic was migrated from static map files to a Python-based interface using the pysc2 package. This allows for the creation of complex "decision tree" scripts that can be modified without re-exporting map files.
  2. Mixed Strategy Training: Agents can now be trained against a distribution of scripts. For example, an opponent might randomly toggle between "focus fire on the weakest unit" and "focus fire on the closest unit" at the start of each episode.
  3. Self-Play Interface: By aligning the observation and action spaces of both teams, SMAC-Hard enables agents to train against previous iterations of themselves. This setup is crucial for fostering the emergence of sophisticated counter-strategies.
  4. LLM-Generated Strategies: To scale the creation of diverse scripts, a pipeline utilizing Large Language Models (LLMs) was developed to generate Python-based decision trees, which are then iteratively refined through simulation.
The SMAC-Hard framework supports custom script editing (b) and a dual-team interface for self-play (a).

Key Insights and Experimental Results

Evaluations on SMAC-Hard reveal that current MARL algorithms are highly susceptible to overfitting. A primary example is the "Tricky Strategy Trap," where minor changes to an opponent's pursuit logic can turn a previously "easy" map into a "super-hard" challenge.

The Cost of Uncertainty

Facing a "Mixed Strategy" significantly increases task complexity. Agents must spend the initial moments of an episode "probing" the opponent to identify which strategy is active. On the 10m_vs_11m map, algorithms like QMIX and MAPPO, which typically achieve 100% win rates, saw their performance plummet to 36.88% and 39.38%, respectively, when faced with mixed strategies.

Black-Box Evaluation

The "Black-box" testing framework—where agents are trained on standard SMAC and tested on SMAC-Hard—demonstrated a near-total failure of policy transfer. On the 2s3z map, QMIX's win rate dropped from nearly 100% to just 5.08% when tested against slightly tweaked targeting logic.

Performance variance across different strategy seeds (b) illustrates the challenge of generalizing to diverse opponent behaviors (a).

Conclusion and Future Work

SMAC-Hard provides a necessary difficulty spike for the MARL community by exposing the limitations of overfitting to static scripts. While the current "hard" opponents are more robust, they still rely on decision trees that may contain exploitable edge cases. Future work will focus on leveraging the self-play interface to develop agents that can autonomously discover and counter diverse strategies, as well as further refining the LLM-based script generation pipeline to ensure strategic depth and stability.

Summary updated

BibTeX
@misc{deng2024smac,
  author = {Yue Deng and Yan Yu and Weiyu Ma and Zirui Wang and Wenhui Zhu and Jian Zhao and Yin Zhang},
  title = {{SMAC-Hard: Enabling Mixed Opponent Strategy Script and Self-play on SMAC}},
  year = {2024},
  eprint = {2412.17707},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.17707},
}
Figure