🤖 AI and machine learning for kids
From a hand-written rule that runs out, to nearest neighbours, decision trees, gradient descent, a neural network you train yourself, backpropagation, k-means, Q-learning and attention.
- 13 units
- 52 lessons
- 355 exercises
- Units 1–2 free
- Ages 8–15
How this track is kept honest
Nothing in this track imports a library. No numpy, no scikit-learn, no torch — because the claim it makes is that a neural network is only multiply, add and one curve, and a lesson that called fit() would make that a claim nobody could check. The maths is re-derived twice: analytic gradients are checked against numerical ones to six decimal places.
Best after the Python track. Every sample is Python short enough to read on a phone.
How it starts
You have written rules: if, else, while. The computer never decided anything — you decided, and it obeyed. Here is a rule for spotting a cat.
The full AI syllabus
13 units and 52 lessons, in the order they are played. Each unit has a page of its own with every explanation in it, the code samples and what they print, and a few questions to try.
Unit 1: Rules or Examples
What makes a program learn
- When Rules Run Out
- Everything Becomes Numbers
- Was I Right?
- Your First Learner
Unit 2: Ask the Neighbours
Guessing by what it looks like
- How Far Apart?
- Copy the Closest
- The Big Number Wins
- Honest Testing
Unit 3: Twenty Questions
A model you can read
- One Question Is Not Enough
- Which Question Is Best?
- Growing the Whole Tree
- A Tree That Learned Too Much
Unit 4: Right and Wrong
One number is never enough
- Two Ways To Be Wrong
- Precision and Recall
- Moving the Line
- Which Mistake Is Worse?
Unit 5: The Neuron
Three numbers that fix themselves
- A Neuron Adds Up
- Learning the Weights
- It Draws a Line
- The XOR Problem
Unit 6: Downhill
Getting less wrong, one step at a time
- How Wrong Am I?
- Which Way Is Downhill?
- Sliding Downhill
- How Big a Step?
Unit 7: Layers
Neurons feeding neurons
- A Smooth Switch
- A Layer in the Middle
- The Shape of a Network
- Reading a Network
Unit 8: Backpropagation
The network finds its own numbers
- Who Is to Blame?
- The Slope of the Squash
- It Teaches Itself XOR
- When Training Goes Wrong
Unit 9: Seeing
Pictures are grids of numbers
- A Picture Is a Grid of Numbers
- Sliding a Filter
- Nine Weights That Work Everywhere
- Reading a Number
Unit 10: Groups Nobody Labelled
Learning with no answers at all
- No Answers Anywhere
- Guess, Then Move
- Watching It Settle
- Where You Start Matters
Unit 11: Learning by Reward
Nobody says what to do, only what it was worth
- No Answers, Only Rewards
- What Is This Square Worth?
- Try Something You Have Never Tried
- You Get What You Pay For
Unit 12: Words
Guessing what comes next
- Words Become Numbers
- What Comes Next?
- Writing a Sentence
- Why It Makes Things Up
Unit 13: Attention
How the big models work
- Meaning as Numbers
- Paying Attention
- What a Transformer Is
- Using AI Well
Other things to learn
- 🐍 Python for kids
The friendliest first language. Start here!
- ✨ JavaScript for kids
The language of websites. Try it after Python.
- ⚙️ C programming for kids
How computers really work. Read, predict and reason about real C.
- 🚀 C++ for kids
C with the sharp edges filed off. Powers most games.
- 🔌 Digital logic for kids
Start with one tiny switch. Finish with a working computer.
- 🌱 Git and version control for kids
Save your work forever, and share it.
- 🐧 Linux and the command line for kids
Drive a whole computer by typing.
- 🔢 Problem-solving maths for kids
Powers, shapes, chances and proof — the way problem solvers see them.
- 🤖 Robotics coding for kids
Write code that drives a machine around a room.
- 🏁 Competitive programming for kids
Win the race. The algorithms that beat the clock.