Dreamer
World models push model-based RL toward a powerful idea: the agent does not have to plan in raw observation space. Instead, it can learn a compact latent state that captures what matters for control, then train behavior inside that learned latent world. Dreamer-style agents are the clearest example of this approach.
Imagine a robot learning from camera images. Predicting every future pixel is expensive and often unnecessary. The policy may not need the exact wall texture, the reflection on the floor, or the color of a background object. It needs to know where the gripper is, where the object is, whether contact has happened, whether the episode is likely to continue, and which actions move it toward reward. Dreamer learns that kind of internal world and uses imagined latent trajectories to update the actor and critic.

Latent imagination
Build the world Dreamer trains inside
Choose what the latent state remembers. Dreamer-style agents learn a compact world model, then improve actor and critic on imagined trajectories.
Latent keeps
Latent drops
Dreamer loop
- 1. Encode real observations.
- 2. Train latent dynamics.
- 3. Imagine rollouts.
- 4. Update actor and critic.
This is the Dreamer idea: learn a compact world where imagined rollouts train useful behavior.


The training loop is cyclic. First, the agent collects real experience. Second, it updates the world model so latent predictions match observed dynamics, rewards, and episode continuation. Third, it starts from encoded real states and imagines many possible future trajectories. Fourth, it improves the actor and critic using those imagined trajectories. Then the improved policy collects new real experience, and the cycle repeats.
Top
Bottom
World models usually have a three-part architecture: an encoder compresses observations into a latent state , a dynamics model predicts future latent states, and a controller chooses actions from the latent state. The critical piece is to predict in latent space rather than pixel space.
| Pixel-space prediction | Latent-space prediction |
|---|---|
| High-dimensional and sensitive to tiny visual errors. | Compresses state and filters irrelevant noise. |
| May spend capacity on textures, backgrounds, and details irrelevant to control. | Can focus on causal structure: position, contact, velocity, reward, and continuation. |
| Long-horizon predictions can drift as pixel errors compound. | Rollouts can be cheaper and more stable when the latent state is well validated. |
Why Latent Space Helps
Latent models can reduce noise, make rollouts cheaper, and focus learning on causal task structure. They are especially useful when observations are high-dimensional but the control problem depends on a smaller set of hidden variables.
Why can learning in latent space be more practical than predicting raw pixels directly?