ai learning lab · an instrument, not a course reader
Learn how language models actually work — by operating one.
Vectors, gradients, attention — normally taught as equations on a slide, or as a chatbot describing its own internals back to you in prose. Here they're controls on a real instrument: nudge a weight and watch an actual perceptron's decision boundary move, train a tiny RNN in your browser and watch its memory genuinely fail, read attention weights straight off a real transformer's forward pass. Real numbers, computed on your machine, the instant you touch them.
No API key. No signup wall to try it. No server round-trip for a single exercise — every model in the browser-tier chapters runs in this tab and keeps working after you go offline.
This is not another “ask AI to explain AI”
There is no chatbot anywhere in the learning path. Understanding is built by direct manipulation of real model internals, not by reading model output about itself.
A textbook page or a blog post describes attention with a diagram. You never see a real weight — only an illustration of one.
A model describes its own mechanism in prose. It's still zero real numbers — you're reading a guess about internals, generated the same way any other answer is.
You embed your own word. The vector is real. You drag it, and the cosine similarity that updates is computed from what you just did, not looked up.
for the technical audience
How it actually runs
No server in the loop for anything you play. Here's the stack, end to end.
transformers.js (ONNX Runtime Web) does embeddings, tokenization, small causal LMs and attention extraction on WebGPU, falling back to WASM automatically — the backend in use is shown live, top right. Model weights cache in the browser's Cache Storage after the first fetch, so a chapter you've opened once needs no network again.
TinyNet and TinyRNN are hand-rolled nets with real forward and backward passes, trained live in your browser as you play — not pretrained weights. Their analytic gradients are checked against numerical ones in the test suite, so the backprop pulse you watch on screen is verified, not staged.
Every game is prepare → initState → applyAction → evaluate. An engine never imports a model — one is injected through a deps parameter. That is why the same code path runs 780 tests offline in about a second and drives real inference in the browser, with nothing mocked in between.
Every level's parameters, pass criteria and star bands live in versioned JSON, validated by a Zod schema plus cross-file checks — unlock-graph cycles, XP sums, and a calibration script that plays every pure-computation level optimally to confirm its thresholds are actually reachable. Components render engine state; they never own rules.
A Zustand store persists to IndexedDB, not localStorage — the same local data layer backs the offline activity queue and cached model records. A service worker caches the app shell and bundled corpora; it deliberately does not cache model weights, which would double the storage cost for nothing.
Next.js API routes exist only to optionally persist progress to MongoDB and to proxy a single optional cloud escalation in the capstone chapter — the API key never reaches the browser. Every exercise before that runs, and is scored, entirely on your machine.
the course
6 worlds. 22 chapters.
Each world owns one accent color, carried through into the map you'll actually play on. Chapters unlock in order — every arrow below is a real dependency, not a suggestion.
every chapter below is live — open any of them from the map
World 1 · Fundamentals
How text becomes numbersWorld 2 · Classical ML
Learning from mistakesWorld 3 · Neural Networks
Depth, gradients and trainingWorld 4 · Sequence Models
Memory and its limitsWorld 5 · The Transformer
Attention, end to endWorld 6 · Capstone
The whole instrumentWorld 7 · Grounding & Tools
Retrieval, context and real toolsWorld 8 · Scale, Efficiency & Safety
What changes when a model has to run for realno invented data
Nothing shown to you is fabricated
- →Word clusters come from k-means over live embeddings — there is no answer key sitting in the JSON.
- →The tokenizer puzzle is scored against the real BPE merge-rank table, not a hand-picked sequence.
- →A trained RNN's memory decay is measured from its actual hidden states as an early token gets overwritten.
- →N-gram tables are counted from a bundled corpus at runtime — change the corpus, and the model changes.
- →Attention weights are read from a real transformer's forward pass. If a model doesn't expose them, the chapter says so and offers a retry, rather than showing something plausible.
Your machine is already fast enough for this.
First model download is a few dozen megabytes, cached after that. Everything else — gradients, attention, a real hidden state forgetting — happens on the CPU or GPU you already have.