The first number the whole theory is built from — and it comes from you, not from an app. You will build a probability out of your own numberless hunch, then turn a feeling you’ve had ten thousand times into an exact, checkable number — and derive it, not be handed it.
One plain thread anyone can follow, plus layered boxes — take the ones that fit (they map onto the course’s four registers): ▶ Picture it (kid), the main text (plain), ✎ Try it / ✓ Check it yourself (equation, by hand), ▸ Go deeper (derivation), ⬡ See it in UNI (the running system). Everything runs locally in your browser — no account, no network — and adapts to light and dark. Always commit your answer before you read the reveal: that’s where the learning happens.
One word first — “probability.” A probability is a number between 0 and 1 that writes down how much you’d bet: 0 = “no way,” 1 = “certain,” 0.5 = “even, like a coin.” Hold onto this — the number records a lean you already have; it does not hand you one. Where the lean itself comes from is the whole first half of this lesson.
The one fence that never moves. “Surprise,” and later “free energy,” are functional quantities — numbers a model computes about its own predictions. For you we use felt words, because you’re a person reading a sky; for UNI we use functional words — it reads a hint through a model and its dynamics move to lower a number. Neither is awareness, feeling, or sentience. We keep that line bright on purpose.
How does a mind — yours, an animal’s, or the artificial one we’re building — make sense of a world it can never see directly? You never touch the world. You get hints of it: light on your eyes, pressure on your skin, a smell on the air. From those hints a mind has to guess what’s out there, act on the guess, and not get hurt being wrong.
The astonishing thing is that the whole job reduces to one feeling turned into a number, then one move repeated forever. The feeling is surprise. The move is keep surprise low. So we start where a mind starts: with the jolt of being wrong. No equations yet — just a feeling.
Step outside, first thing, on a morning you remember. You don’t see a number anywhere. You see the particular grey-green the light has gone. The air is damp and heavy and has stopped moving. You catch that mineral smell — rain that hasn’t landed yet, lifting off dry ground. Maybe a dull pressure sits behind your eyes. And without doing a single calculation, something in you leans. Your hand drifts toward the umbrella, or it doesn’t.
Hold onto that lean. It’s what this whole lesson is about — and notice, it arrived with no digits on it.
Now the part that makes surprise matter. Two mornings, both ending with you soaked to the skin:
Same wet shirt. Completely different jolt. And the jolt isn’t tracking the weather (same both days) or whether getting wet is good or bad (annoying both days). It tracks how far what happened sat from what your own lean expected. Monday your lean said no rain, and reality shoved back hard. Tuesday your lean was ready. That jolt is surprise — the alarm that fires when the world contradicts your lean. Staying un-surprised, over a life, is understanding your world.
And the weather app? It was never in this scene. The lean came first, and it came from you. We’ll get to the app next.
Your lean had no number on it. So where would a probability come from? Let’s build one. Yours — in three moves: feel it, lay a ruler on it, then read your own number off your own hunch.
No number is handed to you. You pick a numberless word, a 0–1 ruler is laid on it, and you read your OWN number off your OWN hunch — then see what you just did.
Back in that doorway — grey-green light, damp heavy air, that smell. How much does part of you expect rain in the next hour? Pick the word. Say it out loud.
The ruler runs from 0 = no way to 1 = certain, with “even” dead centre at 0.5. Your “” sits roughly in the shaded zone — but that’s a rough place, not your number. Let’s get your exact one.
Out of 10 mornings that look and smell and feel exactly like this one, where you live, how many end in rain? Write a number and commit it.
Now surprise lands on something real — the lean you just built — and we can be precise. Keep three jobs apart; this is the fix for the thing that trips everyone:
Reality decides what happens; your model turns numberless hints into the expectation; you read the number off it. Surprise is built from your model’s number for the slot reality chose — never a fact handed to you after the event.
And look what falls straight out: if your model had been certain of rain (a lean of 1) and it rained, your surprise should be zero — you can’t be surprised by what your model already knew. That’s our first rule. So before any formula, fix the shape a surprise number must have. Call the surprise of an outcome your model gave probability p by the name S(p):
We haven’t chosen a formula — we’ve written the rules a formula must satisfy.
Flip two fair coins in two separate rooms; they land heads and heads. The two flips have nothing to do with each other, so the surprise of “both heads” can only be the surprise of one plus the surprise of the other — the shocks add. For two unrelated outcomes with probabilities p and q (whose joint is p × q): S(p × q) = S(p) + S(q). That’s the demand. Now — before any arithmetic — commit your bet.
Commit a guess (with a confidence) about which rules survive additivity. THEN test them by hand. Being wrong here is the most useful thing that can happen — it’s the jolt that makes it stick.
Meet −log₂ p as the number of halvings from 1 down to p — a thing your hand does — BEFORE the formula gets its name. Halvings add; that is why it must be a logarithm.
The one operation whose whole identity is “turn multiplying into adding” is the logarithm: log(p × q) = log(p) + log(q), always — exactly our demand. Two small fixes finish it, and neither is a new idea: a log of a number below 1 is negative, so put a minus in front (that’s your Rule 3); and log(1) = 0 hands you Rule 1 for free. So the rule that survives is:
surprise of an outcome = −log( the probability your model gave it )
written S(p) = −log p · its name is surprisal
One more small step, on its own — the unit. Count in halvings (log base 2) and surprise comes in bits. Use the natural log (the ln on your calculator) and it comes in nats. Same quantity, different ruler. UNI works in nats.
Enter any probability; read its surprisal in nats and bits. Then compute one specific value by hand and watch it land on an externally sealed reference. Trust is the match, never the authority.
In the system’s first reproducibility test, the model’s own lean — the probability it had built for the thing it then observed, the same way you built your rain number in §1.5 — was 0.69. Compute its surprisal by hand, then we’ll show you the sealed record.
Your arithmetic: nats
Sealed reference in the release gate: 0.3710636814 nats
The seal is not why you believe it — you just computed it. The seal is the independent, hash-locked record that your arithmetic and the running code land on the same digits. Trust is the match, never the authority.
In two sentences, with no formula, tell an imaginary friend why surprise has to be built from a logarithm.
Take the probability YOU built in §1.5 and measure the surprise both ways — this is your doorway, not a textbook coin.
You can now put an exact, checkable number on the surprise of a single outcome — and, crucially, you know where that number came from: your own model, reading a world that arrives with no numbers. Two doors open: what is the true surprise of what happened, over every hidden cause (it needs a sum you can never finish — the wall); and if you can’t compute your true surprise, how does a mind minimize it? The answer is what this book is named for — free energy: a height, a belief a position, and “making sense of the world” a ball rolling downhill into a valley whose lowest point is a truth you couldn’t compute directly. You’ll build that landscape yourself.