PatchWorld: Gradient-Free Optimization of Executable World Models for Agent Environments
On the map: World models → World models for language agents
also in 1 more
Abstract (arXiv)
World models for interactive text agents must typically be learned from observation-action trajectories alone. Specifically, the environment returns text observations after each action, but does not expose a ground-truth latent state nor an inspectable transition model.A research gap remains in how to induce executable code as a world model in this black-box setting for prediction and agent decision making. We introduce PatchWorld, a gradient-free framework that turns offline trajectories into executable Python world models through counterexample-guided code repair.Instead of predicting the next observation with a black-box model, PatchWorld induces symbolic belief-state programs whose action updates can be inspected, replayed, and locally patched. Across seven AgentGym environments, PatchWorld-Simple achieves the highest code-based decision-making score among evaluated methods (76.4% macro success in live one-step lookahead), matching or exceeding LLM-based lookahead while invoking no LLM calls inside the world-model prediction module itself. We further find that a human-specified residual-memory bias improves surface observation fidelity but weakens agent decision-making utility. This reveals a tradeoff in executable world models, since improving observation fidelity can come at the expense of action-discriminative dynamics, and vice versa. Code is available at https://github.com/HKBU-KnowComp/PatchWorld.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in World models for language agents, one of 11 directions in World models. Builds on 42 of its 73 references that are in the map. First posted on arXiv 29 May 2026.
Builds on
42 of 73 references.
Closest ancestors · 12
Same direction, newest first
- 2025From Word to World: Can Large Language Models be Implicit Text-based World Models?21 Dec
- 2025One Life to Learn: Inferring Symbolic World Models for Stochastic Environments from Unguided Exploration14 Oct
- 2025Code World Models for General Game Playing6 Oct
- 2025CWM: An Open-Weights LLM for Research on Code Generation with World Models30 Sep
- 2025CoEx -- Co-evolving World-model and Exploration29 Jul
- 2025PoE-World: Compositional World Modeling with Products of Programmatic Experts16 May
- 2025Synthesizing world models for bilevel planning26 Mar
- 2025Text2World: Benchmarking Large Language Models for Symbolic World Model Generation18 Feb
- 2024WALL-E: World Alignment by Rule Learning Improves World Model-based LLM Agents9 Oct
- 2024Agent Planning with World Knowledge Model23 May
- 2024WorldCoder, a Model-Based LLM Agent: Building World Models by Writing Code and Interacting with the Environment19 Feb
- 2020ALFWorld: Aligning Text and Embodied Environments for Interactive Learning8 Oct
Other references · 30
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
- 2023RT-2: Vision-Language-Action Models Transfer Web Knowledge to Robotic Controlcited by 2,993
- 2024π0: A Vision-Language-Action Flow Model for General Robot Controlcited by 2,297
- 2019Dream to Control: Learning Behaviors by Latent Imaginationcited by 1,598
- 2018World Modelscited by 1,444
- 2022WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agentscited by 1,197
- 2018TextWorld: A Learning Environment for Text-based Gamescited by 304
- 2022ScienceWorld: Is your Agent Smarter than a 5th Grader?cited by 298
- 2024When Can LLMs Actually Correct Their Own Mistakes? A Critical Survey of Self-Correction of LLMscited by 230
- 2023ADaPT: As-Needed Decomposition and Planning with Language Modelscited by 172
18 more
- 2020The Value Equivalence Principle for Model-Based Reinforcement Learningcited by 88
- 2023LMRL Gym: Benchmarks for Multi-Turn Reinforcement Learning with Language Modelscited by 84
- 2025Agent-R: Training Language Model Agents to Reflect via Iterative Self-Trainingcited by 74
- 2024LeDex: Training LLMs to Better Self-Debug and Explain Codecited by 39
- 2025LLMs as Planning Formalizers: A Survey for Leveraging Large Language Models to Construct Automated Planning Modelscited by 38
- 2025NewtonBench: Benchmarking Generalizable Scientific Law Discovery in LLM Agentscited by 32
- 2025CODESIM: Multi-Agent Code Generation and Problem Solving through Simulation-Driven Planning and Debuggingcited by 31
- 2025ReflAct: World-Grounded Decision Making in LLM Agents via Goal-State Reflectioncited by 30
- 2026Code2World: A GUI World Model via Renderable Code Generationcited by 26
- 2024CodeMirage: Hallucinations in Code Generated by Large Language Modelscited by 23
- 2023Complex Query Answering on Eventuality Knowledge Graph with Implicit Logical Constraintscited by 21
- 2026AutoWebWorld: Synthesizing Infinite Verifiable Web Environments via Finite State Machinescited by 20
- 2023Advancing Abductive Reasoning in Knowledge Graphs through Complex Logical Hypothesis Generationcited by 19
- 2025CodeARC: Benchmarking Reasoning Capabilities of LLM Agents for Inductive Program Synthesiscited by 15
- 2025Towards Formal Verification of LLM-Generated Code from Natural Language Promptscited by 8
- 2025PEIRCE: Unifying Material and Formal Reasoning via LLM-Driven Neuro-Symbolic Refinementcited by 7
- 2024An Empirical Study on Self-correcting Large Language Models for Data Science Code Generationcited by 2
- 2026Neuro-Symbolic Verification on Instruction Following of LLMscited by 2
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Scaling GUI Agents with Visual State Transitionscited by 3
- 2026VisualPatchWorld: Code World Models as Latent Structured Representations for Planningcited by 1
- 2026Does Learning to Predict the World Help Agents Act? Auditing World-Model Post-Trainingcited by 0
- 2026When Do Causal World Models Help Modular LLM Agentscited by 0
- 2026Safe, Persistent, and Evolving Agent Harness for Understanding Partially Observable Worldscited by 0
- 2026Safe, Persistent, and Evolving Agent Harness for Understanding Partially Observable Worlds8 Oct 2026
- 2026Does Learning to Predict the World Help Agents Act? Auditing World-Model Post-Training27 Sep 2026
- 2026VisualPatchWorld: Code World Models as Latent Structured Representations for Planning28 Jul 2026
- 2026Scaling GUI Agents with Visual State Transitions27 Jul 2026
- 2026When Do Causal World Models Help Modular LLM Agents12 Jul 2026
Similar, not cited
Close in wording, no citation either way
- 2026Agent-Editing World Model: Rethinking World Modeling for LLM Agents
- 2026Qwen-AgentWorld: Language World Models for General Agents
- 2026Bridging the Agent-World Gap: Text World Models for LLM-based Agents
- 2024Making Large Language Models into World Models with Precondition and Effect Knowledge
- 2026Ask the World Before Acting: Environment Probing for Calibrated Agent World Models
- 2025R-WoM: Retrieval-augmented World Model For Computer-use Agents
- 2024Web Agents with World Models: Learning and Leveraging Environment Dynamics in Web Navigation
- 2026From Traces to Agentic Worlds: Agentic Language World Models for Interactive Environment Simulation