WorldCoder, a Model-Based LLM Agent: Building World Models by Writing Code and Interacting with the Environment
On the map: World models → World models for language agents
also in 1 more
Abstract (arXiv)
We give a model-based agent that builds a Python program representing its knowledge of the world based on its interactions with the environment. The world model tries to explain its interactions, while also being optimistic about what reward it can achieve. We define this optimism as a logical constraint between a program and a planner. We study our agent on gridworlds, and on task planning, finding our approach is more sample-efficient compared to deep RL, more compute-efficient compared to ReAct-style agents, and that it can transfer its knowledge across environments by editing its code.
Key facts. Cited by 107 papers in the map (data through 14 Oct 2026). Placed in World models for language agents, one of 11 directions in World models. Builds on 40 of its 62 references that are in the map. First posted on arXiv 19 Feb 2024.
Builds on
40 of 62 references.
Closest ancestors · 7
Same direction, newest first
- 2023Reason for Future, Act for Now: A Principled Framework for Autonomous LLM Agents with Provable Sample Efficiency29 Sep
- 2023Thinker: Learning to Plan and Act27 Jul
- 2023Reasoning with Language Model is Planning with World Model24 May
- 2023Leveraging Pre-trained Large Language Models to Construct and Utilize World Models for Model-based Task Planning24 May
- 2023Large Language Models as Commonsense Knowledge for Large-Scale Task Planning23 May
- 2023Language Models Meet World Models: Embodied Experiences Enhance Language Models18 May
- 2023Do Embodied Agents Dream of Pixelated Sheep: Embodied Decision Making using Language Guided World Modelling28 Jan
Other references · 33
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
- 2019Mastering Atari, Go, Chess and Shogi by Planning with a Learned Modelcited by 1,353
- 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,210
- 2020Mastering Atari with Discrete World Modelscited by 1,007
- 2023Teaching Large Language Models to Self-Debugcited by 988
- 2018Recurrent World Models Facilitate Policy Evolutioncited by 785
- 2023Eureka: Human-Level Reward Design via Coding Large Language Modelscited by 571
- 2017A Tutorial on Thompson Samplingcited by 433
- 2022Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Taskcited by 431
- 2022Transformers are Sample-Efficient World Modelscited by 328
- 2023Minigrid & Miniworld: Modular & Customizable Reinforcement Learning Environments for Goal-Oriented Taskscited by 327
21 more
- 2023On the Planning Abilities of Large Language Models : A Critical Investigationcited by 312
- 2015Contextual Markov Decision Processescited by 220
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 197
- 2023AdaPlanner: Adaptive Planning from Feedback with Language Modelscited by 196
- 2018Programmatically Interpretable Reinforcement Learningcited by 193
- 2020DreamCoder: Growing generalizable, interpretable knowledge with wake-sleep Bayesian program learningcited by 161
- 2023Look Before You Leap: Unveiling the Power of GPT-4V in Robotic Vision-Language Planningcited by 161
- 2023Hypothesis Search: Inductive Reasoning with Language Modelscited by 120
- 2023Phenomenal Yet Puzzling: Testing Inductive Reasoning Capabilities of Language Models with Hypothesis Refinementcited by 89
- 2017Schema Networks: Zero-shot Transfer with a Generative Causal Model of Intuitive Physicscited by 58
- 2022Top-Down Synthesis for Library Learningcited by 58
- 2023LILO: Learning Interpretable Libraries by Compressing and Documenting Codecited by 49
- 2021Human-Level Reinforcement Learning through Theory-Based Modeling, Exploration, and Planningcited by 43
- 2023Demo2Code: From Summarizing Demonstrations to Synthesizing Code via Extended Chain-of-Thoughtcited by 39
- 2023Interactive Planning Using Large Language Models for Partially Observable Robotics Taskscited by 27
- 2023Human-like Few-Shot Learning via Bayesian Reasoning over Natural Languagecited by 22
- 2022From Perception to Programs: Regularize, Overparameterize, and Amortizecited by 13
- 2023Optimize Planning Heuristics to Rank, not to Estimate Cost-to-Goalcited by 10
- 2021A Novel Automated Curriculum Strategy to Solve Hard Sokoban Planning Instancescited by 9
- 2023Hybrid Search for Efficient Planning with Completeness Guaranteescited by 6
- 2022Left Heavy Tails and the Effectiveness of the Policy and Value Networks in DNN-based best-first search for Sokoban Planningcited by 3
Built on by
Citing papers per year: 2024: 15; 2025: 46; 2026: 46.
107 papers.
Sort:
By area:
- 2024Understanding World or Predicting Future? A Comprehensive Survey of World Modelscited by 166
- 2025Agentic Large Language Models, a surveycited by 108
- 2025Establishing Best Practices for Building Rigorous Agentic Benchmarkscited by 102
- 2024Towards Guaranteed Safe AI: A Framework for Ensuring Robust and Reliable AI Systemscited by 96
- 2025A Survey of WebAgents: Towards Next-Generation AI Agents for Web Automation with Large Foundation Modelscited by 87
- 2025PPTAgent: Generating and Evaluating Presentations Beyond Text-to-Slidescited by 86
- 2026Agent World Model: Infinity Synthetic Environments for Agentic Reinforcement Learningcited by 66
- 2026EnvScaler: Scaling Tool-Interactive Environments for LLM Agent via Programmatic Synthesiscited by 63
- 2024Combining Induction and Transduction for Abstract Reasoningcited by 53
- 2024Can Language Models Serve as Text-Based World Simulators?cited by 52
- 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoffcited by 51
- 2024Generating Code World Models with Large Language Models Guided by Monte Carlo Tree Searchcited by 40
38 more
- 2025Large Language Models for Planning: A Comprehensive and Systematic Surveycited by 40
- 2024VisualPredicator: Learning Abstract World Models with Neuro-Symbolic Predicates for Robot Planningcited by 39
- 2025Planning with Reasoning using Vision Language World Modelcited by 36
- 2024LLMPhy: Parameter-Identifiable Physical Reasoning Combining Large Language Models and Physics Enginescited by 30
- 2024WALL-E: World Alignment by Rule Learning Improves World Model-based LLM Agentscited by 26
- 2025Text2World: Benchmarking Large Language Models for Symbolic World Model Generationcited by 26
- 2025PoE-World: Compositional World Modeling with Products of Programmatic Expertscited by 26
- 2025Code World Models for General Game Playingcited by 26
- 2025DSGBench: A Diverse Strategic Game Benchmark for Evaluating LLM-based Agents in Complex Decision-Making Environmentscited by 23
- 2026From Storage to Experience: A Survey on the Evolution of LLM Agent Memory Mechanismscited by 21
- 2025debug-gym: A Text-Based Environment for Interactive Debuggingcited by 19
- 2026Exploratory Memory-Augmented LLM Agent via Hybrid On- and Off-Policy Optimizationcited by 19
- 2024On the Limit of Language Models as Planning Formalizerscited by 18
- 2025Large language models for artificial general intelligence (AGI): A survey of foundational principles and approachescited by 18
- 2024Goals as Reward-Producing Programscited by 14
- 2025Synthesizing world models for bilevel planningcited by 14
- 2025Modeling Open-World Cognition as On-Demand Synthesis of Probabilistic Modelscited by 14
- 2025SSRL: Self-Search Reinforcement Learningcited by 14
- 2026Executable World Models for ARC-AGI-3 in the Era of Coding Agentscited by 14
- 2026Code World Model: Coding Agent as World Braincited by 14
- 2026Code as Worlds: Agentic Discovery of Executable World Representations for Physical Reasoningcited by 14
- 2024Synthesizing Programmatic Reinforcement Learning Policies with Large Language Model Guided Searchcited by 13
- 2025Formalizing Learning from Language Feedback with Provable Guaranteescited by 13
- 2025Environment Scaling for Interactive Agentic Experience Collection: A Surveycited by 13
- 2025Generating Symbolic World Models via Test-time Scaling of Large Language Modelscited by 12
- 2025LLM-Guided Probabilistic Program Induction for POMDP Model Estimationcited by 12
- 2025WorldLLM: Improving LLMs' world modeling using curiosity-driven theory-makingcited by 12
- 2025QAgent: An LLM-based Multi-Agent System for Autonomous OpenQASM programmingcited by 11
- 2025From Text to Space: Mapping Abstract Spatial Models in LLMs during a Grid-World Navigation Taskcited by 10
- 2025One Life to Learn: Inferring Symbolic World Models for Stochastic Environments from Unguided Explorationcited by 10
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpuscited by 10
- 2024A Survey On Enhancing Reinforcement Learning in Complex Environments: Insights from Human and LLM Feedbackcited by 9
- 2025Agent2World: Learning to Generate Symbolic World Models via Adaptive Multi-Agent Feedbackcited by 9
- 2024InverseCoder: Self-improving Instruction-Tuned Code LLMs with Inverse-Instructcited by 8
- 2025G-Sim: Generative Simulations with Large Language Models and Gradient-Free Calibrationcited by 8
- 2025Modeling Others' Minds as Codecited by 7
- 2026PatchWorld: Gradient-Free Optimization of Executable World Models for Agent Environmentscited by 7
- 2024From Code to Play: Benchmarking Program Search for Games Using Large Language Modelscited by 5
50 most cited of 107 All 107 (JSON)
- 2026Neurosymbolic Learning of Interpretable World Models14 Oct 2026
- 2026Write Once, Plan Many: Building Reusable Visual Planning Systems from One Scene13 Oct 2026
- 2026Failure Recovery via Belief Updates and World Modeling for Long-Horizon Agents13 Oct 2026
- 2026D-World: An Explicit World-Language-Action Model with Recursive Self-Improvement under Dual Control12 Oct 2026
- 2026RoleWorld: Knowledge Transfer in World Modeling with Functional Role Abstractions9 Oct 2026
- 2026AgentGarten: Code Worlds for Evolving Agents8 Oct 2026
- 2026ReFract: Benchmarking Perspective Awareness in Language Model Agents with Text World Models2 Oct 2026
- 2026A Simulation-Grounded Agentic VLM Framework for Wildfire Monitoring and Reporting1 Oct 2026
- 2026World Editing: Intervening on Executable Worlds at Increasing Depth1 Oct 2026
- 2026Beyond Memory: Harnessing Long-Horizon Agents with Explicit Belief States1 Oct 2026
- 2026AutoGUIWorld: Image Generators as Visual World Models for GUI Agent1 Oct 2026
- 2026Schema: Discovering Unknown Environments via Agentic Program Induction30 Sep 2026
38 more
- 2026Harness Learning Enables Generalizable Test-Time Adaptation28 Sep 2026
- 2026Self-Evolving Coding Agents: From Digital Programs to Physical-World Intelligence28 Sep 2026
- 2026EMPIRIC: Experiment-Driven Learning of Residual World Models for Robot Planning28 Sep 2026
- 2026Code Plans, Diffusion Renders: Open-Ended Generative World Modeling22 Sep 2026
- 2026AI for Games in the Foundation Model Era15 Sep 2026
- 2026What Is Worth Representing? Representational Empowerment for Continual Model Construction2 Sep 2026
- 2026Code as Worlds: Agentic Discovery of Executable World Representations for Physical Reasoning27 Aug 2026
- 2026Code World Model: Coding Agent as World Brain26 Aug 2026
- 2026Agentic Game Development as a Verifiable Trajectory Data Engine for Scaling World Models26 Aug 2026
- 2026Twin: Playing an Unknown Game with a Test-Time Digital Twin14 Aug 2026
- 2026Quo Vadis, World Modeling?3 Aug 2026
- 2026Do Coding Agents Need Executable World Models, Simplification, and Verification to Solve ARC-AGI-3?16 Jul 2026
- 2026World-Time Compute with Verified Code World Models7 Jul 2026
- 2026Object-Centric Environment Modeling for Agentic Tasks3 Jul 2026
- 2026Agent vs. Parametric World Models: Hybrid Planning for Reliable Language Agents26 Jun 2026
- 2026RevengeBench: Reverse Engineering Code-Space Policies from Behavioral Experiments24 Jun 2026
- 2026PatchWorld: Gradient-Free Optimization of Executable World Models for Agent Environments29 May 2026
- 2026Hypothesis Generation and Inductive Inference in Children and Language Models23 May 2026
- 2026Grounded Continuation: A Linear-Time Runtime Verifier for LLM Conversations13 May 2026
- 2026From Storage to Experience: A Survey on the Evolution of LLM Agent Memory Mechanisms7 May 2026
- 2026Executable World Models for ARC-AGI-3 in the Era of Coding Agents6 May 2026
- 2026COvolve: Adversarial Co-Evolution of Large-Language-Model-Generated Policies and Environments via Two-Player Zero-Sum Game30 Mar 2026
- 2026Cross-Domain Demo-to-Code via Neurosymbolic Counterfactual Reasoning19 Mar 2026
- 2026LLMs for Text-Based Exploration and Navigation Under Partial Observability10 Mar 2026
- 2026Exploratory Memory-Augmented LLM Agent via Hybrid On- and Off-Policy Optimization26 Feb 2026
- 2026Assessing Spear-Phishing Website Generation in Large Language Model Coding Agents13 Feb 2026
- 2026Agent World Model: Infinity Synthetic Environments for Agentic Reinforcement Learning10 Feb 2026
- 2026Discovering High Level Patterns from Simulation Traces10 Feb 2026
- 2026Debugging code world models7 Feb 2026
- 2026Active Epistemic Control for Query-Efficient Verified Planning3 Feb 2026
- 2026Joint Learning of Hierarchical Neural Options and Abstract World Model2 Feb 2026
- 2026Learning Abstractions for Hierarchical Planning in Program-Synthesis Agents31 Jan 2026
- 2026Aligning Agentic World Models via Knowledgeable Experience Learning19 Jan 2026
- 2026EnvScaler: Scaling Tool-Interactive Environments for LLM Agent via Programmatic Synthesis9 Jan 2026
- 2025Agent2World: Learning to Generate Symbolic World Models via Adaptive Multi-Agent Feedback26 Dec 2025
- 2025Mini Amusement Parks (MAPs): A Testbed for Modelling Business Decisions19 Nov 2025
- 2025Environment Scaling for Interactive Agentic Experience Collection: A Survey12 Nov 2025
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpus31 Oct 2025
50 newest of 107 All 107 (JSON)
- 2024Understanding World or Predicting Future? A Comprehensive Survey of World Modelscited by 166
- 2024Towards Guaranteed Safe AI: A Framework for Ensuring Robust and Reliable AI Systemscited by 96
- 2026Agent World Model: Infinity Synthetic Environments for Agentic Reinforcement Learningcited by 66
- 2024Generating Code World Models with Large Language Models Guided by Monte Carlo Tree Searchcited by 40
- 2024VisualPredicator: Learning Abstract World Models with Neuro-Symbolic Predicates for Robot Planningcited by 39
- 2025Planning with Reasoning using Vision Language World Modelcited by 36
- 2024WALL-E: World Alignment by Rule Learning Improves World Model-based LLM Agentscited by 26
- 2025Text2World: Benchmarking Large Language Models for Symbolic World Model Generationcited by 26
- 2025PoE-World: Compositional World Modeling with Products of Programmatic Expertscited by 26
- 2025Code World Models for General Game Playingcited by 26
- 2025Synthesizing world models for bilevel planningcited by 14
- 2026Executable World Models for ARC-AGI-3 in the Era of Coding Agentscited by 14
12 most cited of 42 All 42 (JSON)
- 2026Neurosymbolic Learning of Interpretable World Models14 Oct 2026
- 2026Failure Recovery via Belief Updates and World Modeling for Long-Horizon Agents13 Oct 2026
- 2026D-World: An Explicit World-Language-Action Model with Recursive Self-Improvement under Dual Control12 Oct 2026
- 2026RoleWorld: Knowledge Transfer in World Modeling with Functional Role Abstractions9 Oct 2026
- 2026ReFract: Benchmarking Perspective Awareness in Language Model Agents with Text World Models2 Oct 2026
- 2026World Editing: Intervening on Executable Worlds at Increasing Depth1 Oct 2026
- 2026AutoGUIWorld: Image Generators as Visual World Models for GUI Agent1 Oct 2026
- 2026EMPIRIC: Experiment-Driven Learning of Residual World Models for Robot Planning28 Sep 2026
- 2026Code Plans, Diffusion Renders: Open-Ended Generative World Modeling22 Sep 2026
- 2026AI for Games in the Foundation Model Era15 Sep 2026
- 2026Code World Model: Coding Agent as World Brain26 Aug 2026
- 2026Agentic Game Development as a Verifiable Trajectory Data Engine for Scaling World Models26 Aug 2026
12 newest of 42 All 42 (JSON)
- 2025Agentic Large Language Models, a surveycited by 108
- 2025Establishing Best Practices for Building Rigorous Agentic Benchmarkscited by 102
- 2025A Survey of WebAgents: Towards Next-Generation AI Agents for Web Automation with Large Foundation Modelscited by 87
- 2026EnvScaler: Scaling Tool-Interactive Environments for LLM Agent via Programmatic Synthesiscited by 63
- 2025DSGBench: A Diverse Strategic Game Benchmark for Evaluating LLM-based Agents in Complex Decision-Making Environmentscited by 23
- 2026From Storage to Experience: A Survey on the Evolution of LLM Agent Memory Mechanismscited by 21
- 2025debug-gym: A Text-Based Environment for Interactive Debuggingcited by 19
- 2026Exploratory Memory-Augmented LLM Agent via Hybrid On- and Off-Policy Optimizationcited by 19
- 2025SSRL: Self-Search Reinforcement Learningcited by 14
- 2025Environment Scaling for Interactive Agentic Experience Collection: A Surveycited by 13
- 2025QAgent: An LLM-based Multi-Agent System for Autonomous OpenQASM programmingcited by 11
- 2025From Text to Space: Mapping Abstract Spatial Models in LLMs during a Grid-World Navigation Taskcited by 10
12 most cited of 22 All 22 (JSON)
- 2026A Simulation-Grounded Agentic VLM Framework for Wildfire Monitoring and Reporting1 Oct 2026
- 2026Beyond Memory: Harnessing Long-Horizon Agents with Explicit Belief States1 Oct 2026
- 2026Schema: Discovering Unknown Environments via Agentic Program Induction30 Sep 2026
- 2026Harness Learning Enables Generalizable Test-Time Adaptation28 Sep 2026
- 2026Object-Centric Environment Modeling for Agentic Tasks3 Jul 2026
- 2026Hypothesis Generation and Inductive Inference in Children and Language Models23 May 2026
- 2026From Storage to Experience: A Survey on the Evolution of LLM Agent Memory Mechanisms7 May 2026
- 2026Exploratory Memory-Augmented LLM Agent via Hybrid On- and Off-Policy Optimization26 Feb 2026
- 2026Assessing Spear-Phishing Website Generation in Large Language Model Coding Agents13 Feb 2026
- 2026Learning Abstractions for Hierarchical Planning in Program-Synthesis Agents31 Jan 2026
- 2026EnvScaler: Scaling Tool-Interactive Environments for LLM Agent via Programmatic Synthesis9 Jan 2026
- 2025Environment Scaling for Interactive Agentic Experience Collection: A Survey12 Nov 2025
12 newest of 22 All 22 (JSON)
- 2024Combining Induction and Transduction for Abstract Reasoningcited by 53
- 2025Large Language Models for Planning: A Comprehensive and Systematic Surveycited by 40
- 2024LLMPhy: Parameter-Identifiable Physical Reasoning Combining Large Language Models and Physics Enginescited by 30
- 2026Code as Worlds: Agentic Discovery of Executable World Representations for Physical Reasoningcited by 14
- 2026Cross-Domain Demo-to-Code via Neurosymbolic Counterfactual Reasoningcited by 0
- 2026Code as Worlds: Agentic Discovery of Executable World Representations for Physical Reasoning27 Aug 2026
- 2026Cross-Domain Demo-to-Code via Neurosymbolic Counterfactual Reasoning19 Mar 2026
- 2025Large Language Models for Planning: A Comprehensive and Systematic Survey26 May 2025
- 2024LLMPhy: Parameter-Identifiable Physical Reasoning Combining Large Language Models and Physics Engines12 Nov 2024
- 2024Combining Induction and Transduction for Abstract Reasoning4 Nov 2024
- 2025PPTAgent: Generating and Evaluating Presentations Beyond Text-to-Slidescited by 86
- 2024Can Language Models Serve as Text-Based World Simulators?cited by 52
- 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoffcited by 51
- 2024On the Limit of Language Models as Planning Formalizerscited by 18
- 2024Goals as Reward-Producing Programscited by 14
- 2025Modeling Open-World Cognition as On-Demand Synthesis of Probabilistic Modelscited by 14
- 2024Synthesizing Programmatic Reinforcement Learning Policies with Large Language Model Guided Searchcited by 13
- 2025Formalizing Learning from Language Feedback with Provable Guaranteescited by 13
- 2025LLM-Guided Probabilistic Program Induction for POMDP Model Estimationcited by 12
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpuscited by 10
- 2024A Survey On Enhancing Reinforcement Learning in Complex Environments: Insights from Human and LLM Feedbackcited by 9
- 2025G-Sim: Generative Simulations with Large Language Models and Gradient-Free Calibrationcited by 8
12 most cited of 33 All 33 (JSON)
- 2026AgentGarten: Code Worlds for Evolving Agents8 Oct 2026
- 2026What Is Worth Representing? Representational Empowerment for Continual Model Construction2 Sep 2026
- 2026RevengeBench: Reverse Engineering Code-Space Policies from Behavioral Experiments24 Jun 2026
- 2026Grounded Continuation: A Linear-Time Runtime Verifier for LLM Conversations13 May 2026
- 2026COvolve: Adversarial Co-Evolution of Large-Language-Model-Generated Policies and Environments via Two-Player Zero-Sum Game30 Mar 2026
- 2026LLMs for Text-Based Exploration and Navigation Under Partial Observability10 Mar 2026
- 2026Discovering High Level Patterns from Simulation Traces10 Feb 2026
- 2026Active Epistemic Control for Query-Efficient Verified Planning3 Feb 2026
- 2025Mini Amusement Parks (MAPs): A Testbed for Modelling Business Decisions19 Nov 2025
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpus31 Oct 2025
- 2025Programmatic Representation Learning with Language Models16 Oct 2025
- 2025Language Model as Planner and Formalizer under Constraints7 Oct 2025
12 newest of 33 All 33 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2026C-World: A Computer Use Agent Environment Creator
- 2025R-WoM: Retrieval-augmented World Model For Computer-use Agents
- 2025CWM: An Open-Weights LLM for Research on Code Generation with World Models
- 2026Qwen-AgentWorld: Language World Models for General Agents
- 2026World Models as an Intermediary between Agents and the Real World
- 2026Agent-Editing World Model: Rethinking World Modeling for LLM Agents
- 2026From Traces to Agentic Worlds: Agentic Language World Models for Interactive Environment Simulation
- 2025General agents contain world models