Abstract
In Real-Time Strategy (RTS) games like StarCraft II, the environment is a critical factor in combat outcomes. Traditional AI models often overlook terrain, focusing solely on unit statistics. We present BattleNet, a specialized neural network architecture that explicitly models "home-field advantage" by combining a squad-composition encoder (SynergyNet) with a terrain-aware predictor (TerrainNet). Trained on a custom dataset of 120,000 simulated battles, BattleNet achieves 89.7% accuracy, significantly outperforming terrain-agnostic baselines.
Introduction
Deciding whether to engage or retreat is a fundamental high-stakes decision in RTS games. Human players intuitively leverage "choke points," "high ground," or vision-obscuring "bushes" to overcome numerically superior forces. However, quantifying this advantage for AI agents remains challenging. Existing models, such as the Lanchester or Life Time Damage (LTD) models, primarily focus on unit counts and raw stats, failing to capture the tactical nuances of the battlefield geography.
This paper addresses the gap in terrain-aware combat prediction. By providing an AI agent with a module that understands where to fight, we enable more sophisticated strategic decision-making that mirrors human intuition.
BattleNet Architecture
The proposed BattleNet architecture consists of two primary components designed to decouple squad synergy from environmental interaction.
- SynergyNet: This sub-model encodes a "squad vector" ($n_U$), representing unit types and quantities, into a latent synergy vector ($n_S$). This process captures how units within a single army complement each other—for example, how healers support front-line tanks—before considering the opponent or the terrain.
- TerrainNet: The final predictor takes the synergy vectors of both competing squads along with a one-hot encoded terrain vector ($n_T$). It outputs a winning probability ($p_{win}$), effectively acting as the decision-maker that evaluates the interaction between specific army compositions and the battlefield environment.
Experimental Setup
To evaluate BattleNet, the authors developed a custom StarCraft II combat simulator to generate a large-scale, terrain-specific dataset.
- Dataset Scale: 120,000 total samples, with 15,000 simulations for each of the 8 terrain types.
- Terrain Variety: The simulations covered diverse environments including Plain, Alley, Narrow Ramp, Long Alley, Bush, Two Bushes, Wide Ramp, and Foggy.
- Unit Variety: 29 types of ground units from the Zerg, Terran, and Protoss races were included. Squads were constrained by resource costs and a maximum of 150 supply to reflect realistic mid-to-late game scenarios.
Results and Analysis
BattleNet was compared against two baseline models: Baseline– (squad composition only) and Baseline+ (squad composition plus terrain information).
The results demonstrate that terrain is a significant force multiplier. Adding terrain data to a standard network (Baseline+) improved accuracy by 9.2% compared to the squad-only model. BattleNet further improved this by 2%, reaching an overall accuracy of 89.7%. This suggests that the intermediate synergy encoding helps the model better understand how a cohesive unit interacts with specific geographical features.
Performance was particularly high on "Foggy" (91.8%) and "Narrow ramp" (91.7%) terrains, where mechanical rules in StarCraft II are highly consistent. The "Two bushes" terrain proved the most challenging (83.0%), likely due to complex line-of-sight interactions and "hide-and-seek" mechanics.
Conclusion and Future Work
BattleNet successfully demonstrates that explicit terrain modeling is vital for accurate combat prediction in RTS games. While currently limited to ground units and static starting positions, future iterations could incorporate air units and dynamic positioning (e.g., flanking maneuvers). Integrating BattleNet into a full-game AI agent like AlphaStar could significantly enhance strategic depth by allowing agents to actively seek out advantageous terrain for engagements.
Summary updated