AAI, Built

A thirty-one-part course on how modern AI works and how it came to be

AI, Built

In 1951 Claude Shannon asked people to guess the next letter of an English text, and from their mistakes estimated how much information English carries. Every modern model plays a version of that game: language models guess the next token, diffusion models guess the noise, policies guess the next action. The course asks what you have to know to guess well, derives the mathematics on screen, trains its own small models, and tells the field's history as it goes.

31 parts28 hours of lectures553 chapters31 runnable labs31 interactives31 problem sets with solutions30 parts with Chinese notes

Contents

Each part opens as lecture notes: the text of every chapter, its key results, an interactive and a lab, problems with solutions, and sources.

Act IFoundations

Act IILearning from Data

Act IIIThe Transformer Era

Act IVGeneration and Perception

Act VAgency

Finale

How to use the course

1 · Read or watch

Each part is a lecture built in code: derivations in full, every number computed or cited. Its page carries the lecture as text, chapter by chapter, so you can follow along with the film or read it on its own.

2 · Revise

Each part's page ends with its key results, the glossary, where each idea comes back, and what the film computes and builds.

3 · Run the lab

One lab per part, on the series' autodiff. Seeded, a few seconds each, nothing to download. Each checks its own result and ends with three things to change.

4 · Work the problems

Problem sets with worked solutions, in English and (where the part has them) Chinese. Try them before opening the solutions.

5 · Check the sources

Every page lists the papers, books and data the film was checked against.

Four tracks through the same material

Every chapter has a home level. A track is the set of chapters to watch at that level; on each part's page a button shows them.

The story and the devices

The story

Shannon's guessing game. In 1951 Claude Shannon asked people to guess the next letter of an English text, and from their mistakes estimated how much information English carries. Every modern model plays a version of that game: language models guess the next token, diffusion models guess the noise, robot policies guess the next action, world models guess the next frame. The question that grows through the series: what do you have to know to guess well? And alongside it, the field's own history: who tried what, why it worked or didn't, and how each idea led to the next.

  • Act I, Foundations: information, the symbolic era and its search and logic, linear algebra, calculus and autodiff, randomness.
  • Act II, Learning from Data: classical and statistical learning, generalization, neural networks, the deep learning revolution (CNNs, RNNs), optimization, and the mathematics of scale.
  • Act III, The Transformer Era: attention, the language-model lineage from GPT-1 to today's open-weight frontier, memory, sparsity, the hardware, pretraining at scale, and inference.
  • Act IV, Generation and Perception: VAEs, GANs, flows and energy models; diffusion and flow matching; images, video and 3D; tokens for every sense; self-supervised learning; symmetry and science (AlphaFold, weather, maths).
  • Act V, Agency: reinforcement learning from Bellman to AlphaZero and MuZero, post-training and alignment, reasoning, agents and world models.
  • Finale: open a model up and see what it knows; then ask whether we can trust it.

Three devices hold it together:

  1. The scoreboard (explainer.ai.scoreboard): one fixed passage, chapter 2 of Dashiell Hammett's The Maltese Falcon (1930), in the US public domain and on Project Gutenberg since 1 January 2026. It is held out of the training data for the models we build here. Earlier editions may have reached pretrained models; the Gutenberg release date does not establish that their training data is uncontaminated. Each row is a model's bits per character on it. Part 1 computes the passage and the first rows (.cache/ai1/scoreboard.json); later parts add the models they build (Kneser–Ney and an ∞-gram in Part 7, a neural n-gram in Part 9, a character LSTM in Part 10, a small transformer in Part 13, and more), all trained on the same thirty novels.
  2. Payoffs: each idea is introduced with "where this comes back" (explainer.ai.payoff_card), and the later part opens by calling back to it.
  3. The timeline strip (explainer.ai.timeline, 1940–2030) on every chapter card.

Setup

git clone https://github.com/Sir-Teo/explainer-videos.git
cd explainer-videos
bash tools/setup_linux.sh && source .venv/bin/activate
python -m videos.ai.ai1.compute   # the first part's numbers
python tools/build.py ai1             # the first part

The plan of record is the syllabus: the standard every part meets and all 31 parts chapter by chapter. The sources are in the repository; the other courses are on the front page.