Modular Discovery of General Game-Playing Algorithms with Large Language Models
Organizations: Google DeepMind · Work done while at Google DeepMind
Abstract
General Game Playing across arbitrary games from rules alone remains challenging due to differing algorithmic requirements across game classes and strict decision-time constraints. Rather than hand-designing search heuristics for specific domains, can we leverage Large Language Models (LLMs) to discover general game-playing algorithms? Because language models can propose and refactor structured code, they provide an expressive proposal engine for exploring the space of algorithmic designs. We introduce a multi-agent LLM meta-learning system to co-evolve game-agnostic procedural search mechanisms in C++ alongside domain heuristics synthesized directly from game rules. Controlling the compute budget, we benchmark the discovered mechanisms across more than 400 diverse environments, including OpenSpiel training and held-out games, procedural simulation engines, and games with deep neural policy-value representations trained via PPO. Evaluated via AlphaRank stationary distributions and Soft Condorcet Optimization (SCO) against 15 established MCTS baselines, the discovered search mechanisms consistently achieve top-tier ratings and pairwise ballot majorities over most baselines across independent evolutionary runs, generalizing to unseen human-designed and procedurally synthesized games and remaining competitive with baselines on frozen neural network representations.
Figures & tables
| Algorithmic Paradigm / Baseline | Training Games (50) | Held-Out Games (19) | Synthesized Games (360) | Neural PPO Games (17) | ||||
|---|---|---|---|---|---|---|---|---|
| SCO Rating | Win % | SCO Rating | Win % | SCO Rating | Win % | SCO Rating | Win % | |
| Discovered Search Mechanism (Ours) | ||||||||
| (Multi-run aggregate) | — | — | — | — | ||||
| ( Bifv-Mcts ) | — | — | — | — | ||||
| Bandit Tree Search | ||||||||
| Vanilla UCT ( Kocsis and Szepesvári, 2006 ) | ||||||||
Appendix figures & tables29 assets
Supplementary material from the paper’s appendix.
Appendix
| Module Interface | Type Signature | Operational Role |
| Procedural Mechanism Modules (Game-Agnostic Quintet, ) | ||
| TreePolicy | Balances exploitation vs. exploration during tree descent | |
| ValueBackup | Propagates leaf payoff vectors along traversed trajectory | |
| RootActionSelector | Schedules root simulation budget across candidate actions | |
| FinalActionSelector | Selects final action and posterior policy distribution | |
| VirtualLoss | Coordinates asynchronous parallel search workers | |
| Game | Curve | Game | Curve | ||||||
|---|---|---|---|---|---|---|---|---|---|
| antichess | 20 | 50 | 500 | Mono | hearts | 20 | 50 | 500 | Flat |
| backgammon | 40 | 100 | 500 | Flat | hex | 80 | 200 | 500 | Flat |
| banqi | 20 | 50 | 500 | Mono | kriegspiel | 40 | 100 | 32 | Flat |
| bargaining | 320 | 800 | 500 | Mono | kuhn_poker | 20 | 50 | 500 | Flat |
| breakthrough | 40 | 100 | 500 | Flat | latent_ttt | 40 | 100 | 500 | Mono |
| bridge | 20 | 50 | 500 | Flat | leduc_poker | 20 | 50 | 500 | Flat |
| Configuration | Kuhn poker | Leduc poker | Liar’s dice |
|---|---|---|---|
| Uniform random | 0.4583 | 2.3736 | 0.7807 |
| Baseline ( ) | |||
| Mechanism ( ) | |||
| PUCT ( ) | |||
| Mechanism ( ) | |||
| Full system ( ) |
| Kuhn poker | Leduc poker | Liar’s dice | |||||
|---|---|---|---|---|---|---|---|
| Module | |||||||
| Mechanism ( ) | 20 | ||||||
| 100 | |||||||
| 1000 | |||||||
| Domain Knowledge ( ) | 20 | ||||||
| 100 | |||||||
| Game | Configuration | Mean SE | 95% CI |
|---|---|---|---|
| Kuhn Poker | PUCT baseline ( ) | 0.2224 0.0001 | [0.2222, 0.2226] |
| Evolved mechanism alone ( ) | 0.1412 0.0081 | [0.1253, 0.1571] | |
| PUCT + evolved domain knowledge ( ) | 0.1652 0.0323 | [0.1019, 0.2285] | |
| Full co-evolved system ( ) | 0.1280 0.0136 | [0.1013, 0.1547] | |
| Leduc Poker | PUCT baseline ( ) | 1.8700 0.0007 | [1.8686, 1.8714] |
| Evolved mechanism alone ( ) | 1.4051 0.0264 | [1.3534, 1.4568] |
| Knowledge | Belief | Sims | Evolved Mech | PUCT Mech | Within-Row Mech Contrast | Contrast vs. Baseline |
|---|---|---|---|---|---|---|
| (Mean SE) | (Mean SE) | (%, ) | (%, ) | |||
| Seed | Native | 20 | 0.1879 0.0053 | 0.2966 0.0003 | -36.6% ( ) | -36.6% ( ) |
| Seed | Native | 50 | 0.1595 0.0071 | 0.2450 0.0001 | -34.9% ( ) | -34.9% ( ) |
| Seed | Native | 100 | 0.1412 0.0081 | 0.2224 0.0001 | -36.5% ( ) | -36.5% ( ) |
| Seed | Native | 500 | 0.1177 0.0085 | 0.1873 0.0002 | -37.1% ( ) | -37.1% ( ) |
| Seed | Native | 1000 | 0.1237 0.0085 | 0.1698 0.0001 | -27.1% ( ) | -27.1% ( ) |
| Knowledge | Belief | Sims | Evolved Mech | PUCT Mech | Within-Row Mech Contrast | Contrast vs. Baseline |
|---|---|---|---|---|---|---|
| (Mean SE) | (Mean SE) | (%, ) | (%, ) | |||
| Seed | Native | 20 | 1.7759 0.0067 | 2.1116 0.0017 | -15.9% ( ) | -15.9% ( ) |
| Seed | Native | 50 | 1.5908 0.0128 | 1.9799 0.0014 | -19.7% ( ) | -19.7% ( ) |
| Seed | Native | 100 | 1.4051 0.0264 | 1.8700 0.0007 | -24.9% ( ) | -24.9% ( ) |
| Seed | Native | 500 | 1.0711 0.0263 | 1.6381 0.0006 | -34.6% ( ) | -34.6% ( ) |
| Seed | Native | 1000 | 0.9521 0.0213 | 1.5171 0.0006 | -37.2% ( ) | -37.2% ( ) |
| Knowledge | Belief | Sims | Evolved Mech | PUCT Mech | Within-Row Mech Contrast | Contrast vs. Baseline |
|---|---|---|---|---|---|---|
| (Mean SE) | (Mean SE) | (%, ) | (%, ) | |||
| Seed | Native | 20 | 0.6854 0.0105 | 0.7285 0.0009 | -5.9% ( ) | -5.9% ( ) |
| Seed | Native | 50 | 0.6469 0.0052 | 0.7165 0.0010 | -9.7% ( ) | -9.7% ( ) |
| Seed | Native | 100 | 0.6446 0.0069 | 0.7054 0.0009 | -8.6% ( ) | -8.6% ( ) |
| Seed | Native | 500 | 0.6041 0.0060 | 0.6372 0.0011 | -5.2% ( ) | -5.2% ( ) |
| Seed | Native | 1000 | 0.5659 0.0085 | 0.5700 0.0004 | -0.7% ( ) | -0.7% ( ) |
| Baseline | Algorithmic Paradigm | Hyperparameter | Search Grid | Selected Value ( ) |
| Vanilla UCT | Bandit Tree Search | Exploration constant | ||
| PUCT | Bandit Tree Search | Predictor weight | ||
| UCB-Tuned | Bandit Tree Search | Variance scale | ||
| Gumbel AlphaZero | Entropy Planning | Improvement scale | ||
| MENTS | Entropy Planning | Temperature Exploration | ||
| RPO | Entropy Planning | Regularization temperature |
| Category | Game | Type | Players | Horizon / Complexity |
| Perfect Info Deterministic | Amazons | Board territory | 2 | Deep, high branching |
| Quoridor | Path maze | 2 | Medium, topological | |
| Twixt | Connection | 2 | Medium, virtual links | |
| Oware | Mancala variant | 2 | Medium, pit counting | |
| Ultimate Tic-Tac-Toe | Nested grid | 2 | High tactical branching | |
| Nine Men’s Morris | Mill alignment | 2 | Moderate, phase shifts |
| Structural Dimension | Category / Profile | Count ( ) | Percentage |
|---|---|---|---|
| Information Structure | Imperfect Information (hidden hands, fog-of-war, private cards) | 166 | 46.1% |
| Perfect Information Deterministic | 133 | 36.9% | |
| Perfect Information Stochastic (dice rolls, chance transitions) | 61 | 16.9% | |
| Player Count | 2-Player | 317 | 88.1% |
| 4-Player | 24 | 6.7% | |
| 3-Player | 7 | 1.9% |
| Independent Evolution Run | Synthesized Games | Held-Out Games | Training Games | Neural PPO Games |
|---|---|---|---|---|
| Bifv-Mcts ( , Case Study) | 508.58 (Rank 1) | 509.93 (Rank 1) | 509.53 (Rank 1) | 510.31 (Rank 1) |
| Seed 4 | 508.52 (Rank 1) | 510.15 (Rank 1) | 509.92 (Rank 1) | 508.05 (Rank 1) |
| Seed 1 | 508.96 (Rank 1) | 509.63 (Rank 1) | 507.83 (Rank 2) | 508.30 (Rank 2) |
| Seed 5 | 509.45 (Rank 1) | 507.50 (Rank 2) | 509.93 (Rank 1) | 510.66 (Rank 1) |
| Seed 2 | 509.45 (Rank 1) | 509.59 (Rank 1) | 509.48 (Rank 1) | 507.25 (Rank 2) |
| Aggregate Mean SE |
| Independent Evolution Run | Synthesized Games | Held-Out Games | Training Games | Neural PPO Games |
|---|---|---|---|---|
| Bifv-Mcts ( , Case Study) | 508.99 (Rank 1) | 510.57 (Rank 1) | 510.40 (Rank 1) | 510.01 (Rank 1) |
| Seed 5 | 508.93 (Rank 1) | 510.91 (Rank 1) | 508.61 (Rank 1) | 509.20 (Rank 1) |
| Seed 1 | 508.84 (Rank 1) | 508.05 (Rank 2) | 510.18 (Rank 1) | 505.83 (Rank 3) |
| Seed 4 | 507.44 (Rank 1) | 507.33 (Rank 1) | 508.06 (Rank 2) | 506.31 (Rank 3) |
| Seed 2 | 509.33 (Rank 1) | 501.80 (Rank 7) | 507.25 (Rank 2) | 502.29 (Rank 6) |
| Aggregate Mean SE |
| Algorithmic Paradigm / Baseline | Training Games (50) | Held-Out Games (19) | Synthesized Games (360) | Neural PPO Games (17) | ||||
|---|---|---|---|---|---|---|---|---|
| SCO Rating | Win % | SCO Rating | Win % | SCO Rating | Win % | SCO Rating | Win % | |
| Discovered Search Mechanism (Ours) | ||||||||
| (Multi-run aggregate) | — | — | — | — | ||||
| ( Bifv-Mcts ) | — | — | — | — | ||||
| Bandit Tree Search | ||||||||
| Vanilla UCT ( Kocsis and Szepesvári, 2006 ) | ||||||||
| Training (50) | Held-out (19) | Synthesized (360) | Neural PPO (17) | |
|---|---|---|---|---|
| Full Bifv-Mcts ( ) | 71.0 | 66.8 | 64.8 | 78.0 |
| (branching) | ||||
| (tie-break) | ||||
| (FPU anneal) | ||||
| (info scale) |
| Algorithm / Run | Exploration Schedule | Leaf Evaluation Policy ( ) | Value Backup Operator | Key Algorithmic Trait |
| Human-Engineered Prior Art | ||||
| Evolution Seed Template ( ) | Static scalar | Naive immediate expansion ( ) | Arithmetic mean | Minimal baseline template (evolution starting seed) |
| AlphaZero ( Silver et al., 2018 ) | Parent return | Arithmetic mean | Static single-game parameter schedule | |
| KataGo ( Wu, 2019 ) | Dynamic visit-dependent schedule | Utility-bounded normalizer | Arithmetic mean | Utility range clamping |
| Leela Chess Zero (Lc0) | Tuned logarithmic schedule | Arithmetic mean | Static prior-weighted FPU reduction | |
| Discovered Programs from Evolutionary Runs (Ours) | ||||
| Design Dimension | Vector / Tabular Architecture (MLP) | Spatial / Board Architecture (CNNResNet) |
| Target Game Families | Card, trick-taking, imperfect-information, coordination | 2D grid board games, connection, spatial territory |
| Evaluated Games (17 Total) | Contract Bridge, Hearts, Gin Rummy, Leduc Poker, | Chess, Shogi, Go 9 9, Go 13 13, |
| Backgammon, Bargaining, Coop Box, Phantom TTT, Dark Hex | Hex, Othello, Checkers, Gomoku | |
| Input Representation | Flat 1D feature vector | 3D tensor (board planes) |
| Backbone Structure | 2 Fully Connected layers (Dense-256) | 1 Initial Conv ( , 64 ch) + 4 ResNet Blocks |
| Residual Block Design | — | Two Conv- (64 ch) + skip connection |
| Game (Engine) | Architecture Pairing | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
|---|---|---|---|---|---|---|
| 1. Chess ( Stockfish ) | vs Engine | 6.7% 1.8 | 6.3% 1.7 | 6.1% 2.2 | 5.3% 2.3 | 4.7% 2.1 |
| vs Engine | 0.0% 0.0 | 0.2% 0.1 | 0.1% 0.1 | 0.0% 0.0 | 0.0% 0.0 | |
| H1: vs / H2: vs | 50.0% / 56.5% | 50.0% / 57.2% | 50.0% / 62.2% | 50.0% / 55.0% | 50.0% / 60.5% | |
| H3: vs ( ) / H4: vs | 0.8% / 15.3% | 0.8% / 9.2% | 0.8% / 15.9% | 0.8% / 18.4% | 0.8% / 18.8% | |
| 2. Checkers ( Kingsrow ) | vs Engine | 0.0% 0.0 | 0.4% 0.1 | 0.5% 0.2 | 0.7% 0.4 | 1.1% 0.2 |
| vs Engine | 0.1% 0.1 | 0.2% 0.1 | 0.2% 0.0 | 0.3% 0.1 | 0.5% 0.2 |
| Lineage / Aggregation | Empirical Tensor Entry | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
| Seed 1 | vs Stockfish (Floor) | 5.0% | 5.0% | 2.5% | 3.2% | 2.5% |
| vs Stockfish (Floor) | 0.0% | 0.5% | 0.0% | 0.0% | 0.0% | |
| H1: vs | 50.0% | 50.0% | 50.0% | 50.0% | 50.0% | |
| H2: vs | 68.1% | 67.6% | 63.7% | 33.2% | 39.3% | |
| H4: vs | 7.5% | 11.0% | 12.9% | 19.5% | 18.5% | |
| Seed 2 | vs Stockfish (Floor) | 7.3% | 7.2% | 6.2% | 1.8% | 1.0% |
| Lineage / Aggregation | Empirical Tensor Entry | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
| Seed 1 | vs Kingsrow (Floor) | 0.0% | 0.0% | 0.5% | 1.0% | 1.7% |
| vs Kingsrow (Floor) | 0.0% | 0.5% | 0.2% | 0.8% | 1.0% | |
| H1: vs | 50.0% | 50.0% | 50.0% | 71.2% | 75.0% | |
| H2: vs | 98.5% | 99.8% | 100.0% | 98.2% | 100.0% | |
| H4: vs | 18.6% | 48.0% | 49.3% | 48.8% | 46.6% | |
| Seed 2 | vs Kingsrow (Floor) | 0.0% | 0.0% | 0.2% | 0.2% | 0.5% |
| Lineage / Aggregation | Empirical Tensor Entry | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
| Seed 1 | vs Egaroucid (Floor) | 65.2% | 31.5% | 40.0% | 44.4% | 35.8% |
| vs Egaroucid (Floor) | 0.0% | 0.5% | 0.0% | 3.4% | 0.0% | |
| H1: vs | 46.8% | 82.0% | 89.1% | 99.8% | 100.0% | |
| H2: vs | 89.0% | 98.9% | 100.0% | 100.0% | 100.0% | |
| H4: vs | 0.0% | 0.0% | 1.0% | 0.0% | 0.0% | |
| Seed 2 | vs Egaroucid (Floor) | 31.5% | 74.8% | 58.4% | 67.2% | 86.1% |
| Lineage / Aggregation | Empirical Tensor Entry | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
| Seed 1 | vs Engine (Floor) | 7.5% | 1.5% | 0.0% | 3.5% | 10.0% |
| vs Engine (Floor) | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | |
| H1: vs | 91.3% | 100.0% | 100.0% | 99.5% | 99.5% | |
| H2: vs | 94.0% | 99.5% | 98.0% | 99.2% | 100.0% | |
| H4: vs | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | |
| Seed 2 | vs Engine (Floor) | 0.0% | 0.5% | 0.0% | 0.5% | 0.0% |
| Lineage / Aggregation | Empirical Tensor Entry | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
| Seed 1 | vs YaneuraOu (Floor) | 0.0% | 0.0% | 0.0% | 0.0% | 0.5% |
| vs YaneuraOu (Floor) | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | |
| H1: vs | 79.2% | 94.5% | 95.0% | 99.0% | 99.5% | |
| H2: vs | 97.2% | 99.0% | 100.0% | 99.5% | 100.0% | |
| H4: vs | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | |
| Seed 2 | vs YaneuraOu (Floor) | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
| Lineage / Aggregation | Empirical Tensor Entry | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
| Seed 1 | vs KataHex (Floor) | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
| vs KataHex (Floor) | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | |
| H1: vs | 91.0% | 96.5% | 98.0% | 99.0% | 97.5% | |
| H2: vs | 11.5% | 25.0% | 37.5% | 59.0% | 100.0% | |
| H4: vs | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | |
| Seed 2 | vs KataHex (Floor) | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
| Lineage / Aggregation | Empirical Tensor Entry | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
| Seed 1 | vs KataGo (Floor) | 1.8% | 8.5% | 12.9% | 15.5% | 14.9% |
| vs KataGo (Floor) | 0.2% | 0.5% | 0.0% | 0.0% | 0.2% | |
| H1: vs | 79.8% | 86.2% | 60.5% | 69.8% | 77.7% | |
| H2: vs | 98.0% | 94.0% | 98.5% | 98.0% | 97.5% | |
| H4: vs | 1.7% | 1.2% | 0.5% | 1.0% | 0.5% | |
| Seed 2 | vs KataGo (Floor) | 1.0% | 1.0% | 4.0% | 14.5% | 15.5% |
| Lineage / Aggregation | Empirical Tensor Entry | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
| Seed 1 | vs KataGo (Floor) | 0.0% | 0.3% | 1.2% | 2.3% | 5.8% |
| vs KataGo (Floor) | 1.3% | 1.1% | 0.6% | 0.9% | 1.8% | |
| H1: vs | 72.6% | 70.1% | 59.9% | 66.1% | 61.5% | |
| H2: vs | 94.0% | 96.5% | 92.8% | 98.5% | 98.5% | |
| H4: vs | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | |
| Seed 2 | vs KataGo (Floor) | 0.0% | 0.0% | 0.2% | 0.3% | 2.7% |
| Lineage / Aggregation | Empirical Tensor Entry | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
| Seed 1 | vs Xinxin (Floor) | 26.7% (-10.6) | 25.0% (-11.4) | 31.0% (-9.4) | 26.8% (-11.3) | 21.5% (-12.1) |
| vs Xinxin (Floor) | 38.8% (-5.4) | 39.5% (-4.4) | 40.0% (-4.1) | 35.5% (-6.3) | 41.0% (-3.2) | |
| H1: vs | 54.5% (+1.5) | 49.5% (+0.4) | 56.0% (+2.2) | 53.7% (+1.6) | 61.4% (+3.3) | |
| H2: vs | 42.2% (-4.0) | 43.5% (-3.1) | 47.0% (-2.6) | 45.8% (-3.1) | 41.5% (-4.1) | |
| H4: vs | 77.5% (+10.5) | 78.6% (+11.7) | 79.2% (+12.0) | 76.1% (+9.5) | 81.8% (+12.5) | |
| Seed 2 | vs Xinxin (Floor) | 29.2% (-10.9) | 27.0% (-10.5) | 29.8% (-9.7) | 22.8% (-12.3) | 28.2% (-10.3) |
| Lineage / Aggregation | Empirical Tensor Entry | 100 Sims | 200 Sims | 400 Sims | 800 Sims | 1600 Sims |
| Seed 1 | vs WBridge5 (Default) | 9.1% (-1470) | 5.7% (-1528) | 11.6% (-1098) | 7.7% (-1154) | 10.4% (-1030) |
| vs WBridge5 (Default) | 7.4% (-1356) | 5.9% (-1400) | 4.4% (-1589) | 8.8% (-1266) | 4.7% (-1238) | |
| H1: vs | 56.0% (+385) | 48.0% (-91) | 44.6% (-72) | 49.0% (-144) | 58.5% (+346) | |
| H2: vs | 63.5% (+1215) | 77.2% (+1497) | 81.2% (+1957) | 76.6% (+1281) | 69.8% (+1606) | |
| H4: vs | 43.5% (+48) | 42.8% (-472) | 31.0% (-1029) | 25.5% (-1297) | 25.5% (-1314) | |
| Seed 2 | vs WBridge5 (Default) | 12.7% (-759) | 17.4% (-793) | 23.9% (-744) | 24.0% (-795) | 20.2% (-877) |
| Partnership Matchup (North-South vs. East-West) | Lineage Scope | 400 Sims Score% ( ) | 800 Sims Score% ( ) | 1600 Sims Score% ( ) |
|---|---|---|---|---|
| H2: vs. | All 5 Seeds | 70.5% 7.0 ( ) | 72.5% 5.3 ( ) | 66.5% 5.9 ( ) |
| H1: vs. | All 5 Seeds | 50.0% 2.1 ( ) | 50.7% 0.9 ( ) | 53.4% 2.3 ( ) |
| H4: vs. | All 5 Seeds | 38.8% 16.5 ( ) | 36.3% 17.1 ( ) | 37.1% 16.6 ( ) |
| vs. (Default) | All 5 Seeds | 13.8% 4.8 ( ) | 15.7% 6.6 ( ) | 13.2% 4.8 ( ) |
| vs. (Default) | All 5 Seeds | 5.0% 0.9 ( ) | 5.6% 1.2 ( ) | 5.2% 0.7 ( ) |