Learning Game-Playing Agents with Generative Code Optimization
On the map: LLM agents and tool use → Reinforcement learning for LLM agents
Abstract (arXiv)
We present a generative optimization approach for learning game-playing agents, where policies are represented as Python programs and refined using large language models (LLMs). Our method treats decision-making policies as self-evolving code, with current observation as input and an in-game action as output, enabling agents to self-improve through execution traces and natural language feedback with minimal human intervention. Applied to Atari games, our game-playing Python program achieves performance competitive with deep reinforcement learning (RL) baselines while using significantly less training time and much fewer environment interactions. This work highlights the promise of programmatic policy representations for building efficient, adaptable agents capable of complex, long-horizon reasoning.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Placed in Reinforcement learning for LLM agents, one of 16 directions in LLM agents and tool use. Builds on 33 of its 41 references that are in the map. First posted on arXiv 27 Aug 2025.
Builds on
33 of 41 references.
Closest ancestors · 4
Same direction, newest first
- 2025Pok'eChamp: an Expert-level Minimax Language Agent6 Mar
- 2024Playing NetHack with LLMs: Potential & Limitations as Zero-Shot Agents1 Mar
- 2023Large Language Models Play StarCraft II: Benchmarks and A Chain of Summarization Approach19 Dec
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Models25 May
Other references · 29
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2017Proximal Policy Optimization Algorithmscited by 15,215
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2013Playing Atari with Deep Reinforcement Learningcited by 3,274
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,546
- 2019Mastering Atari, Go, Chess and Shogi by Planning with a Learned Modelcited by 1,353
- 2020Mastering Atari with Discrete World Modelscited by 1,007
- 2017A Distributional Perspective on Reinforcement Learningcited by 765
- 2020Deep Reinforcement Learning for Autonomous Driving: A Surveycited by 721
- 2019Model-Based Reinforcement Learning for Ataricited by 502
- 2018Implicit Quantile Networks for Distributional Reinforcement Learningcited by 369
17 more
- 2018Distributed Prioritized Experience Replaycited by 269
- 2022Multi-Game Decision Transformerscited by 214
- 2018Verifiable Reinforcement Learning via Policy Extractioncited by 177
- 2021Embodied Intelligence via Learning and Evolutioncited by 163
- 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
- 2023UniDexGrasp: Universal Robotic Dexterous Grasping via Learning Diverse Proposal Generation and Goal-Conditioned Policycited by 124
- 2024Trace is the Next AutoDiff: Generative Optimization with Rich Feedback, Execution Traces, and LLMscited by 69
- 2021Learning to Synthesize Programs as Interpretable and Generalizable Policiescited by 59
- 2024Game-theoretic LLM: Agent Workflow for Negotiation Gamescited by 56
- 2023Errors are Useful Prompts: Instruction Guided Task Programming with Verifier-Assisted Iterative Promptingcited by 46
- 2021AlphaEvolve: A Learning Framework to Discover Novel Alphas in Quantitative Investmentcited by 32
- 2023OCAtari: Object-Centric Atari 2600 Reinforcement Learning Environmentscited by 30
- 2024EffiLearner: Enhancing Efficiency of Generated Code via Self-Optimizationcited by 30
- 2024LangProp: A code optimization framework using Large Language Models applied to drivingcited by 18
- 2025Playing games with Large language models: Randomness and strategycited by 7
- 2023Can You Improve My Code? Optimizing Programs with Local Searchcited by 1
- 2025Optimizing Code Runtime Performance through Context-Aware Retrieval-Augmented Generationcited by 1
Built on by
Citing papers per year: 2026: 8.
8 papers.
- 2026REFLEX: Reflective Evolution from LLM Experiencecited by 2
- 2026Overcoming the Weakest-Link Effect in LLM-Driven Program Optimization via Heterogeneous Edit Recombinationcited by 2
- 2026Scope3Trace: Evidence-Based Identification and Extraction of Scope 3 GHG Emissions from Sustainability Reportscited by 0
- 2026When Derived Measurements Mislead: Quantifying and Mitigating LLM Over-Trust with Privileged-Modality Reliability Evidencecited by 0
- 2026Bioinfoysis Technical Reportcited by 0
- 2026Compiled Agency: Frontier General-Purpose Coding Agents Build Winning Game Players from Bare Interaction - from Flappy Bird to StarCraft II and Civilizationcited by 0
- 2026Counterfactual Rollout Replay: Forkable Environments as Free Process Rewards for Software Engineering Agentscited 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
- 2026Counterfactual Rollout Replay: Forkable Environments as Free Process Rewards for Software Engineering Agents27 Sep 2026
- 2026Bioinfoysis Technical Report3 Sep 2026
- 2026Overcoming the Weakest-Link Effect in LLM-Driven Program Optimization via Heterogeneous Edit Recombination31 Jul 2026
- 2026When Derived Measurements Mislead: Quantifying and Mitigating LLM Over-Trust with Privileged-Modality Reliability Evidence30 Jul 2026
- 2026Scope3Trace: Evidence-Based Identification and Extraction of Scope 3 GHG Emissions from Sustainability Reports19 Jul 2026
- 2026Compiled Agency: Frontier General-Purpose Coding Agents Build Winning Game Players from Bare Interaction - from Flappy Bird to StarCraft II and Civilization17 Jul 2026
- 2026REFLEX: Reflective Evolution from LLM Experience15 Jun 2026
Similar, not cited
Close in wording, no citation either way
- 2025Policy-Conditioned Policies for Multi-Agent Task Solving
- 2025PolicyEvolve: Evolving Programmatic Policies by LLMs for multi-player games via Population-Based Training
- 2026PlayTrain: An Efficient Reinforcement Learning Framework for LLM-Generated Adaptable JavaScript Games
- 2024Agent-Pro: Learning to Evolve via Policy-Level Reflection and Optimization
- 2026Modular Discovery of General Game-Playing Algorithms with Large Language Models
- 2026Distilling Game Code World Model Generation into Lightweight Large Language Models
- 2025Agents Play Thousands of 3D Video Games
- 2026Player-1: Learning to Play from Synthetic Experience