What Is a World Model? › Worked Example: The Pendulum Behind Frosted Glass
World Models HandbookAll chapters What Is a World Model? › Worked Example: The Pendulum Behind Frosted GlassOne section · Sections in this chapter6 / 10 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Let us now make every abstraction tangible with the running example. Picture a pendulum: a mass on a rod of length , subject to gravity and viscous damping , which you can push with a torque . Its physical state is the pair , angle and angular velocity, and its continuous-time dynamics are
Now place frosted glass between yourself and the pendulum. You do not see cleanly; you see a blurred, noisy reading . You never see at all. The frosted glass is not decoration: it is the device that forces every interesting question in this chapter to become concrete. Without it, state estimation is trivial and partial observability is a footnote. With it, you must decide what to remember, what to infer, and how much to trust each.
Walk through the anatomy with this concrete case:
- Observation: a noisy scalar, the blurred angle. Partial (velocity invisible) and noisy (frost scatters light).
- State: the pair , which is Markov for the physics. Your eyes give you neither coordinate exactly.
- Dynamics: the nonlinear equation above, discretized into time steps. Deterministic here, though we will inject process noise shortly to make a point.
- Reward and agent: suppose your goal is to regulate the pendulum near its stable hanging equilibrium, so reward penalizes deviation of from zero and punishes large torques. As the agent, you also implicitly model your own actuator: torques above some limit simply cannot be produced.
Now trace the conceptual distinctions through the same story. Prediction: given your best current guess of , estimate where the pendulum will be one step from now. Simulation: mentally chain many steps forward under a candidate torque schedule, rehearsing how quickly the pendulum settles after a disturbance before committing. Partial observability in action: because velocity is hidden, a model that predicts the next blurred angle from the last blurred angle alone must implicitly infer velocity from the trend of recent readings, and it will be systematically slower and noisier than a model that maintains an explicit internal estimate of . Decision sufficiency: a model trained near the hanging equilibrium can support local regulation but says little about a swing-up trajectory through distant states. Each of these four traces corresponds to one stress test in the code below, so as you read the implementation, keep asking which conceptual claim each experiment is checking.
The following sections implement exactly this scenario. We will collect data from the true pendulum, fit a world model to it, and then stress-test the model in the three ways this chapter says matter: recursive rollout error, prediction versus simulation, and closed-loop control under model bias. The pipeline is intentionally minimal, five short stages with no hidden machinery, so that every result can be traced back to a concept rather than to an implementation detail.