Planning with Learned Dynamics
Once an agent has a learned model, it can use the model to imagine possible futures before acting. A delivery robot can compare a shortcut through a crowded corridor with a slower route around it. A recommender can estimate whether showing one item now will make later interactions better or worse. A game-playing agent can search several moves ahead instead of reacting only to the current position.
This is the central appeal of model-based RL: it can turn data into reusable experience. The agent does not need to execute every candidate action in the real world. It can plan, evaluate, and sometimes train on imagined rollouts generated by the learned dynamics.
Planning horizon
How far should the agent imagine?
Pick a rollout horizon for a delivery robot choosing between a quick shortcut and a slower known route.
Horizon
3 steps
Useful lookahead
68%
Trust left
76%
Deployment note
Often a practical planning range when the model is refreshed with real data.
The agent can compare nearby consequences without pretending the model is perfect.
The planning loop repeatedly feeds predicted states back into the model:
A candidate action sequence can then be scored by predicted reward and final value:
The horizon controls how far the agent imagines. A larger can reveal delayed consequences, but it also gives errors more time to compound. If the model is a little too optimistic about a slippery turn, the first imagined step may be only slightly wrong. Ten imagined steps later, the plan may rely on a trajectory the real robot cannot follow.
Equation walkthrough
Score an imagined plan
Click each term to see how a model-based agent scores a candidate action sequence.
Imagined return
model-based score for a candidate plan
This is the return the agent estimates by rolling the learned model forward from time t. The hat marks it as model-imagined, not directly observed.
Terms
Modern model-based systems often respond with a deliberately modest use of imagination. Model predictive control replans after each real step instead of committing to a long open-loop plan. MBPO-style methods use short model rollouts, often only a few steps, to create extra training data without asking the model to predict far into unfamiliar futures. Ensembles and uncertainty penalties can downweight plans that pass through states the model does not understand.
This matters when deploying RL systems because the planner will search for loopholes in its internal world. If a supply-chain model underestimates delays, the policy may route inventory through fragile paths. If a simulator omits actuator latency, a robot policy may look elegant in simulation and unstable on hardware.
Equation walkthrough
MBPO keeps imagination short
Click each term to see how short-horizon model rollouts improve sample efficiency while limiting model bias.
Short horizon
stop after a few steps
The short horizon limits compounding error, then learning returns to real data.
Planning vs learning
Two ways to use imagined futures
Choose how the agent uses its learned model.
Evaluate hypothetical futures
Planning uses the learned model for lookahead. The agent asks what might happen under different actions before committing in the real environment.
Compounding Error
Each imagined state becomes the input to the next prediction. A small one-step error can change the next input distribution, which creates larger errors, which create stranger inputs. Long rollouts are most dangerous when the policy enters states the model rarely saw during training.
Uncertainty-Aware Planning
Good model-based RL requires uncertainty-aware planning.
What to do about it:
- Short imagined rollouts (MBPO)
- Latent planning (MuZero, Dreamer)
- Regularization so plans stay realistic
- Real data refresh → correct the model often
Why can short imagined rollouts be more reliable than long imagined rollouts?