SCC: an efficient deep reinforcement learning agent mastering the game of StarCraft II

Xiangjun Wang, Junxiao Song, Penghui Qi, Peng Peng, Zhenkun Tang, Wei Zhang, Weimin Li, Xiongjun Pi, Jujie He, Chao Gao, Haitao Long, Quan Yuan

TL;DR

StarCraft Commander (SCC) is a deep reinforcement learning agent that achieves top-tier professional performance in StarCraft II while using an order of magnitude less computation than DeepMind’s AlphaStar. By optimizing neural network architecture and introducing "agent branching" in league training, SCC defeated GrandMaster players and top professionals (2:0) using significantly fewer parameters and training samples.

The Grand Challenge of StarCraft II

StarCraft II is widely considered a "grand challenge" for artificial intelligence due to its immense complexity. The game features a combinatorial action space, partial observability (the "fog of war"), and the need for long-term strategic planning over thousands of steps.

While DeepMind's AlphaStar proved that AI could reach the GrandMaster level, it required a staggering amount of compute—thousands of GPUs and TPUs running for months. This creates a massive barrier to entry for the broader research community. The authors of SCC set out to prove that with smarter architectural choices and training efficiencies, human-pro level performance can be achieved with much more constrained resources.

Methodology and Training Data

SCC follows a two-stage training pipeline: Imitation Learning (IL) from human replays, followed by Reinforcement Learning (RL) via league training. To achieve efficiency, the researchers introduced several key optimizations:

  • Architectural Pruning: They reduced the input minimap size from 128x128 to 64x64 and simplified the action decoder. This resulted in a model with just 49M parameters, compared to AlphaStar’s 139M.
  • Group Transformer: Instead of processing all units together, SCC divides them into "my units," "enemy units," and "neutral units." It applies separate self-attention and cross-attention blocks to better capture heterogeneous relationships on the battlefield.
  • Attention-based Pooling: Rather than simple average pooling, SCC uses trainable weight vectors to reduce unit features into a single vector, allowing the model to focus on the most strategically relevant units.
  • Agent Branching: In the RL stage, instead of always initializing new "exploiters" from the supervised model, they "branched" them off the current main agent. This allowed exploiters to specialize in countering specific high-level strategies (like a "reaper rush") much faster.

For training, the researchers used a dataset of 105,034 human replays from players with an MMR above 4,300. They also tested "small" (4,638 replays) and "medium" (15,579 replays) subsets to study the impact of data quantity, and utilized a high-quality "MMR5500-win" dataset (3,458 winning replays from elite players) for final fine-tuning.

Key Insights and Ideas

Architecture > Data Volume Surprisingly, the model trained on just ~5,000 replays performed nearly as well as the one trained on 100,000 replays. This suggests that a highly efficient network architecture is more critical for learning complex games than massive datasets.

Win rates across different training trials

Quality over Quantity Fine-tuning on a small set of high-MMR winning replays provided a significant performance boost compared to simply using a larger, noisier dataset.

The Power of Branching Initializing exploiters from the main agent (Agent Branching) rather than the base IL model made the league training much more robust. It allowed the AI to discover and defend against "cheese" strategies that human players often use to exploit AI weaknesses.

Human-Like Macro Statistical analysis showed that SCC naturally adopted human-like "macro" behaviors, such as building a similar number of Command Centers and Barracks as top-tier players.

Comparison of Command Center distributions

Key Results

  • Supervised Success: After the imitation learning stage alone, SCC achieved a 97% win rate against the built-in Elite bot.
  • Professional Dominance: In a live event, SCC played two "Best of Three" matches against top Chinese professionals TIME and TooDming, winning both matches 2:0.
  • Novel Strategy Discovery: SCC discovered a unique strategy involving "massive landed Vikings"—a tactic rarely seen in human professional play—which was later praised and even adopted by some in the StarCraft II community.
  • Generalization: Despite being trained only on the map "Triton" and the "Terran vs. Terran" matchup during RL, the agent showed strong generalization, maintaining high win rates on unseen maps and against other races (Protoss and Zerg).

Limitations and Future Work

The authors acknowledge a few key limitations. To save on computation, the RL training was restricted to the Terran race; training a full multi-race agent would require more resources. Additionally, professional feedback suggested that while SCC’s "macro" (economy and expansion) was world-class, there is still room for improvement in "micro" (precise unit control during combat). Future work will likely focus on further optimizing how RL policies balance exploring new strategies versus exploiting known winning ones to foster even more novel gameplay.

Summary updated

BibTeX
@inproceedings{wang2021scc,
  author = {Xiangjun Wang and Junxiao Song and Penghui Qi and Peng Peng and Zhenkun Tang and Wei Zhang and Weimin Li and Xiongjun Pi and Jujie He and Chao Gao and Haitao Long and Quan Yuan},
  title = {{SCC: an efficient deep reinforcement learning agent mastering the game of StarCraft II}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=3s_903t1RV},
}
Figure