Skip to content

Dreamer ​

Dreamer agents learn a world model by reconstructing what they see, and learn to act inside it. A recurrent state-space model (RSSM) compresses each frame, given everything before it, into a model state: a deterministic recurrent state plus a sampled stochastic state. A decoder rebuilds the frame from that state, heads predict the reward and whether the episode continues, and a prior learns to predict the next stochastic state without seeing the frame. An actor and a critic then train on trajectories the model imagines from replayed states, never touching the environment while they learn.

All models in this family live in torch_world.models.dreamer and are exported from torch_world.models. They subclass WorldModel, so encode, predict and rollout work as for every world model, and CEM can plan on the model state toward a goal image; the actor is a second way to act, with no search.

  • DreamerV3

    RSSM with categorical latents and a pixel decoder, KL balancing with free bits, symlog two-hot rewards and values, and an actor-critic learned in imagination.

    reconstruction RSSM actor-critic

How it differs from JEPA and TD-MPC world models ​

JEPA world modelsTD-MPCDreamer
latent trained bynext-embedding prediction + an anti-collapse termnext-latent consistency + reward and value predictionpixel reconstruction + KL between prior and posterior
decodernonenoneyes: imagined states can be looked at
stateone embedding per frameone latent per framerecurrent state + stochastic categoricals, filtered over time
acts witha planner toward a goal latentMPPI for returnan actor learned in imagination (or a planner on the state)

Papers and code ​

modelpaperreference code
DreamerV3Hafner et al., 2023danijar/dreamerv3