Introduction
Real-time strategy (RTS) games like StarCraft: Brood War present a formidable challenge for artificial intelligence due to their vast state spaces and the "fog of war." This partial observability requires players to make critical decisions based on incomplete information, inferring an opponent's hidden actions to choose effective counters. While much of the existing research has focused on low-level unit micromanagement, this work by researchers at Facebook AI Research (FAIR) addresses high-level strategic selection: the ability to decide which overall "build order" to employ and when to adapt it as the game evolves.
Methodology
The researchers framed strategy selection as a Reinforcement Learning (RL) problem where the agent chooses from 25 predefined high-level strategies every five seconds. The architecture utilizes a Long Short-Term Memory (LSTM) network with 2048 cells to maintain a temporal memory of the game state, processing global features such as unit counts, resources, and technology levels.
The Auxiliary Task: Navigating the Fog of War
A core innovation of this approach is the use of an auxiliary task during training. The model is given access to the true, hidden unit counts of the opponent—information normally obscured by the fog of war. A secondary branch of the neural network is trained to predict these hidden counts. Although this branch is discarded during live play, the process forces the LSTM to develop internal representations that are highly sensitive to the opponent's likely hidden state, effectively granting the agent a form of strategic "intuition."
Experimental Setup and Training
The model underwent a two-phase training process:
- Off-policy Initialization: Learning from a massive corpus of 2.8 million games (comprising 3.3 million strategy switches) to establish a baseline Q-function.
- On-policy Refinement: Direct play against a diverse pool of competitive community bots from the SSCAIT and AIIDE competitions (e.g., Iron, McRave) to refine strategy selection based on win/loss outcomes.
Key Results and Insights
The RL-based strategy selector demonstrated substantial performance gains over fixed-strategy controls. Against bots encountered during training, the win rate improved from 79.3% to 88.8%. More impressively, the model showed strong generalization against "held-out" bots it had never seen before; the win rate against the Locutus bot jumped from 38.7% to 60.0%, while performance against McRave rose from 55.6% to 72.5%.
Prediction Accuracy
Qualitative analysis confirms that the auxiliary task successfully teaches the model to track hidden units. As shown in the figures below, the predicted opponent unit counts closely follow the ground truth, even when the agent's actual observations (the blue line) are sparse due to the fog of war.
Memory vs. Vision
The study also highlighted the trade-offs between "Visible" features (current sight) and "Memory" features (hard-coded tracking of seen units). While hard-coded memory improved performance against known opponents, it occasionally hindered generalization to new bots, suggesting that the model's learned intuition via the auxiliary task is a more robust path toward handling long-term uncertainty.
Conclusion and Future Work
By combining deep reinforcement learning with a strategic auxiliary task, this research demonstrates that agents can learn to "see" through the fog of war in complex RTS environments. Future work may involve moving beyond predefined build orders toward more flexible, dynamically generated strategies and addressing the high variance still observed when facing entirely novel opponent behaviors.
Summary updated