From Code to Play: Benchmarking Program Search for Games Using Large Language Models
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have shown impressive capabilities in generating program code, opening exciting opportunities for applying program synthesis to games. In this work, we explore the potential of LLMs to directly synthesize usable code for a wide range of gaming applications, focusing on two programming languages, Python and Java. We use an evolutionary hill-climbing algorithm, where the mutations and seeds of the initial programs are controlled by LLMs. For Python, the framework covers various game-related tasks, including five miniature versions of Atari games, ten levels of Baba is You, an environment inspired by Asteroids, and a maze generation task. For Java, the framework contains 12 games from the TAG tabletop games framework. Across 29 tasks, we evaluated 12 language models for Python and 8 for Java. Our findings suggest that the performance of LLMs depends more on the task than on model size. While larger models generate more executable programs, these do not always result in higher-quality solutions but are much more expensive. No model has a clear advantage, although on any specific task, one model may be better. Trying many models on a problem and using the best results across them is more reliable than using just one.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 33 of its 58 references that are in the map. First posted on arXiv 5 Dec 2024.
Builds on
33 of 58 references.
References · 33
- 2023GPT-4 Technical Reportcited by 18,132
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,081
- 2023Eureka: Human-Level Reward Design via Coding Large Language Modelscited by 542
- 2018Programmatically Interpretable Reinforcement Learningcited by 192
- 2017Procedural Content Generation via Machine Learning (PCGML)cited by 136
- 2023From Word Models to World Models: Translating from Natural Language to the Probabilistic Language of Thoughtcited by 118
- 2024WorldCoder, a Model-Based LLM Agent: Building World Models by Writing Code and Interacting with the Environmentcited by 99
21 more
- 2024LLaMEA: A Large Language Model Evolutionary Algorithm for Automatically Generating Metaheuristicscited by 92
- 2019Few-Shot Bayesian Imitation Learning with Logical Program Policiescited by 30
- 2024Game Generation via Large Language Modelscited by 24
- 2024GAVEL: Generating Games Via Evolution and Language Modelscited by 24
- 2019Inductive general game playingcited by 18
- 2023Learning MDL logic programs from noisy datacited by 15
- 2024Synthesizing Programmatic Reinforcement Learning Policies with Large Language Model Guided Searchcited by 13
- 2024Loose LIPS Sink Ships: Asking Questions in Battleship with Language-Informed Program Samplingcited by 12
- 2024The Ink Splotch Effect: A Case Study on ChatGPT as a Co-Creative Game Designercited by 12
- 2018Evolving simple programs for playing Atari gamescited by 8
- 2023Choosing Well Your Opponents: How to Guide the Synthesis of Programmatic Strategiescited by 8
- 2023Learning of Generalizable and Interpretable Knowledge in Grid-Based Reinforcement Learning Environmentscited by 5
- 2024Searching for Programmatic Policies in Semantic Spacescited by 5
- 2024Learning big logical rules by joining small rulescited by 4
- 20243D Building Generation in Minecraft via Large Language Modelscited by 3
- 2024KnowPC: Knowledge-Driven Programmatic Reinforcement Learning for Zero-shot Coordinationcited by 2
- 2018A Genetic Programming Framework for 2D Platform AIcited by 1
- 2020Software Engineering For Automated Game Designcited by 1
- 2020Design and Implementation of TAG: A Tabletop Games Frameworkcited by 1
- 2022Keke AI Competition: Solving puzzle levels in a dynamically changing mechanic spacecited by 1
- 2024Unveiling the Decision-Making Process in Reinforcement Learning with Genetic Programmingcited by 1
Built on by
Citing papers per year: 2025: 2; 2026: 3.
5 papers.
- 2025Evaluating LLMs in Open-Source Gamescited by 5
- 2026Spatial Reasoning in LLM Game Agents: Impact of Causal Context and Multi-Step Planningcited by 1
- 2025Observer, Not Player: Simulating Theory of Mind in LLMs through Game Observationcited by 0
- 2026Frontier Coding Agents Can Now Implement an AlphaZero Self-Play Machine Learning Pipeline For Connect Four That Performs Comparably to an External Solvercited by 0
- 2026Can AI Agents Learn Their Way to the Top? Evaluating Heuristic Learning in a Long-Running Game Agent Competitioncited by 0
- 2026Can AI Agents Learn Their Way to the Top? Evaluating Heuristic Learning in a Long-Running Game Agent Competition8 Oct 2026
- 2026Spatial Reasoning in LLM Game Agents: Impact of Causal Context and Multi-Step Planning22 Jul 2026
- 2026Frontier Coding Agents Can Now Implement an AlphaZero Self-Play Machine Learning Pipeline For Connect Four That Performs Comparably to an External Solver27 Apr 2026
- 2025Observer, Not Player: Simulating Theory of Mind in LLMs through Game Observation22 Dec 2025
- 2025Evaluating LLMs in Open-Source Games29 Nov 2025