atlas

Research map / Multi-agent systems and games / Human-AI and goal-conditioned

WorldCoder, a Model-Based LLM Agent: Building World Models by Writing Code and Interacting with the Environment

NeurIPS 2024 · Multi-agent systems and games › Human-AI and goal-conditioned · approach: World-model-based agents · 5 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Builds an LLM-synthesized Python world model (transition and reward programs) from environment interaction, with an optimism-under-uncertainty constraint that makes the model plannable toward goals, evaluated on Sokoban, Minigrid, and AlfWorld.

Problem

Learning world models sample-efficiently and transferably from environment interaction, with efficient exploration in sparse-reward, long-horizon settings, while avoiding the per-action LLM cost of ReAct-style agents.

Approach

The LLM synthesizes an interpretable Python program for transition and reward functions, trained with a data-fit constraint plus an optimism constraint requiring the reward model to admit a goal-reaching plan from the initial state; programs are refined via REx-based debugging and reused across environments for transfer.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use the optimism objective φ2 instead of data consistency alone (ablation)WorldCoder · MiniGrid-UnlockPickup-v0actions to learn the correct world model: 3×10^8 vs no more than 100Helped
Use the optimism objective φ2 (ablation)WorldCoder · Sokobanlearning performanceNo clear effect
Transfer the learned world model between environments (ablation)WorldCoder · MiniGrid curriculumepisodes of exploration to solve new environmentsHelped
Use optimism under uncertainty for goal-directed exploration (ablation)WorldCoder · MiniGrid without transferability to solve harder environmentsHelped
Use optimism under uncertainty to update the reward model for a new goal (ablation)WorldCoder · MiniGrid environment 3zero-shot instruction followingHelped
Generate a new reward function from the goal without enforcing φ2 (ablation)WorldCoder · MiniGrid environment 3instruction-following performanceHurt
Use the LLM to reason about and predict actions directly instead of building an explicit world modelSokoban · Basic levelssuccess rate: 15%±8%Hurt
Use WorldCoder instead of deep RL to learn basic Sokoban dynamicsSokoban · 2-box Sokobanenvironment steps to learn: >1 millionHelped
Use optimism under uncertainty for task exploration (ablation)WorldCoder · AlfWorld representative tasksnonzero task performanceHelped

Surprising findings

Limitations

Experimental setup

Datasets: Sokoban Minigrid AlfWorld

Benchmarks: Sokoban Minigrid AlfWorld

Metrics: average reward per episode sample efficiency (environment steps) LLM tokens/calls success rate

Baselines: ReAct PPO prompt4reward deep model-based RL RAP

Builds on: REx Contextual MDP Object-Oriented MDP MCTS value iteration

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy