Minimize free energy

The punchline. Rolling downhill on the one number you can compute hands you back both things the wall took: the true belief you couldn’t reach, and the true surprise you couldn’t compute — at once. Then one piece of bookkeeping — the bound tag — keeps the whole claim from ever becoming a lie.

Five doors as before — the plain line runs straight through; take whichever fit: ▶ Picture it, ✎ Try it (commit before the reveal), ✓ Check it yourself, ▸ Go deeper, ⬡ See it in UNI. Runs locally — no account, no network — and adapts to light and dark; honours reduced motion.

The one fence that never moves. “Free energy,” “surprise,” “belief,” “bound” are functional quantities — numbers a model computes and the honesty tags on them. For you we use felt words; for UNI, functional ones. Neither is awareness, feeling, or sentience. The exact loop proved here is the sealed Gate-F0 two-state case; the hierarchy and the organism’s behaviour are the build underway, held open.

0 · From memory

First, with no peeking

No scrolling back to Module 6. A ship’s navigator fixes position from a few stars, each sighting a little off. Free energy split into surprise + gap — reconstruct, cold.

If that came back cold, here’s the payoff the whole book was built for.

1 · Put the two faces together

Minimizing F means minimizing the gap

Both are exact descriptions of the same height F[q]:

  • Computable face: F = energy − entropy — built from the joint, no evidence. You can actually minimize this.
  • Meaning face: F = surprise + gap, with gap ≥ 0. This tells you what the minimum must be.

You can slide your belief to make F as small as possible. The surprise is a fixed number, so minimizing F means minimizing the gap — and the smallest the gap can be is zero, reached only at the posterior. So, forced:

argmin F = the posterior  ·  min F = −ln p(y) = the surprise

2 · The punchline

One descent, both impossible things

Roll the ball to the floor and read both dials as it stops: where it stops is the true belief; how deep it sank is the true surprise. The mind never saw either in advance — it only felt which way was downhill. That is active inference’s beating heart.

Roll downhill — recover the belief AND the surprise

Drop the ball; as it lands at the floor, the belief dial hits the posterior (0.913) AND the height dial hits the surprise (0.371064), gap → 0. One blind descent hands back both things the wall took — the evidence never computed once.

b = 0 b = 1 F high F low
Drop the ball at:
where it stopped — the belief
—
how deep it sank — the height F
—

Drop the ball and watch both dials resolve together.

One descent handed you both. Where it stopped — b = 0.913 — is the posterior, the belief you couldn’t reach. How deep it sank — F = 0.371064 — is the surprise, the number you couldn’t compute (−ln 0.69). The arc closes: every golden in this book — 0.69, 0.913, 0.944576, 0.371064 — was one computation, seen from a different rung. The evidence was never computed once.
✓ Check it yourself — the arc closes equation · by hand
Minimum at b = 0.913; value there F = 0.371064. The surprise, all the way back from Module 1, was −ln(0.69) = 0.3710636814. They are the same number. You just closed the loop by hand.
3 · The tag with teeth

Not every free energy is a safe bound

In our two-cause world you could minimize F perfectly, so min F equalled the surprise. Real worlds are too big to minimize perfectly — you land a little above the floor, where F is a ceiling over the surprise (still F ≥ −ln p(y)). A ceiling is useful — only if you never mistake it for the surprise itself. So every free-energy number carries a bound tag. Pick one and see where it can land relative to the true surprise:

Where each tag can land

This panel’s dashed floor belongs to a DIFFERENT model — a two-state chain, whose floor is ln 2 = 0.693147 (not this lesson’s two-cause world, floor 0.371064; the two floors are never put on one line). A tag is a safe stand-in only if it lands AT or ABOVE that floor. Find the one that can dip below — that’s the one never trusted as a bound.

Pick a tag to see where it can land — and whether it’s a safe stand-in for the surprise.
▸ Go deeper — the Friston sign and MMP-BOUND-01 derivation
F is always reported with the Friston sign — an upper bound on surprisal, F ≥ −ln p(y). The tag says whether that number is a trustworthy stand-in (:exact) or only a loose ceiling. A number without its tag is not evidence — in the code, F is never a bare float but a value and its tag, and a bound is “guaranteed” only for :exact / :exact_mean_field. The one that bites: a :mmp form can fall below the surprisal — e.g. on a two-state chain where the true surprise is ln 2 = 0.693147, the :mmp value is ln 2 / 2 = 0.346574, under the floor — so it is never used as a bound or fed back as a belief (the rule MMP-BOUND-01).
⬡ See it in UNI functional · Gate F0 proven
The exact loop — minimize F, recover the posterior and the surprise — is the proven Gate-F0 two-state case the organism stands on, and every F it reports wears its bound tag so a loose ceiling is never mistaken for the surprise. The hierarchy (loose :exact_mean_field ceilings) and the organism’s full behaviour are the build underway, held open rather than claimed. Numbers and their honesty tags — never a thing it feels.
4 · Where this goes next

The spine is closed

That’s the spine: minimizing free energy recovers the surprise and the posterior at once, from a number computed without the evidence, reported as a tagged bound so it never overclaims. Two directions open into Part II: scale it up — vast causes stacked in layers, where you get a genuine :exact_mean_field ceiling instead of an exact floor (Module 8) — and turn it into doing — acting to change the world so sensations fall in line, scored by a forward cousin of free energy (G), the gateway to behaviour.

⬡ Notice what you just did self-reference
You took a surprise you could never compute, built a different number you could, proved it was a ceiling over the first, and watched the ceiling come down to touch it exactly — handing you the unreachable answer as a side effect of rolling downhill. You didn’t learn about active inference. Across seven modules, from a feeling in a doorway, you built it.