Intuition The One Core Idea
A world model is a machine that learns to dream the future : give it where you are now and what you're about to do, and it predicts what you'll see and feel next. Once an agent has this dream-machine, it can rehearse thousands of "what if I did this?" plans inside its own head before touching the real, expensive world.
Before you can read the parent note, you need to earn every symbol it throws at you. This page lists them in build-order: each one is defined in plain words, tied to a picture, and justified by the question it answers. Nothing is used before it is built.
Everything here happens inside one repeating loop. Picture a creature (the agent ) sitting inside a room (the environment ). At each tick of a clock it sees something, does something, and feels a score.
Definition The perception–action loop
The agent is the decision-maker (the brain + body we are training).
The environment is everything else — the world the agent cannot directly control.
At every moment they exchange three things: an observation , an action , and a reward . That's the whole game.
This loop is the skeleton the parent note hangs every equation on. If you see this picture in your head, the rest is just labels.
Definition The time index
t
t is a plain counter for "which tick of the clock we are on": t = 0 , 1 , 2 , 3 , …
It always sits as a subscript on a symbol. If we write x t , it just means "the thing x at time t ".
Intuition Why we need a clock
The whole point of a world model is predicting the next thing. "Next" only means something if we can say when now is and when next is . So t is now, and t + 1 is one tick later. That tiny "+ 1 " is the entire prediction problem.
Read x t + 1 out loud as "the quantity x one step after the current one." Read x t − 1 as "x one step before ." That's all a subscript ever does — it points at a moment on the clock. (We'll attach it to real symbols like s and a once they're defined below.)
s and observation o
The state s t is the full situation of the world at time t — everything that matters for what happens next.
The observation o t is what the agent actually sees of that state through its sensors (e.g. a 64 × 64 image).
The letter s stands for s tate, o for o bservation. They are not the same:
Intuition State vs. observation — the keyhole
Imagine peering through a keyhole into a room. The state is the whole room; the observation is the sliver you can see. Real agents almost never see the full state — they get a limited, noisy peek. This gap is called partial observability , and it's exactly why the parent note builds a compressed internal picture later.
The letter S (capital) means the set of all possible states — the collection of every situation that could ever exist. Small s t is one specific member of that set at time t .
a and action set A
a t is the action the agent chooses at time t (steer, push, step left).
A is the set of all actions available.
The letter a is for a ction. This is the only lever the agent controls. Everything the agent influences about its future, it influences through a t .
Intuition Why actions are the only "handle"
The agent can't reach into the environment and set the state directly. It can only nudge — pick an action and see what the world does in response. Planning is nothing more than asking: "which sequence of nudges gives me the best future?"
r
r t = r ( s t , a t ) is the reward : a single number saying "how good was it to do action a t in state s t ?" Higher is better.
The letter r is for r eward. The notation r ( s t , a t ) means "r is a function that eats a state and an action and returns a number." (More on functions in §6.)
Intuition Why a single number?
To compare plans we need to rank them, and you can only rank things that live on one scale. Squashing "how good was this moment" into one number lets us later add up rewards over time and say "this whole future scored 42, that one scored 17 — pick the 42." That sum is the return (§8).
The future is not certain. Push a stack of blocks and it might topple left, might topple right. We need a language for uncertainty.
Definition The probability symbols
P ( x ) = the probability of outcome x — a number from 0 (never) to 1 (always).
P ( s t + 1 ∣ s t , a t ) = the chance of landing in state s t + 1 given ("∣ " means given ) that we were in s t and did a t .
x ∼ P means "x is drawn at random from the distribution P " — like rolling a weighted die.
Δ ( X ) means "the set of all possible probability distributions over X " — every possible weighting of the outcomes.
Intuition Why probabilities and not a single prediction
If the world can branch, predicting one single next state is a lie — you'd always predict the average , which may be a place you never actually go (steer left OR right, but never straight-through-the-wall). A distribution honestly keeps all the branches with their weights. This is the exact reason the parent note reaches for a mixture of Gaussians — many bumps, one per branch.
Common mistake "Given" is not "and"
P ( s t + 1 ∣ s t , a t ) is not P ( s t + 1 and s t and a t ) . The bar ∣ means we already know the right-hand side and only ask about the left. It's "the odds of next, assuming we're standing here doing this."
This distribution P ( s t + 1 ∣ s t , a t ) is the world's true physics. A world model is our learned copy of it (§10).
Definition Function and the mapping arrow
A function is a machine: put something in, get something out. We write f ( x ) for "feed x into f ." The arrow in M : ( S , A ) → Δ ( S × R ) reads: "M is a machine that takes a state and an action , and outputs a probability distribution over (next-state, reward) pairs ."
S × R means "a pair: one state and one real number (the reward)". The × glues two sets into pairs; R is the set of all real numbers (any decimal).
Definition The two ways to write the same world model —
M and p
There are two equivalent notations for a world model, and the parent note uses both:
M : ( S , A ) → Δ ( S × R ) — the machine view : a function whose output is a whole distribution .
p ( s t + 1 , r t ∣ s t , a t ) — the distribution view : the actual probability of a specific (next-state, reward) pair, given the current state and action.
The lowercase p is just P used for a density over continuous values. They say the same thing: "feed in where you are and what you do, get out the odds of every possible next-state-and-reward."
Intuition Read the arrow as a factory belt
Left of the arrow = raw material going in. Right of the arrow = product coming out. M 's raw material is (where I am, what I do); its product is (a weighted map of where I'll end up and what I'll score). Writing p ( s t + 1 , r t ∣ s t , a t ) is just naming one drop of that product.
Definition Markov property
A process is Markov if the next state depends only on the current state and action — not on the entire history of how you got there.
P ( s t + 1 ∣ s t , a t , s t − 1 , a t − 1 , … ) = P ( s t + 1 ∣ s t , a t )
Intuition Why this makes prediction possible
A chessboard is Markov: to plan your next move you only need the current board, not the order the pieces arrived. If you needed the whole past, prediction would drown in history. The Markov property is the assumption that lets the parent note write dynamics as a clean one-step rule and chain it forward.
This "chaining one step at a time" is why the parent note's giant expectation is nested and recursive — each step only looks one tick back.
Definition MDP — the whole game bundled
An MDP (M arkov D ecision P rocess) is simply the whole loop packaged into one object: a set of states S , a set of actions A , the reward function r , and the Markov transition rule P ( s t + 1 ∣ s t , a t ) . Whenever you see "MDP", read "the states, actions, rewards, and one-step dynamics, together."
Definition Sum, return, horizon
∑ t = 0 H − 1 r t means "add up the rewards from t = 0 to t = H − 1 ." The ∑ (Greek capital sigma) is just a compact "add all of these."
H is the horizon : how many steps into the future we plan.
J = ∑ t = 0 H − 1 r t is the return — the total score of a whole plan.
Intuition Why sum rewards instead of judging each step
A good plan may accept a bad moment now for a great payoff later (crouch before you jump). Judging single steps is greedy and short-sighted. Summing over the horizon H lets a plan trade short pain for long gain — that total J is precisely the thing planning tries to maximize.
Definition Expectation, sample count, and the hat
E [ X ] is the expected value — the average of X over all the random ways the future could unfold, each weighted by its probability. E P ^ [ … ] means "average, where the randomness comes from distribution P ^ ."
K is simply how many random futures we sample to estimate that average — draw K trajectories, average their returns.
A hat , like P ^ or P ^ θ , marks an estimate : our learned approximation of the true thing P .
Intuition Why average, not best-case
Because outcomes are random, a plan doesn't produce one return — it produces a spread of possible returns. To fairly score a plan we take its average return, weighting each future by how likely it is. That is exactly what E computes. In practice we can't check every future, so we roll out K sample futures and average them — the more samples K , the closer this hand-rolled average gets to the true expectation.
Mnemonic Hat = "my guess"
Whenever you see a hat (P ^ ), whisper "my guess of ". Bare P = the world's real, unknown rule. P ^ θ = the model's guess of it, tuned by knobs θ .
Definition Parameters and updates
θ (Greek "theta") is the bundle of parameters — all the adjustable knobs (weights) inside a learned model. Training = turning these knobs.
x ← x + something is an update rule : "replace x with this new value." The left-arrow is assignment, not equality.
α is the learning rate — how big each knob-turn is.
∇ θ J (the "nabla") is the gradient — the direction in knob-space that increases J fastest. Following it uphill is gradient ascent.
Intuition Why gradients power planning
Imagine standing on a foggy hillside wanting the summit (max return). The gradient is the arrow "steepest way up" under your feet. Take a small step α that way, re-measure, repeat. This is how both the model learns to predict and, when the model is differentiable, how plans get optimized — the parent's chain-rule gradient is exactly this arrow traced back through time.
The parent note assembles three pre-built components. You don't need their internals yet — just what job each does.
π and value Q
A policy π ( a ∣ s ) is the agent's strategy : given a state, it says which action (or the odds of each action) to take. Think "the rulebook the agent follows."
Q ( s , a ) is a value : a learned estimate of "how much total reward do I expect if I take action a in state s and act well afterwards?" Think "a price tag on each move."
These belong to the trial-and-error world of Reinforcement-Learning-Basics ; here you only need to recognize them.
z t and hidden state h t
z t is a latent code : a short list of numbers (e.g. 32 of them) summarizing the whole 64 × 64 image "there's a car ahead, road curves left."
h t is the RNN's hidden state : its running memory, updated every tick, so it knows velocity and trend , not just the current frozen frame.
Intuition Why compress before predicting
Predicting the next million pixels is hopeless; predicting the next 32-number summary is easy. Compress first (that's the VAE), then do all the hard dreaming in the small clean space. The tiny controller can then steer using just this summary.
state s and observation o
probability P and sampling
sum and return J over horizon H
expectation E, K samples, hat approx
parameters theta and gradient
World Model M or p of next state and reward
policy pi and value Q and MDP
Each box is a symbol you now own; the arrows show which idea must exist before the next can be spoken. The whole tree drains into one node — the world model, written either as the machine M : ( S , A ) → Δ ( S × R ) or as the distribution p ( s t + 1 , r t ∣ s t , a t ) — which is the parent note's opening definition.
Cover the right side and answer aloud. If any one stumps you, re-read its section before opening the parent note.
What does the subscript in s t point at? A specific moment on the clock — the state at tick t .
What is the difference between s t and o t ? s t is the full situation (the whole room); o t is only what the agent's sensors see (the keyhole sliver).
Read P ( s t + 1 ∣ s t , a t ) in plain English. The probability of landing in the next state, given we're in the current state and take this action.
What does the bar ∣ mean, and what does it NOT mean? It means "given / assuming"; it does NOT mean "and".
What does x ∼ P mean? x is drawn at random from distribution P (like rolling a weighted die).
Why use a probability distribution instead of predicting one next state? The future can branch; a single prediction collapses to a wrong average, a distribution keeps every branch with its weight.
What are the two equivalent ways to write a world model? The machine view M : ( S , A ) → Δ ( S × R ) and the distribution view p ( s t + 1 , r t ∣ s t , a t ) — same object.
State the Markov property in one sentence. The next state depends only on the current state and action, not on the full history.
What does "MDP" bundle together? The states S , actions A , reward r , and the Markov one-step dynamics — the whole game in one object.
What is the return J and why sum instead of judging each step? J is the total reward over the horizon H ; summing lets a plan trade short-term pain for long-term gain.
What does K count in E estimation? The number of random futures (trajectories) we sample and average to approximate the true expectation.
What does the hat in P ^ θ signal? It is our learned estimate of the true (unknown) rule P , tuned by parameters θ .
What does the gradient ∇ θ J tell you? The direction in knob-space that increases the return J fastest — the "steepest way up".
What is a policy π ( a ∣ s ) versus a value Q ( s , a ) ? π is the strategy (which action to take in a state); Q is a price tag (expected total reward for a move).
Why compress an image into a latent z t before predicting? Predicting a short code is tractable; predicting a million raw pixels is not — dream in the small clean space.
What single job does the RNN hidden state h t do? Carries a running memory of the past so the model knows trends like velocity, not just one frozen frame.
You are now equipped to read the parent topic without hitting an undefined symbol.