loyiv/ITP
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 roundsImplements 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
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
60
Contributors
2
Files
117
Active weeks
2
Repository
Language
Python
Stars
1
Forks
0
License
MIT