All models

I2A (Imagination-Augmented Agents)

Reinforcement learning agent that feeds rollouts imagined by a learned environment model into its policy network.

Reinforcement learning and control · 111 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (14 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
1.9M
Operations
111
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2017
Cited by
267 (as of 29 October 2026)
Authors
Théophane Weber, Sébastien Racanière, David P. Reichert and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m17444
Graph hash
d575a7de9825393e6773096ab2a955e2820ad6afff1044555536e5fdfcf01979
Skeleton hash
ebec1bebcedf3a5a0a1159afa09abcc90278ea1c15d6e9f22f4c0b72872fe919
Architecture hash
b2f6a0d29be8e1346aaed2de1d7c0bb99eaf07376ebff96f4de5afb4069ead10
Diagram SHA-256
2c80ee7a494eb6d57a6942299bcb2d93150abee9fbc39478c2d775096e98a6cc
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Imagination-Augmented Agents (I2As) are an architecture for deep reinforcement learning that combines model-free and model-based aspects. Where most model-based reinforcement learning and planning methods prescribe how a model should be used to arrive at a policy, an I2A learns to interpret the predictions of a learned environment model. Those predictions enter the policy network as additional context.

This implementation comes from a tutorial in 4 parts that trains the agent on MiniPacman, which is played in a 15 × 19 grid-world. The tutorial describes the environment model as a recurrent neural network trained from agent trajectories: given a past state and current action, it predicts the next state and reward. That model is rolled out over multiple time steps into the future, starting from the present real observation and then feeding simulated observations back into the model. A rollout encoder then processes each imagined trajectory as a whole and learns to interpret it, extracting information useful for the decision or ignoring it when necessary.

The agent learns to combine information from this imagination-augmented path with a model-free path. The paper reports improved data efficiency, performance and robustness to model misspecification compared to several baselines. The tutorial marks its fourth part, the imagination-augmented agent itself, as in progress.

Key idea. Imagination-Augmented Agents learn to interpret predictions from a learned environment model and use them as additional context in deep policy networks.

  • I2A
  • Imagination-Augmented Agents
  • imagination-augmented agent
  • model-based reinforcement learning
  • deep reinforcement learning
  • imagination-based planning
  • environment model
  • rollout encoder
  • MiniPacman

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{weber2018imaginationaugmentedagentsdeepreinforcement,
      title={Imagination-Augmented Agents for Deep Reinforcement Learning}, 
      author={Théophane Weber and Sébastien Racanière and David P. Reichert and Lars Buesing and Arthur Guez and Danilo Jimenez Rezende and Adria Puigdomènech Badia and Oriol Vinyals and Nicolas Heess and Yujia Li and Razvan Pascanu and Peter Battaglia and Demis Hassabis and David Silver and Daan Wierstra},
      year={2018},
      eprint={1707.06203},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1707.06203}, 
}