World Models for AI Systems
Design world model systems for simulation, planning, embodied AI, synthetic environments, and sim-to-real evaluation.
What is a world model?
A world model is a learned model that predicts how an environment changes when an agent takes an action. It turns a stream of partial observations into an internal state, advances that state under candidate actions, and predicts consequences such as the next observation, reward, value, or safety event.
In plain language: the agent uses a compact internal simulator to ask "what is likely to happen if I do this?" before acting.
World models matter when real interaction is expensive, slow, or dangerous. They can improve data efficiency and support planning, but they also create a new failure mode: a policy may exploit mistakes in the learned model instead of solving the real task.
The core invariant is decision usefulness, not visual realism. A world model is useful only while its imagined action consequences remain accurate enough to support the next real decision.
1 Sense
Observe a partial view
Receive pixels, telemetry, proprioception, events, or other measurements. An observation is evidence about the environment, not necessarily its complete state.
2 Believe
Infer a latent state
Combine the new observation with prior state and the previous action to estimate hidden variables that matter for prediction and control.
3 Roll out
Imagine action outcomes
Advance the learned dynamics under candidate actions and predict rewards, values, constraints, or future observations.
4 Decide
Choose a bounded plan
Compare candidate trajectories while penalizing uncertainty and rejecting plans that cross a safety boundary.
5 Replan
Act once and correct
Execute a limited action, observe reality again, update the latent state, and shorten or abandon the plan when evidence disagrees.
Separate the world, observation, belief, and action
The environment has a state whether or not the agent can see it. A camera frame or sensor reading is only an observation generated from that state. The agent therefore needs a belief state: a compact summary of what may be true now, conditioned on prior observations and actions.
What is true
Environment state
The task-relevant physical or logical state, including hidden variables. In a warehouse this could include obstacle positions, floor friction, and another robot behind a shelf.
What is sensed
Observation model
Describes how hidden state produces measurements. Occlusion, noise, delay, and missing sensors mean different states can produce similar observations.
What is inferred
Latent belief
Compresses history into a state useful for predicting consequences. A recurrent state-space model can combine deterministic memory with stochastic uncertainty.
What can change
Action model
Predicts how each candidate action changes latent state. Without action conditioning, the model forecasts motion but cannot support counterfactual planning.
A useful latent state preserves control-relevant information
- It remembers evidence that is no longer visible in the latest frame.
- It separates uncertainty from a single guessed state when several explanations remain possible.
- It predicts how actions change state, reward, termination, and safety constraints.
- It discards visual detail that does not improve the target decisions.
- It can be corrected quickly when a real observation contradicts an imagined transition.
A sharp next-frame reconstruction can still be a poor control model. If it predicts texture well but misses contact, reward, or hazard dynamics, a planner can confidently select the wrong action.
An action-conditioned latent world model
Training connects real experience to the latent dynamics; control uses the same model for bounded imagination and returns to reality after each executed action.
Observed transitions
Experience buffer
Stores versioned tuples of observation, action, reward, termination, constraint signals, and the next observation.
Posterior
State inference
Encodes the current observation and combines it with prior latent state to estimate what is true now.
Prior
Latent dynamics
Predicts the next latent-state distribution from current latent state and a candidate action.
Decision targets
Prediction heads
Predict reward, value, continuation, constraints, or observations needed by the planner and training losses.
Control
Planner or policy
Searches action sequences or learns a policy from imagined trajectories, then proposes a bounded real action.
Correct
Reality and safety gate
Checks uncertainty and hard constraints, executes only allowed actions, and feeds the next real observation back into inference.
Build the latent state from evidence, not the latest frame
Use the lab to compare an observation-only representation with a belief state that retains prior evidence. Change the scenario, sensor reliability, representation, and action; the inferred hazard probability and next-state consequence update together.
The dependency-free example applies the same idea with a two-state Bayesian filter. It first predicts how the hidden state changes after an action, then corrects that prior with a noisy observation.
Choose an architecture for the decision, not the trend
Modern systems share the idea of learned dynamics, but they optimize different prediction targets and use imagination differently.
World Models and PlaNet
Reconstructive latent model
An encoder maps observations into a compact state and a recurrent or state-space model predicts future latent states. Observation and reward heads make the representation trainable. PlaNet plans candidate actions online in latent space.
Dreamer
Latent actor-critic
A recurrent state-space model learns from real trajectories. Actor and critic networks improve from imagined latent trajectories, so expensive environment interaction is not required for every policy update.
MuZero
Value-equivalent model
The model need not reconstruct observations. It learns latent transitions plus reward, policy, and value predictions that make tree search effective for the task.
TD-MPC2
Latent model-predictive control
An implicit, decoder-free world model predicts control-relevant quantities. Local trajectory optimization searches in latent space and executes the first action before replanning.
Decide what the model must predict
- Representation target: reconstruct observations, predict learned features, or preserve only reward and value-relevant information.
- Dynamics target: predict one next state, a distribution, or an ensemble whose disagreement estimates epistemic uncertainty.
- Control target: support online search, train an actor in imagination, or combine both.
- Task heads: predict reward, continuation, terminal state, constraints, and value only when each has a clear owner and evaluation.
- Correction cadence: define how frequently real observations replace imagined state and invalidate stale plans.
There is no universal best world-model objective. The right objective preserves the distinctions that change action ranking in the intended operating regime.
Rollout error grows with distance from real evidence
A one-step model is trained near states present in its dataset. During planning, its own prediction becomes the next input. Small state errors can therefore move later predictions away from the training distribution, change action rankings, and compound over the rollout horizon.
The practical question is not "how far can the model generate?" It is "how far can this model support this decision before uncertainty or error can change the preferred action?"
Model-predictive control limits exposure to stale imagination: optimize a short sequence, execute the first action, observe the real next state, and plan again. This does not remove model bias, but it repeatedly anchors planning to evidence.
The example below ranks candidate action sequences with an uncertainty penalty, enforces a hard risk boundary, and returns only the first action of the selected plan.
Measure prediction quality where planning uses it
Single-step reconstruction loss is useful for training diagnostics, but it is not enough to validate a controller. Evaluate open-loop rollouts from held-out real states and connect prediction errors to the decisions they can change.
1 to H
Multi-step horizon
Report error and calibration at every planning depth, not only the first transition
By regime
Coverage
Slice contact, speed, weather, object, map, task, and other control-relevant conditions
Rank
Decision agreement
Check whether model and reality prefer the same candidate action or policy
Bounded
Safety
Measure constraint prediction, uncertainty coverage, fallback, and recovery behavior
Keep four evaluation sets separate
- One-step holdout: detects local transition, reward, continuation, and observation-prediction errors.
- Open-loop rollout holdout: reveals error accumulation when predicted state is fed back without correction.
- Policy-conditioned holdout: covers states visited by the current planner, including actions the data-collection policy rarely chose.
- Real control trial: tests task return, safety constraints, recovery, and action ranking under a bounded deployment protocol.
Monitor the model-policy feedback loop
- Record world-model, policy, planner, reward, constraint, and dataset versions for every decision trace.
- Compare ensemble disagreement with realized error; uncertainty that is not calibrated cannot define a trustworthy gate.
- Detect policy exploitation by searching for high predicted return paired with unusual state or action sequences.
- Refresh protected real traces after environment changes without letting the training loop optimize against every holdout.
- Track the credible planning horizon by regime and shorten it automatically when residuals or disagreement rise.
Respond when imagination and reality diverge
1 Contain
Stop extending the stale rollout
Reject the current plan when a hard constraint, uncertainty budget, or observed residual crosses its boundary.
2 Fallback
Return to a known controller
Use a conservative policy, emergency stop, human handoff, or rule-based controller whose operating envelope is explicit.
3 Diagnose
Preserve the divergence trace
Store observations, actions, latent states, ensemble predictions, planner scores, safety decisions, and actual outcomes.
4 Recover
Repair evidence and boundaries
Add representative real data, fix objectives or sensors, recalibrate uncertainty, and narrow the horizon or operating domain before release.
Avoid common world-model failures
- Observation aliasing: two different hidden states look similar, so the latest frame cannot identify the safe action.
- Missing action effects: the model predicts what usually happens but not what happens under the planner's counterfactual action.
- Compounding error: small transition errors move long rollouts into unsupported latent regions.
- Model exploitation: the policy finds imagined high-reward states caused by model error.
- Uncalibrated confidence: low ensemble disagreement is mistaken for proof of correctness outside training support.
- Objective mismatch: visual prediction improves while reward, constraint, or action ranking gets worse.
- Unsafe transfer: simulated success is promoted without controlled real evidence in the same operating regimes.
Primary references
- World Models demonstrates a compressed visual representation, recurrent dynamics, and a compact controller trained inside imagined rollouts.
- Learning Latent Dynamics for Planning from Pixels introduces PlaNet, a latent dynamics model with deterministic and stochastic state components plus online planning from pixels.
- Dream to Control trains actor and value networks through trajectories imagined in a learned latent dynamics model.
- Mastering Atari, Go, chess and shogi by planning with a learned model presents MuZero's learned representation, dynamics, reward, policy, and value predictions for search without reconstructing environment observations.
- Mastering diverse control tasks through world models reports DreamerV3 across more than 150 tasks with one configuration and documents the model, actor, and critic training loop.
- TD-MPC2: Scalable, Robust World Models for Continuous Control uses local trajectory optimization in the latent space of an implicit decoder-free world model.
- Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models combines probabilistic ensembles with trajectory sampling to propagate model uncertainty.
- When to Trust Your Model: Model-Based Policy Optimization motivates short model rollouts branched from real data to limit model bias.