Strategy-Augmented Planning for Large Language Models via Opponent Exploitation

Shuai Xu, Sijia Cui, Yanna Wang, Bo Xu, Qi Wang

Large Language Models (LLMs) have shown a knack for reasoning, but drop them into a high-stakes, competitive Real-Time Strategy (RTS) game, and they often struggle. They lack the "game sense" to predict an opponent's move and adjust their own strategy accordingly. A new paper, Strategy-Augmented Planning for Large Language Models via Opponent Exploitation, introduces a framework called SAP to bridge this gap.

TL;DR

The researchers developed Strategy-Augmented Planning (SAP), a two-stage framework that enables LLM-based agents to recognize and exploit opponent strategies in competitive environments. By using a specialized Strategy Evaluation Network (SEN) to predict win probabilities, SAP achieves an 85.35% performance boost over standard LLM planning methods in the MicroRTS environment.

What Problem Does This Paper Address?

In adversarial domains like games, your success depends entirely on what your opponent does. Traditional AI handles this through complex reinforcement learning or massive search trees. LLMs, while great at following instructions, often fail here because:

  1. Lack of Domain Expertise: They don't inherently understand the "meta" of a specific game.
  2. Context Limits: Game trajectories are too long to feed into a prompt.
  3. Static Planning: They often generate a plan and stick to it, failing to adapt when an opponent switches tactics.

Existing LLM-based game agents usually rely on "in-context learning" (giving the LLM a description of the opponent), but this only works if the LLM is already familiar with the game (like StarCraft II). SAP aims to make LLMs effective even in unfamiliar, complex environments by explicitly modeling the "strategy space."

Methods

SAP operates in two distinct phases:

1. Offline Preparation (Building the "Brain")

  • Strategy Generation: The researchers define a "Strategy Space" (e.g., economic focus, aggression level, unit types). An LLM (Qwen2.5-72B-Instruct) is used to generate a library of diverse strategies within this space.
  • Strategy Battles: These strategies are pitted against each other in thousands of simulated matches to collect outcome data.
  • SEN Fitting: This data trains the Strategy Evaluation Network (SEN)—a simple 3-layer Multi-Layer Perceptron (MLP). The SEN's job is to take two strategies as input and predict the probability of one beating the other.

2. Online Exploitation (Playing the Game)

  • Opponent Recognition: During a live game, a "Trajectory Summarizer" condenses the raw game data into a manageable format. An LLM then looks at this summary to identify which strategy the opponent is currently using.
  • Greedy Search: Once the opponent's strategy is identified, the agent queries the SEN to find the "best response" strategy from the entire strategy space.
  • Grounded Planning: The LLM acts as a planner, taking the "best response" strategy and "Expert Tips" (hand-coded rules to bridge high-level strategy and low-level actions) to generate a sequence of abstract actions for the game engine to execute.

Datasets

The framework was evaluated using MicroRTS, a high-performance research environment for RTS AI.

  • Maps: Standard basesWorkers8x8 and the larger basesWorkers16x16.
  • Opponents: 13 specialized scripted bots from previous AI competitions (e.g., CoacAI, Tiamat, Droplet).
  • Training Data: 900 result data points generated from battles between 30 "seen" strategies.

Key Insights and Ideas

  • Low-Dimensional Strategy Features: By mapping complex game behaviors to a discrete numerical vector space, the researchers made it much easier to train the SEN. This is far more efficient than trying to train a deep neural network on raw game pixels or state vectors.
  • The "Best Response" Advantage: SAP doesn't just pick a "good" strategy; it searches for the specific counter to the opponent's current behavior.
  • Generalization to the Unseen: Surprisingly, SAP performed better against "unseen" strategies (those not in the training set) than "seen" ones. The authors suggest this is because the "seen" set contained a higher proportion of very strong, optimized strategies that are harder to beat regardless of the counter-play.
  • Expert Tips are Crucial: Ablation studies showed that without "Expert Tips" to guide the LLM's low-level planning, performance plummeted by over 68%.

Key Results

  • Massive Performance Gain: SAP outperformed the "Tips-augmented" (TA) baseline by 85.35%.
  • High Win Rates: In head-to-head matchups against various bot types, SAP achieved an overall win rate of 97% on the 8x8 map.
  • Competitive with RL: SAP matched or exceeded the performance of state-of-the-art Reinforcement Learning approaches (like Gridnet) when facing top-tier scripted bots like CoacAI and Izanagi.
  • Reliable Predictions: The SEN achieved a 93.3% success rate in identifying the winning strategy against real opponent strategies from the unseen set.

Limitations and Future Work

  • Map Scaling: While SAP performed well on 16x16 maps (95.22% win rate), there was a slight performance dip compared to 8x8. Larger maps introduce more complex situational changes that fixed-interval planning (every 200 steps) might miss.
  • Map-Specific Training: Currently, the SEN needs to be trained for specific map sizes to maintain peak performance.
  • Multi-player Complexity: The current study focuses on 1v1 scenarios. Extending this to multi-player environments where alliances and betrayals occur is a significant next step.
  • Interval Lag: Because the agent only re-evaluates the opponent's strategy every k steps, it might be slow to react to a sudden "tech switch" by a human-like opponent.

Summary updated

BibTeX
@inproceedings{xu2025strategy,
  author = {Shuai Xu and Sijia Cui and Yanna Wang and Bo Xu and Qi Wang},
  title = {{Strategy-Augmented Planning for Large Language Models via Opponent Exploitation}},
  booktitle = {IJCNN},
  year = {2025},
  url = {https://openreview.net/forum?id=5N8AXJTkaG},
}

Loading related content...

Figure