TL;DR
TacticCraft enables natural language tactical steering of StarCraft II AI agents without costly retraining or sacrificing core gameplay mechanics. By freezing a pre-trained DI-Star policy network and attaching lightweight, zero-initialized adapter modules conditioned on a 9-dimensional tactical vector, the agent can fluidly pivot between strategic playstyles (e.g., early pool rushes, economic expansions, or tech transitions) using natural language directives.
What Problem Does This Paper Address?
Deep reinforcement learning systems like AlphaStar and DI-Star have reached superhuman competency in real-time strategy games, but they operate primarily as "black boxes" optimizing purely for win rate. Consequently, they offer little gameplay diversity and lack an intuitive control interface for human players or developers who want to steer strategy—such as commanding an agent to "play defensively" or "rush tech."
Directly fine-tuning full-game policies to follow different strategies is computationally expensive and risks catastrophic forgetting of delicate micro- and macro-management skills. TacticCraft solves this by offering parameter-efficient, style-conditioned control over a complex, multi-head reinforcement learning agent.
Methods
Inspired by parameter-efficient transfer learning in NLP and ControlNet in vision, the authors introduce a modular adapter framework:
- Frozen Base Policy: TacticCraft builds upon the open-source DI-Star model, freezing its observation encoders (Transformer entity encoder, spatial CNN, scalar MLP), core LSTM, and multi-head action predictors.
- Action-Head Adapters: Lightweight two-layer MLPs ($\tau \to 64 \to 32 \to o$, with ReLU activations and zero-initialization) are attached directly to each action head (e.g., Action Type, Selected Units, Target Location, Delay).
- Tactical Conditioning Vector: A low-dimensional vector ($\tau \in \mathbb{R}^9$) representing a probability distribution over tactical archetypes is fed into the adapters. The adapter outputs are combined with base policy logits via additive fusion ($f(x, y) = x + y$).
- Constrained Knowledge Distillation: During training on replay data, only adapter weights are updated. The objective optimizes a knowledge distillation loss constrained by head-specific KL-divergence weights ($\alpha_h$): $$\mathcal{L}(\phi) = \mathbb{E}_{s \sim \mathcal{D}} \left[ \sum_{h \in \mathcal{H}} \alpha_h \cdot \text{KL}(\pi^h_\theta(a|s) \parallel \pi^h_{\theta, \phi}(a|s, \tau)) \right]$$ Varying $\alpha_h$ across heads allows tactical flexibility where needed (e.g., target location and action type) while preserving baseline mechanics.
Datasets
- StarCraft II Language Corpus: Community-sourced gameplay guides, build orders, and strategy discussions scraped from Spawningtool and Liquipedia. N-gram analysis paired with Grandmaster player review established a taxonomy of 9 tactical archetypes (e.g., Standard Roach, Spire Air-tech, Economic Three-Base, +1 Zergling Timing, Lurker Transition).
- High-Level Replays: Approximately 50,000 Zerg-vs-Zerg (ZvZ) replays with Matchmaking Ratings (MMR) $\ge 4800$. Replays were converted into discrete build-order sequences.
- LLM Tactical Annotation: Extracted build orders were classified across the 9 archetypes using GPT-4 and DeepSeek-v3, yielding normalized softmax distributions that serve as tactical conditioning ground-truth labels.
Key Insights and Ideas
- Decoupled Strategic Intent vs. Low-level Execution: Adapting only the output heads via zero-initialized residual MLPs means the agent relies on the frozen base policy for mechanics (unit kiting, worker management) while shifting its macro-intent based on the conditioning vector.
- KL Weight Balancing: Uniformly constraining all action heads degrades flexibility, whereas completely unconstraining heads causes performance collapse. Configuration C (balanced, moderate-to-high constraints across heads) proved best at retaining base competencies while expressing target styles.
- Emergence of Novel Tactical Hybrids: Conditioning the policy on hybrid tactic vectors allowed it to discover novel, off-meta synergies that human players rarely explore due to conflicting build requirements.
Key Results
- Win Rates vs. Built-in Level 10 AI:
- At early training (1,000 steps), all adapter configurations achieved strong win rates against the baseline AI (80.65% to 89.00%), outperforming the base unconditioned agent by providing structured tactical focus.
- In later training epochs (5,000–7,000 steps), win rates declined across configurations (e.g., dropping to 14%–18% at 7K) as the models specialized heavily into specific conditioned tactical archetypes rather than playing the generic optimal counter against the built-in bot.
- Configuration C retained the best balance at 7K epochs with an 18.00% win rate.
- Emergent Gameplay Case Studies:
- +1 Zergling to Lurker Tech: By interpolating Category 5 (+1 Zergling) and Category 7 (Lurker Transition), the model developed an aggressive timing attack backed by rapid tech switching, achieving a 73% win rate in dedicated evaluation matches against Level 10 AI.
- Defensive Static Positioning: When conditioned on an economic three-base strategy, Configuration B unexpectedly discovered an effective counter to early Zergling rushes by positioning clusters of Spine Crawlers in defensive choke points.
Limitations and Future Work
- Single Matchup Scope: Experiments were conducted exclusively on Zerg vs. Zerg (ZvZ) matchups; extending this to asymmetrical matchups (e.g., Protoss vs. Zerg, Terran vs. Protoss) remains unverified.
- Specialization vs. General Performance Trade-off: Strong tactical conditioning causes the agent to commit to assigned styles even when they are directly countered by the opponent, reducing overall win rate against static high-difficulty bots.
- Static Vector Conditioning: The agent uses an offline-generated 9-dimensional probability vector. Future iterations could explore online, interactive dialogue systems where an LLM dynamically modulates tactical vectors in real time based on live game events.
Summary updated