Lesson 18.2 · 28 min · video lesson
World Models: Teaching AI to Simulate Its Environment
Before reaching for a hot pan, you already “see” what would happen if you grabbed it bare-handed. What would it take for an AI to imagine consequences before acting?
In short: A world model is a learned simulator: given the current state and an action, it predicts the next state (and often the reward). It is trained from recorded experience, usually in a compressed latent state rather than raw pixels. Once learned, an agent can roll out imagined futures inside the model to plan or to train its policy, needing far fewer real-world trials. Dreamer-style agents, MuZero, video world models such as Genie, and driving and robotics simulators all build on this idea, with compounding prediction error as the main limit.
What you will learn
- What is an environment, a state, and an action
- What is a World Model
- The human analogy: imagining a move before making it
- Why we need a World Model
- How a World Model learns: predicting the next state
- The latent state: compressing what we see
- Imagining the future: rolling out without touching the real world
- Dreamer-style agents that plan inside the model
- World Models and predicting the future
- World Models in the real world
In this lesson
- Environment, state and action
- What is a world model? The human analogy
- Why we need a world model
- How a world model learns: predicting the next state
- The latent state: compressing what we see
- Imagining the future: rollouts without touching the real world
- Dreamer-style agents that plan inside the model
- World models and predicting the future
- World models in the real world
- Worked example, step by step
- Practice: try it yourself
Key terms in this lesson
- Environment
- The world an agent acts in, which returns new states and rewards after actions.
- State
- A description of the environment at one moment.
- World model
- A learned model that predicts the next state (and often reward) from the current state and an action.
- Latent state
- A compressed vector representation of an observation in which dynamics are learned.
- Rollout
- A simulated trajectory produced by repeatedly applying a model to chosen actions.
- Model predictive control (MPC)
- Planning a sequence of actions with a model, executing only the first, then re-planning from the new real state.
This lesson is part of the Generative AI Engineering and Complete AI Engineer tracks. See plans and pricing to open the full lesson, its video, labs and quiz, or try the free lesson first (free account needed).
← 18.1 JEPA: LeCun's Vision for World Model AI · 18.3 Recursive Self-Improvement: Can AI Improve Itself Indefinitely? →