atlas

Research map / Large language models / Agents, code and math

Generating Code World Models with Large Language Models Guided by Monte Carlo Tree Search

NeurIPS 2024 · Large language models › Agents, code and math · approach: Execution-based code verification

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.

Proposes GIF-MCTS, an MCTS-based LLM code generation method that synthesizes Python code world models for model-based RL, evaluated on APPS Competition, a new 18-environment CWMB, and RTFM.

Problem

Generating accurate, executable Python world models (Code World Models) for model-based RL with LLMs, which requires following complex instructions, writing exact non-trivial logic, and self-debugging long programs using unit tests and trajectories.

Approach

Frame MCTS nodes as multi-line code blocks (state plus rollout) and use three code-specific actions (generate, improve, fix) with test-based feedback, plus a modified UCT that penalizes repeated same-type actions and a learned value estimate for unvisited nodes.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use GIF-MCTS instead of WorldCoderLlama 3 70B code world model generation · CWMB discrete action spaceAccuracy: 0.79$\pm$0.04 -> 0.84$\pm$0.03Helped
Use GIF-MCTS instead of WorldCoderLlama 3 70B code world model generation · CWMB continuous action spaceNormalized return: 0.19$\pm$0.01 -> 0.22$\pm$0.01Helped
Use GIF-MCTS instead of WorldCoderGPT-4 Turbo code world model generation · CWMB continuous action spaceAccuracy: 0.24$\pm$0.06 -> 0.40$\pm$0.03Helped
Use GIF-MCTS instead of WorldCoderGPT-4 Turbo code world model generation · RTFM simplified, budget 50Normalized return: -0.06 $\pm$ 0.12 -> 1.00 $\pm$ 0.00Helped
Add Generate action (ablation)GIF-MCTS · CWMB continuous action spaceNormalized return: 0.16$\pm$0.01 -> 0.23$\pm$0.02Helped
Add Generate action (ablation)GIF-MCTS · CWMB discrete action spaceAccuracy: 0.87$\pm$0.07 -> 0.88$\pm$0.07No clear effect
Add Improve action (ablation)GIF-MCTS · CWMB continuous action spaceNormalized return: 0.17$\pm$0.02 -> 0.23$\pm$0.02Helped
Add Fix action (ablation)GIF-MCTS · CWMB discrete action spaceNormalized return: 0.55$\pm$0.05 -> 0.83$\pm$0.06Helped
Add Fix action (ablation)GIF-MCTS · CWMB continuous action spaceAccuracy: 0.21$\pm$0.08 -> 0.38$\pm$0.04Helped

Surprising findings

Limitations

Experimental setup

Datasets: APPS (Competition split) Code World Models Benchmark (CWMB) RTFM (modified)

Benchmarks: APPS Competition CWMB RTFM

Metrics: strict accuracy CWM transition accuracy normalized return

Baselines: Zero-shot CoT WorldCoder CodeRL Parsel CQL

Builds on: WorldCoder LATS Chain-of-Thought UCT CodeRL

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