Abstract
Efficiently modeling and exploiting opponents is a long-standing challenge in adversarial domains. Large Language Models (LLMs) have recently demonstrated outstanding performance in general tasks, but their application to opponent modeling is often limited by a lack of domain expertise. We introduce Strategy-Augmented Planning (SAP), a two-stage framework that enhances LLM-based agents via a Strategy Evaluation Network (SEN). In the offline stage, we construct an explicit strategy space and train the SEN on strategy-outcome data. During the online phase, SAP recognizes opponent strategies and searches for the best response using the SEN, translating these into actions via grounded planning. In MicroRTS, SAP achieves an 85.35% performance improvement over baselines and matches state-of-the-art reinforcement learning approaches.
Introduction
In competitive environments like Real-Time Strategy (RTS) games, success depends on the ability to predict and counter an opponent's moves. While Large Language Models (LLMs) excel at reasoning and instruction following, they often struggle in high-stakes adversarial domains. These limitations typically stem from three factors: a lack of inherent domain expertise (the "meta" of the game), context window constraints that prevent processing long game trajectories, and a tendency toward static planning that fails to adapt to tactical shifts.
Existing approaches often rely on in-context learning, which requires the LLM to already possess significant game-specific knowledge. SAP addresses these issues by explicitly modeling the strategy space and providing a mechanism for dynamic exploitation through a specialized evaluation network.
The Strategy-Augmented Planning (SAP) Framework
SAP bridges the gap between high-level strategic reasoning and low-level action execution through a two-stage process that combines the reasoning power of LLMs with the predictive efficiency of a neural network.
Offline Stage: Preparation
The goal of the offline stage is to build a "strategic brain" for the agent. This involves three key steps:
- Strategy Generation: A diverse library of strategies is defined within a structured "Strategy Space" (encompassing economic focus, barracks timing, military composition, and aggression levels). An LLM is used to populate this space with distinct strategic profiles.
- Strategy Battles: These strategies are simulated against one another in thousands of matches to generate a robust dataset of outcomes.
- SEN Fitting: This data is used to train the Strategy Evaluation Network (SEN), a 3-layer Multi-Layer Perceptron (MLP). The SEN learns to take two strategies as input and predict the win probability of one against the other.
Online Stage: Exploitation
During live gameplay, SAP operates in a continuous loop to ensure the agent remains adaptive:
- Opponent Recognition: A Trajectory Summarizer condenses raw game data into an abstract format. An LLM then identifies the opponent's current strategy based on this summary.
- Strategy Search: The agent queries the SEN to identify the "best response" strategy from the strategy space that maximizes the win probability against the recognized opponent strategy.
- Grounded Planning: The LLM acts as a planner, taking the selected best response and a set of "Expert Tips" (hand-coded rules) to generate a sequence of abstract actions for the game engine to execute.
Experimental Results
The framework was evaluated in MicroRTS, a standard research environment for RTS AI. Testing was conducted on 8x8 and 16x16 maps against 13 specialized scripted bots.
SAP demonstrated a massive performance gain, outperforming the Tips-augmented (TA) baseline by 85.35%. On the 8x8 map, SAP achieved an overall win rate of 97% against various bot types. Notably, SAP's performance was competitive with state-of-the-art Reinforcement Learning (RL) approaches like Gridnet, particularly when facing top-tier scripted bots such as CoacAI. The SEN itself proved highly reliable, achieving a 93.3% success rate in identifying winning strategies against previously unseen opponents.
Key Insights
- Low-Dimensional Strategy Features: Mapping complex behaviors to a discrete numerical vector space allows for efficient training of the SEN, avoiding the computational overhead of training on raw state vectors or pixels.
- Generalization to the Unseen: SAP performed exceptionally well against "unseen" strategies—those not included in the initial training set. This suggests the SEN captures fundamental strategic relationships rather than just memorizing specific matchups.
- The Role of Expert Tips: Ablation studies confirmed that "Expert Tips" are vital for grounding high-level strategies into executable plans; without them, performance dropped by over 68%.
Conclusion
Strategy-Augmented Planning (SAP) provides a robust framework for enabling LLMs to perform effectively in adversarial environments. By decoupling strategic evaluation from action planning and utilizing a specialized evaluation network, SAP overcomes the traditional limitations of LLM-based agents. Future work will explore scaling the framework to larger maps and more complex multi-player scenarios.
Summary updated