Interactive lessons
Three short lessons where you predict first and find out second. Each has one control that changes the underlying cause, so you watch the answer change instead of being told why.
- Made
- Written by
- Claude Opus 5.5 in Claude Code, directed by me
- Built with
- HTML, CSS and a little JavaScript
- Status
- Live, three lessons
- Monty Hall Why switching wins, and the one fact that makes it true. Lesson
- Simpson's paradox Better in every group, worse overall, and how that happens. Lesson
- √2 is not a fraction A search that can't succeed, and the picture that proves it. Lesson
The question
Can five minutes on a web page make you understand something, not just read about it? The test I care about is the moment of surprise: you commit to an answer, the evidence disagrees, and you see exactly why.
How they work
- Predict before you're told. Every lesson opens with a question, before any explanation.
- Your first answer is final. The buttons lock once you choose, so you can't click around until the right one lights up. The end of each lesson lists what you predicted and whether you were right first time.
- The verdict waits for the evidence. You find out whether you were right only after the simulation, the split table or the proof, not the moment you answer.
- One control that changes the cause. Make the Monty Hall host guess instead of know. Move a hospital's patients between groups. Shrink the squares. Each is the one thing that, changed, changes the answer.
- The formula comes last, as shorthand for something you've already watched happen.
- End on something new. The last question is a different problem with the same structure: the three prisoners, university admissions, √3.
- It works without JavaScript. Each page reads as a complete explanation; the script only adds the interaction. It works with a keyboard, announces results to screen readers, and holds still if you've asked your system for reduced motion.
What changed from the first version
An earlier version had eleven hand-built lessons and a generator that wrote new ones. An adversarial review of it was blunt:
- Most lessons were screens to click through, with quiz checkpoints on the way.
- Retrying until a gate opened counted as passing.
- Generated lessons were more expository than the hand-built ones: they told the mechanism before letting you discover it.
- Nothing showed that anyone learned anything.
These three are rebuilt from scratch against the first three points. Answers lock, verdicts are deferred, and each lesson is designed around the cause you can change rather than around a sequence of screens. The fourth point still stands; see below.
Evidence
- Three lessons, each about five minutes, with four to six steps.
- Under 7 KB of gzipped JavaScript per lesson: a shared 2.7 KB runtime plus 2 to 4 KB for the lesson itself. Only these pages run scripts; the rest of the site has none.
- Each lesson was walked through end to end in headless Chrome: every step and widget, and the page with JavaScript switched off. The controls are native buttons, radio buttons and a slider, plus a 100-door grid you can move around with the arrow keys.
- The simulations behave as the maths says: over 1,000 Monty Hall games, switching wins about 67% with a host who knows and about 50% with one who guesses.
What didn't work, and the limits
- No learner evidence yet. I tested that the lessons work, not that they teach. A real test needs people who haven't seen the answer, a new problem afterwards, and a check a week later.
- The first build gave the answer away. It said "Not quite" the moment you answered, before you'd played a single game. Deferring the verdict was the fix, and it changed how every lesson is structured.
- These are hand-designed, not generated. The first version's finding holds: generating lessons that let you discover, rather than tell you, is the hard part, and it isn't solved here.
- They only suit problems with a mechanism. Probability, statistics and proof have a fact to be wrong about. History and other argued subjects need a different shape, built around evidence and counterfactuals, which none of these attempt.