Empowering LLMs in Decision Games through Algorithmic Data Synthesis

Haolin Wang, Xueyan Li, Yazhe Niu, Shuai Hu, Hongsheng Li

TL;DR

While math and code have become standard training data for boosting reasoning in Large Language Models (LLMs), they lack the imperfect information and adversarial dynamics of real-world decision-making. This paper introduces algorithmic data synthesis pipelines based on two complex games—Doudizhu (imperfect information card game) and Go (perfect information, massive search space)—and fine-tunes open-source LLMs into competitive game-playing agents called Mastermind-Dou and Mastermind-Go. The resulting models match near-expert baselines and exhibit transfer gains on long-sequence reasoning benchmarks, though with noticeable catastrophic forgetting on unrelated knowledge tasks.

What Problem Does This Paper Address?

Current approaches to improving LLM reasoning heavily prioritize code synthesis and mathematical problem-solving. While effective, code and math are largely deterministic, symbolic, and explicit. Real-world decisions, by contrast, demand reasoning under incomplete information, hidden opponent intentions, spatial awareness, and non-deterministic feedback.

Games provide natural sandboxes with clear state-transition rules and multi-step planning requirements. However, raw game trajectories are not native to LLMs. The authors address two primary challenges:

  1. How to transform complex multi-dimensional game states and search trees into structured natural language and chain-of-thought (CoT) reasoning data without overwhelming LLM context windows.
  2. Whether post-training LLMs on strategic decision-making tasks improves their core game competence and transfers to general out-of-domain reasoning.

Methods

The authors develop dedicated data synthesis and post-training pipelines for two representative games:

[Raw Game Engine / Expert Agents] 
       │
       ├──> State Serialization (Textual grids, card rankings)
       ├──> Strategic Filtering (Top-p action pruning via RL Q-networks)
       └──> Multi-stage Reasoning Decomposition (Rule transitions, Opponent modeling, Value estimation)
       │
[Fine-Tuning (SFT / LoRA)] ──> Mastermind LLMs (LLaMA-2-7B, Gemma)

1. Mastermind-Dou (Doudizhu)

  • Text Representation & Action Pruning: Cards are mapped to sorted integers. Because Doudizhu has over 27,000 legal move combinations, the authors use a pre-trained RL Q-network from DouZero to select candidate moves within the top 25% probability mass (Top-$p$).
  • Three-Stage Reasoning Pipeline: Rather than directly predicting the move, the model produces a chain:
  • Possible Action Prediction: Generates viable high-win-rate candidates.
  • Opponent Strategy Prediction: Predicts opponent responses to candidate moves.
  • Final Action Selection: Evaluates the opponent counter-moves to commit to an optimal action.

2. Mastermind-Go (Go)

  • 1D Board Serialization: The 19×19 Go grid is serialized into row/column coordinates (A1 to T19) using symbols (o, #, •) augmented with recent move history tags (e.g., o(1), #(3)).
  • Curriculum of 4 Analytical Tasks:
  • Rule dynamics ($s, a \to s'$): Predict the next board state after stone placements and captures.
  • Position evaluation: Predict territorial ownership maps, point margins, and win rates using KataGo self-play evaluations. A programmatic "Count" tool calculates territory totals from generated ownership maps to prevent arithmetic hallucination.
  • Natural language commentary: Supervised on expert game-analysis books (e.g., Lee Sedol’s commentaries) linking board patterns to high-level strategic concepts.
  • Final decision: Synthesizes state, ownership, and strategic commentary to pick actions.

Datasets

The authors release an extensive synthetic dataset suite under MasterMind (hosted on Hugging Face):

  • Doudizhu Corpora:
  • Dou-prob: 1.71M samples (with probability thought chains) across 1,500 trajectories (~0.78T tokens).
  • Dou-no-prob: 1.71M direct state-to-action samples (~0.29T tokens).
  • Dou-pred-prob: 19.4k samples explicitly targeting opponent move forecasting.
  • Go Corpora:
  • Go-next-state: 150k board-transition samples (~0.23T tokens) for rule modeling.
  • Go-analysis: 138.7k board evaluations (~0.22T tokens) synthesized from KataGo (9-dan optimal and suboptimal self-play).
  • Go-state-expl: 1,503 human-annotated state-commentary pairs (~0.01T tokens) from Go literature.

Key Insights and Ideas

  • Beyond Imitation / Behavior Cloning: In Doudizhu matches against DouZero, Mastermind-Dou occasionally deviated from DouZero’s historical move choices early on, playing more aggressively to lock out the peasants and winning games that the expert RL model lost. This suggests the LLM acquired generalized heuristic strategies rather than simple token-level imitation.
  • Separating Spatial Counting from Strategic Evaluation: LLMs struggle with basic token counting on large serialized grids. Introducing a simple helper function to count marked board territories dramatically stabilized downstream win-rate estimation.
  • Transfer to Long-Sequence Reasoning: Fine-tuning on decision games translated into measurable performance gains on BIG-Bench Hard (BBH) tasks requiring temporal tracking and sequential state modeling.

Key Results

  • Doudizhu Performance:
  • Base LLaMA-2-7B achieves 0% action accuracy zero-shot and 21.18% few-shot.
  • Mastermind-Dou (with CoT) reaches 90% action accuracy and 0.98 ROUGE-L match with expert chains.
  • In live play as Landlord against the RLCard baseline, Mastermind-Dou achieves a 90% win rate (vs. 0% for base LLaMA-2). Against the expert RL model DouZero, it achieves a 41% win rate, approaching DouZero's self-play ceiling of 43%.
  • Larger models scale better: Gemma-7B-Mastermind attained 86.27% action accuracy versus 76.69% for Gemma-2B.
  • Go Proxy Performance:
  • Multi-task models achieved 96.08% accuracy in predicting next board states ($s'$)—even through multi-stone captures.
  • Position evaluation achieved a mean absolute error (MAE) of 1.74 points and a win-rate MAE of 4.49%.
  • General Reasoning Benchmarks (BBH):
  • Gains observed on sequence tasks: Temporal Sequences rose from 12.0% to 20.4%, and Navigate rose from 53.6% to 60.0%.

Limitations and Future Work

  • Catastrophic Forgetting: Fine-tuning solely on game sequences caused significant degradation in unrelated general capabilities (e.g., performance on BBH Date Understanding dropped from 60.4% to 22.8%, and Disambiguation QA fell from 46.8% to 32.4%). The authors suggest game data should be mixed during broader pretraining rather than applied via isolated post-training.
  • Computational Cost in Complex Search: Due to the combinatorial explosion of full-board Go, the model was evaluated primarily on proxy tasks (state prediction, territory estimation, commentary) rather than full end-to-end games.
  • Heuristic Opponent Modeling: In Doudizhu, predicting the exact chain of opponent hidden moves remained capped at ~39% accuracy due to imperfect information, showing that modeling non-stationary human play remains an open hurdle.

Summary updated

BibTeX
@inproceedings{wang2025empowering,
  author = {Haolin Wang and Xueyan Li and Yazhe Niu and Shuai Hu and Hongsheng Li},
  title = {{Empowering LLMs in Decision Games through Algorithmic Data Synthesis}},
  booktitle = {SynthData @ ICLR},
  year = {2025},
  url = {https://openreview.net/forum?id=1RIHEJWN1L},
}
Figure