Notes

Model-Based RL

Model-Based RL gives an agent a way to think ahead before it acts. Rather than learning only from the rewards it has already received, the agent builds or is given a rough internal simulator of how the environment responds, then uses that simulator to compare possible futures.

Learning a world to plan in

The model predicts key parts of interaction: given a current state and action, what state is likely next, what reward will result, and sometimes whether the episode ends. With this model, the agent can perform planning: it tries action sequences inside its internal model, estimates their outcomes, and selects an action whose simulated future looks valuable. This differs from model-free RL, such as a basic DQN, which learns action values or a policy directly from real experience without explicitly predicting environmental dynamics.

Real experience plus imagined experience

A classic idea, Dyna, alternates between collecting real transitions and generating extra training updates from its learned model. More elaborate systems search through possible futures at decision time. AlphaZero combines a known game simulator with Monte Carlo Tree Search; MuZero learns a compact latent model sufficient for predicting rewards, values, and useful action consequences, without needing to reconstruct every detail of the world.

  • In a robot simulator, planning can reject a route predicted to collide before expensive hardware trials occur.
  • In a game, search can discover a tactical move that has not yet produced much direct reward in the training data.
Its central advantage and risk

Model-based methods can be far more sample efficient: one real observation can support many imagined trials, which matters when real interactions are slow, costly, or unsafe. Their weakness is model error. A planner can exploit an inaccurate prediction—like finding a shortcut that works only in its flawed simulator—and choose disastrous actions in reality. Errors also compound along long imagined rollouts. Strong systems therefore limit planning horizons, update models continually with real data, and test policies under shifted dynamics rather than trusting high simulated reward alone.

Model-Based Reinforcement Learning is an approach in which an agent learns or is given a model of the environment—how states change after actions and what rewards result—and uses that model to plan decisions before acting. It matters because planning with predicted outcomes can improve sample efficiency, enabling agents to evaluate action sequences without relying solely on costly real-world trial and error.

Imagine learning to play chess by not only remembering which moves worked, but also forming a rough idea of what might happen after each possible move. Before touching a piece, you can mentally try out a few futures: “If I move here, they may respond there, and that could lead to trouble.”

Model-Based RL gives an AI a similar kind of imagination. It learns or is given a rough picture of how its world behaves, then uses that picture to test possible actions before taking them for real. This matters when real mistakes are costly, slow, or risky—such as controlling a robot or managing traffic. Instead of learning only from lived experience, it can plan ahead.