Tracing strategic divergence: archetypal and counterfactual analysis of StarCraft II gameplay trajectories.
Jie Zhang, Weilong Yang
Abstract
Open AccessIntroduction: To address the challenges of data heterogeneity, strategic diversity, and process opacity in interpreting multi-agent decision-making within complex competitive environments, we have developed TRACE, an end-to-end analytical framework for StarCraft II gameplay. Methods: This framework standardizes raw replay data into aligned state trajectories, extracts "typical strategic progressions" using a Conditional Recurrent Variational Autoencoder (C-RVAE), and quantifies the deviation of individual games from these archetypes via counterfactual alignment. Its core innovation is the introduction of a dimensionless deviation metric, |Δ|, which achieves process-level interpretability. This metric reveals "which elements are important" by ranking time-averaged feature contributions across aggregated categories (Economy, Military, Technology) and shows "when deviations occur" through temporal heatmaps, forging a verifiable evidence chain.. Results: Quantitative evaluation on professional tournament datasets demonstrates the framework's robustness, revealing that strategic deviations often crystallize in the early game (averaging 8.4% of match duration) and are frequently driven by critical technology timing gaps. The counterfactual generation module effectively restores strategic alignment, achieving an average similarity improvement of over 90% by correcting identified divergences. Furthermore, expert human evaluation confirms the practical utility of the system, awarding high scores for Factual Fidelity (4.6/5.0) and Causal Coherence (4.3/5.0) to the automatically generated narratives. Discussion: By providing openaccess code and reproducible datasets, TRACE lowers the barrier to large-scale replay analysis, offering an operational quantitative basis for macro-strategy understanding, coaching reviews, and AI model evaluation.