NEURIPS 2026

RuleSmith

Multi-Agent LLMs for Automated Game Balancing

Ziyao Zeng1,  Hao Wang2,  Chen Liu1,  Youheng Yao1,  Jingcheng Ni3,  Tianyu Liu1,  Xiatao Sun1,  Fengyu Yang1,  Chenyu You4,  Xiaofeng Liu1,  Daniel Rakita1,  Ronald R. Coifman1,  Yuval Kluger1,  Zhiwen Fan2

1Yale University2Texas A&M University3Brown University4Stony Brook Universityziyao.zeng@yale.edu

LLM agents play-test the game from its natural-language rulebook, and Bayesian optimization tunes the rules from their win rates, turning a game where one side won 100% of the time into a 51–49 split.

Illustration of RuleSmith: two LLM agents play a strategy game on a war table while a Bayesian optimization engine rewrites the rulebook, and a scale between Empire and Nomads reads 50% win rate, balanced.
Win rate · Empire vs Nomads Hand-tuned rules — one side always wins
0%balanced zone 45–55%100%
12
tunable rule parameters across economy, combat, production and scoring
1.9×1010
discrete rule configurations, too many to play-test by hand
1.00 → 0.02
balance loss, from the authors' initial rules to RuleSmith's
Zero-shot
self-play from the rulebook, with no task-specific policy training
Watch

Thirty seconds, or the full talk

Abstract

Balance, forged by agents that play the game.

TL;DRLLM self-play + Bayesian optimization can automatically balance asymmetric strategy games from natural-language rulebooks.

Game balancing is a longstanding challenge requiring repeated playtesting, expert intuition, and extensive manual tuning. We introduce RuleSmith, the first framework that achieves automated game balancing by leveraging the reasoning capabilities of multi-agent LLMs. It couples a game engine, multi-agent LLMs self-play, and Bayesian optimization operating over a multi-dimensional rule space. As a proof of concept, we instantiate RuleSmith on CivMini, a simplified civilization-style game containing heterogeneous factions, economy systems, production rules, and combat mechanics, all governed by tunable parameters. LLM agents interpret textual rulebooks and game states to generate actions, to conduct fast evaluation of balance metrics such as win-rate disparities. To search the parameter landscape efficiently, we integrate Bayesian optimization with acquisition-based adaptive sampling and discrete projection: promising candidates receive more evaluation games for accurate assessment, while exploratory candidates receive fewer games for efficient exploration. Experiments show that RuleSmith converges to highly balanced configurations and provides interpretable rule adjustments that can be directly applied to downstream game systems. Our results illustrate that LLM simulation can serve as a powerful surrogate for automating design and balancing in complex multi-agent environments.

I

Executable self-play from natural-language rulebooks

Multi-agent LLMs perform zero-shot self-play in an executable, asymmetric strategy game from natural-language rulebooks and structured game states, producing legal and verifiable actions without training.

II

A multi-agent pipeline for automated balancing

A general framework integrating multi-agent LLM self-play with Bayesian optimization and acquisition-based adaptive sampling to adjust rule parameters and reach balanced outcomes in asymmetric strategic environments.

III

Comprehensive empirical validation

Across model sizes (2B, 8B) and faction configurations on CivMini, RuleSmith consistently achieves near-balanced outcomes (50% ± 5% win rates), with interpretable parameters that transfer across evaluation settings.

Method

Play, measure, re-forge. Repeat.

We balance an asymmetric, parameterized, turn-based strategy game by optimizing its rule parameters so that two roles, Empire and Nomads, achieve approximately equal win rates when controlled by LLM agents.

1Propose

Candidate rules θt

A Bayesian optimizer with a Gaussian-process surrogate proposes rules by maximizing an acquisition function.

2Project

Discretize with D(·)

Continuous proposals are mapped to valid discrete rule sets (integers, or 0.1 steps) before evaluation.

3Self-play

LLM agents play Nt games

Empire and Nomads agents read the rulebook and game state and act. Expected Improvement sets Nt ∈ [16, 64].

4Measure

Balance loss ℒ(θ)

Win and draw rates give ℒ(θ), which updates the surrogate and steers the next proposal.

↺ 100 iterations
RuleSmith method diagram: an imbalanced game with parameter space Theta goes through initial parameter extraction, a Gaussian-process Bayesian optimization engine, and an LLM self-play evaluator with the CivMini engine and Empire and Nomad LLM agents, producing optimized parameters and a balanced game.

Figure 2: Overview of the RuleSmith method. We represent CivMini as a parameterized rule space θ. Given a candidate θt, two LLM agents (Empire and Nomads) play Nt self-play games, producing a balance loss ℒ(θ). A Bayesian optimizer maintains a surrogate g(θ) and selects new candidates by maximizing an acquisition function. The number of games Nt is adaptively set by Expected Improvement; continuous proposals are mapped to discrete rulesets via D(·) before evaluation.

Balance objective
ℒ(θ) = |wE(θ) − 0.5| + |wN(θ) − 0.5| + 0.5·wD(θ)

wE, wN, wD: Empire win, Nomads win and draw rates over the self-play games.

Adaptive sampling
Nt ∈ [16, 64] games

Promising candidates get more games for accurate assessment; exploratory ones get fewer.

The game

CivMini: two asymmetric factions on a 7×7 grid.

A turn-based, civilization-style game. Each turn, every unit takes one action. Win by destroying the opponent's city, or by the higher score at the turn limit (score = weighted resources + battles won + surviving units).

Empire

Builds an economy, then defends it.

  • Farmer gathers resources only
  • Soldier fights only, moves 1 cell per turn

Nomads

Raids for resources and strikes fast.

  • Cavalry fights and moves 2 cells per turn; gains resources by killing

Actions

GATHERMOVEBATTLEPRODUCE_RESOURCEPRODUCE_UNITPASS

Victory

Destroy the opponent's city, or else hold the highest score at the turn limit.

The rulebook, before and after

100%:0%
EmpireNomads
balance loss ℒ = 1.00

The authors' initial configuration vs. the one RuleSmith found with InternVL3.5-8B agents on both sides; win rates over 100 held-out games. All 12 parameters are tuned jointly, so no single edit is credited on its own.

Results

Near-even outcomes, wherever the rules were forged.

Optimized winning chances under different training (rows) and evaluation (columns) pairings. E = Empire, N = Nomads; each cell is Empire wins | Nomads wins. Cells within 50% ± 5% are marked balanced. Model sizes: 2B, 8B.

Balanced (50% ± 5%) Empire-favored Nomads-favored The diagonal (train = eval) is balanced; mismatched agent capacities shift outcomes toward the stronger side.

Ablation on optimization methods

Random Search and (1+1)-ES use fixed N = 64 games per iteration; BO with adaptive sampling uses N ∈ [16, 64]. Win rates as Empire | Nomads.

Ablation on game designs

RuleSmith achieves balanced win rates across map sizes and turn limits (turns in parentheses).

Game rollouts

Watch the agents play.

Representative CivMini games under balanced parameters (InternVL3.5-8B for both factions), replayed move by move from the self-play logs. Drag the slider to scrub through the game.

Setup
Empire units
2
Nomads units
2

Citation

If you find our work useful, please cite.

@inproceedings{zeng2026rulesmith,
  title     = {Rulesmith: multi-agent llms for automated game balancing},
  author    = {Zeng, Ziyao and Wang, Hao and Liu, Chen and Yao, Youheng and Ni, Jingcheng and Liu, Tianyu and Sun, Xiatao and Yang, Fengyu and You, Chenyu and Liu, Xiaofeng and Rakita, Daniel and Coifman, Ronald R. and Kluger, Yuval and Fan, Zhiwen},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
  year      = {2026}
}