Saved in:
Bibliographic Details
Main Authors: Bai, Jiaxin, Guo, Yue, Dong, Yifei, Xiong, Jiaxuan, Zheng, Tianshi, Li, Yixia, Fang, Tianqing, Li, Yufei, Gao, Yisen, Huang, Haoyu, Xie, Zhongwei, Tsang, Hong Ting, Wang, Zihao, Liu, Lihui, Pan, Jeff, Song, Yangqiu
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2605.30880
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918531221684224
author Bai, Jiaxin
Guo, Yue
Dong, Yifei
Xiong, Jiaxuan
Zheng, Tianshi
Li, Yixia
Fang, Tianqing
Li, Yufei
Gao, Yisen
Huang, Haoyu
Xie, Zhongwei
Tsang, Hong Ting
Wang, Zihao
Liu, Lihui
Pan, Jeff
Song, Yangqiu
author_facet Bai, Jiaxin
Guo, Yue
Dong, Yifei
Xiong, Jiaxuan
Zheng, Tianshi
Li, Yixia
Fang, Tianqing
Li, Yufei
Gao, Yisen
Huang, Haoyu
Xie, Zhongwei
Tsang, Hong Ting
Wang, Zihao
Liu, Lihui
Pan, Jeff
Song, Yangqiu
contents Text-agent environments are typically modeled as partially observable Markov decision processes (POMDPs), assuming that the simulator's latent state and transition dynamics are hidden from the agent. Yet little work has examined whether executable code can be induced to serve as a world model for prediction and planning under partial observability. 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 planning score among evaluated methods, reaching 76.4\% macro success in live one-step 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 decision utility. This exposes 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.
format Preprint
id arxiv_https___arxiv_org_abs_2605_30880
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle PatchWorld: Gradient-Free Optimization of Executable World Models
Bai, Jiaxin
Guo, Yue
Dong, Yifei
Xiong, Jiaxuan
Zheng, Tianshi
Li, Yixia
Fang, Tianqing
Li, Yufei
Gao, Yisen
Huang, Haoyu
Xie, Zhongwei
Tsang, Hong Ting
Wang, Zihao
Liu, Lihui
Pan, Jeff
Song, Yangqiu
Computation and Language
Artificial Intelligence
Text-agent environments are typically modeled as partially observable Markov decision processes (POMDPs), assuming that the simulator's latent state and transition dynamics are hidden from the agent. Yet little work has examined whether executable code can be induced to serve as a world model for prediction and planning under partial observability. 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 planning score among evaluated methods, reaching 76.4\% macro success in live one-step 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 decision utility. This exposes 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.
title PatchWorld: Gradient-Free Optimization of Executable World Models
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2605.30880