Study Notes

Interactive, hands-on explainers of ideas in machine learning and math — built to be poked, dragged, and run.

The Forward-Forward Algorithm: Two Forward Passes Instead of a Backward One

Hinton's Forward-Forward algorithm trains a network without backpropagation: it replaces the forward-then-backward sweep with two forward passes — one on real data, one on fake — and lets every layer learn immediately from its own local 'goodness' objective. What goodness is, why layer normalization is the load-bearing trick, and a live in-browser training race between Forward-Forward and backprop.
Read More →

World Models: Learning to Dream, Then Act

A World Models agent splits into a large world model trained unsupervised and a tiny controller trained by evolution: V compresses each frame to a latent vector, M learns to predict the next latent given the action, and C maps that compressed state to an action — small enough to train entirely inside the model's own hallucinated rollouts, then transfer to reality.
Read More →

Temperature and Entropy: The One Dial Behind Softmax, LLMs, and Boltzmann Machines

The temperature parameter in an LLM divides the logits before the softmax. Raise it and the output distribution flattens, so its entropy rises — and that is not a loose analogy but the literal statistical-mechanics relationship: a softmax is a Boltzmann distribution with energy = −logit, and temperature trades expected energy against entropy, monotonically, from a deterministic argmax to the uniform distribution.
Read More →

Options Theory, Visually: Payoffs, Black–Scholes, and the Greeks

The Black–Scholes formula — N(d₁), N(d₂) — is easy to memorise and hard to reconstruct. Rebuilt from the payoff up: an option's price is the discounted, risk-neutral expectation of its payoff, and volatility is what gives it value. Drag the strike, widen the volatility, watch a Monte-Carlo average crawl onto the Black–Scholes price, and read the Greeks as slopes and curvature.
Read More →

How Many Coin Tosses to Catch a Rigged Coin?

How many flips does it take to confidently tell a rigged coin from a fair one? Flip a coin and watch the evidence pile up, see a p-value light up, push the false-alarm and missed-detection curves apart, then read the exact number off one clean formula — and confirm it with a thousand simulated experiments. The punchline: near-fair coins are expensive to expose, and the cost scales like 1/(p−½)².
Read More →

Shannon Entropy, Visually: Surprise, Uncertainty, and Bits

Entropy is usually introduced as a formula — −Σ p log p — with the meaning left implicit. Rebuilt from the ground up: entropy is average surprise, measured in yes/no questions. Drag a coin's bias, reshape a distribution, and watch a sampler's running surprise converge onto the entropy.
Read More →

Boltzmann Machines, Visually: From Hopfield Nets to Stochastic Neurons

Hopfield networks slide downhill into the nearest memory — and get stuck. Add a single ingredient, temperature, and that deterministic descent becomes a Boltzmann machine that samples, escapes local minima, and learns. A hands-on, visual walk-through with live energy landscapes, annealing, and a trainable RBM.
Read More →

A Day in Luca's Life: Finding Optimal Decisions with MDPs

A Markov Decision Process models sequential decisions under uncertainty, where today's choice shapes tomorrow's options. An interactive introduction to MDPs and value iteration, worked through one small example: should a 9-year-old study, play, or rest after school?
Read More →