IdeaCredIdeaCred

Code of Paper: Imagine-then-Plan: Agent Learning from Adaptive Lookahead with World Models

What's novel

Code of Paper: Imagine-then-Plan: Agent Learning from Adaptive Lookahead with World Models

Code Analysis

19 files read · 4 rounds

Implements the Imagine-then-Plan (ITP) method for LLM agents: a training-free 3-step pipeline (adaptive K-selection, world-model imagination, reflect-and-act) and a trained variant with K-head/V-head predictors on top of a CausalLM, evaluated on ALFWorld and other text-based environments.

Strengths

The ITP-R training architecture (K-head + V-head at a <CTRL> token position) and the RAP/MCTS planner with composite rewards are genuinely non-trivial implementations. The core ITP-I pipeline is clean, well-structured, and has robust action validation with multiple fallback strategies.

Weaknesses

Significant code duplication between itp/ and eval/foresight_eval/ (LLM backends, policy model, world model all reimplemented with slightly different interfaces), and zero test coverage across 138 source files. The training script (54KB) is a monolithic file that would benefit from decomposition.

Score Breakdown

Innovation
7 (25%)
Craft
54 (35%)
Traction
8 (15%)
Scope
85 (25%)

Signal breakdown

Innovation

Not Fork+1
Code Novelty+1
Concept Novelty+3

Craft

Ci+0
Tests-1
Polish+1
Releases+0
Has License+5
Code Quality+17
Readme Quality+15
Recent Activity+7
Structure Quality+5
Commit Consistency+0
Has Dependency Mgmt+5

Traction

Forks+0
Stars+6
Hn Points+0
Watchers+0
Early Traction+0
Devto Reactions+0
Community Contribs+2

Scope

Commits+8
Languages+5
Subsystems+13
Bloat Penalty+0
Completeness+7
Contributors+6
Authored Files+15
Readme Code Match+3
Architecture Depth+7
Implementation Depth+8

Evidence

Commits

60

Contributors

2

Files

117

Active weeks

2

TestsCI/CDREADMELicenseContributing

Repository

Language

Python

Stars

1

Forks

0

License

MIT