# Leveraging Transformers for StarCraft Macromanagement Prediction

arXiv: https://arxiv.org/abs/2110.05343 · HTML: https://mlsanity.com/paper/2110.05343/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 15 of its 21 references that are in the map.
- First posted on arXiv 11 Oct 2021.

## Builds on (most cited first, 15 of 15)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://mlsanity.com/paper/2010.11929/) (2020)
- [U-Net: Convolutional Networks for Biomedical Image Segmentation](https://mlsanity.com/paper/1505.04597/) (2015)
- [End-to-End Object Detection with Transformers](https://mlsanity.com/paper/2005.12872/) (2020)
- [Image Transformer](https://mlsanity.com/paper/1802.05751/) (2018)
- [Attention Augmented Convolutional Networks](https://mlsanity.com/paper/1904.09925/) (2019)
- [StarCraft II: A New Challenge for Reinforcement Learning](https://mlsanity.com/paper/1708.04782/) (2017)
- [Measuring Systematic Generalization in Neural Proof Generation with Transformers](https://mlsanity.com/paper/2009.14786/) (2020)
- [Studying the Inductive Biases of RNNs with Synthetic Variations of Natural Languages](https://mlsanity.com/paper/1903.06400/) (2019)
- [STARDATA: A StarCraft AI Research Dataset](https://mlsanity.com/paper/1708.02139/) (2017)
- [MSC: A Dataset for Macro-Management in StarCraft II](https://mlsanity.com/paper/1710.03131/) (2017)
- [Macro action selection with deep reinforcement learning in StarCraft](https://mlsanity.com/paper/1812.00336/) (2018)
- [Learning Macromanagement in StarCraft from Replays using Deep Learning](https://mlsanity.com/paper/1707.03743/) (2017)

## Built on by (most cited first, 3 of 3)

- [Transformer-based Value Function Decomposition for Cooperative Multi-agent Reinforcement Learning in StarCraft](https://mlsanity.com/paper/2208.07298/) (2022)
- [Enabling Multi-Agent Transfer Reinforcement Learning via Scenario Independent Representation](https://mlsanity.com/paper/2402.08184/) (2024)
- [SC-Phi2: A Fine-tuned Small Language Model for StarCraft II Macromanagement Tasks](https://mlsanity.com/paper/2409.18989/) (2024)

## Abstract (arXiv)

Inspired by the recent success of transformers in natural language processing and computer vision applications, we introduce a transformer-based neural architecture for two key StarCraft II (SC2) macromanagement tasks: global state and build order prediction. Unlike recurrent neural networks which suffer from a recency bias, transformers are able to capture patterns across very long time horizons, making them well suited for full game analysis. Our model utilizes the MSC (Macromanagement in StarCraft II) dataset and improves on the top performing gated recurrent unit (GRU) architecture in predicting global state and build order as measured by mean accuracy over multiple time horizons. We present ablation studies on our proposed architecture that support our design decisions. One key advantage of transformers is their ability to generalize well, and we demonstrate that our model achieves an even better accuracy when used in a transfer learning setting in which models trained on games with one racial matchup (e.g., Terran vs. Protoss) are transferred to a different one. We believe that transformers' ability to model long games, potential for parallelization, and generalization performance make them an excellent choice for StarCraft agents.
