Introduction
In Real-Time Strategy (RTS) games like StarCraft, information is a critical resource. However, players often operate under the "Fog of War," where enemy units and structures are only visible when within the sight range of friendly units. This partial observability forces players to estimate enemy positions and intentions based on incomplete data. This paper, originally presented at AIIDE 2011, introduces a particle-based state estimation model designed to track enemy units as they disappear into the fog, enabling AI agents to make more informed tactical decisions.
The Challenge of Partial Observability
For an AI agent, the Fog of War creates a "partially observable" environment. Traditional game AI often circumvents this by "cheating"—accessing hidden game state data—or by having a very limited memory of scouted units. The researchers from UC Santa Cruz aimed to develop a human-like estimation system that maintains a persistent belief state about enemy units without relying on privileged information.
The Particle Model Approach
The proposed system utilizes a simplified particle model where a single particle is assigned to each unique enemy unit encountered. Unlike standard particle filters that use a distribution of particles for one object, this approach focuses on tracking individual unit trajectories through a combination of spatial and temporal heuristics.
Movement Model
The trajectory of each particle is predicted using a linear combination of three distinct vectors:
- Movement Vector: Derived from the unit's last observed velocity.
- Target Vector: Directed toward likely destinations, such as the player's base.
- Chokepoint Vector: A terrain-aware vector that pulls particles toward ramps or narrow passes, reflecting how units naturally navigate map geometry.
Confidence and Optimization
To handle uncertainty, each particle has a "weight" representing confidence. This weight decays linearly over time if the unit is not re-sighted. Once the weight reaches zero, the particle is removed. To tune the model's parameters (e.g., decay rates for different unit classes), the authors employed the Nelder-Mead (simplex) algorithm, optimizing the model against a corpus of expert replays to minimize prediction error.
Experimental Setup
The researchers utilized thousands of expert-level StarCraft replays from the International Cyber Cup (ICCup). They sampled 10 replays for every possible race matchup (e.g., Protoss vs. Zerg) across various maps. Data was extracted every 5 seconds using the Brood War API (BWAPI) to establish a "ground truth" for evaluating the model's accuracy.
Results and Analysis
The model was integrated into EISBot, a reactive planning agent, and tested against both built-in AI and top-tier bots from the 2010 AIIDE competition.
Prediction Accuracy
The optimized model showed a marked improvement in tracking accuracy. As shown in the error analysis, the optimized model maintains a significantly lower average threat prediction error over time compared to a "Null Model" (no tracking) or a "Default Model" (remembering only the last known position).
In-Game Performance
In live matches, the optimized particle model achieved a 78% overall win rate. Compared to baselines with no or simple tracking, the optimized model improved both win and score ratios by over 10%. Interestingly, the authors noted a "Scouting Paradox": a bot with perfect information (cheating) sometimes performed worse because it stopped sending out scouts. In StarCraft, scouts serve a dual purpose of gathering info and providing tactical distraction; the particle model encourages this natural behavior.
Conclusion and Future Work
By incorporating terrain awareness and class-specific movement logic, the particle model provides a robust framework for RTS state estimation. While currently limited by linear trajectory assumptions and difficulties in distinguishing identical units in groups, the research paves the way for more sophisticated "simulacra" models that can mimic specific player styles and complex pathfinding behaviors.
Summary updated