# Tracing strategic divergence: archetypal and counterfactual analysis of StarCraft II gameplay trajectories

**Authors:** Jie Zhang, Weilong Yang

PMC · DOI: 10.3389/frai.2025.1724493 · Frontiers in Artificial Intelligence · 2026-01-06

## TL;DR

TRACE is a framework that analyzes StarCraft II gameplay to understand strategic decisions and deviations using machine learning and counterfactual analysis.

## Contribution

TRACE introduces a dimensionless deviation metric and a C-RVAE model to interpret strategic progressions and deviations in competitive gameplay.

## Key findings

- Strategic deviations often occur in the early game and are linked to timing gaps in technology.
- The counterfactual module improves strategic alignment with over 90% similarity improvement.
- Expert evaluations confirm TRACE's utility with high scores for factual fidelity and causal coherence.

## Abstract

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.

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..

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.

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.

## Full-text entities

- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12816306/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12816306/full.md

## References

20 references — full list in the complete paper: https://tomesphere.com/paper/PMC12816306/full.md

---
Source: https://tomesphere.com/paper/PMC12816306