A surprise arcade  ·  49 little games

Surprised

You found the arcade. Dozens of tiny games, each one smuggling in a single idea and made simple enough that an eight-year-old can feel it by playing. Start with fractions and pendulums; end up watching a neural network teach itself, or poking at how attention and alanguage model really work. Search, filter, play.

All games

49 games

Rolling Downhill

Gradient descent

Loading…

Drop the ball and press Auto-roll. If it diverges, lower the learning rate.

What it teaches

Training a model is just rolling a ball downhill on its error. The slope says which way to go; the learning rate says how big a step to take. Too big and it flies out of the valley.

Machine Learning

Draw the Boundary

Classification

Loading…

Move the line with the sliders, or press Let it learn to watch it place itself.

What it teaches

A classifier draws a line between two kinds of thing. Everything on one side is an apple, the other an orange. That line is the whole model.

Machine Learning

One Neuron

The neuron

Loading…

Tune the weights so the neuron matches the target gate, or press Train.

What it teaches

A neuron adds its inputs times their weights and fires if the total clears zero. That is the atom of every neural network, and it can learn simple gates on its own.

Machine Learning

Learn XOR

Backpropagation

Loading…

Press Train and watch the colours carve the board until each corner is right.

What it teaches

One neuron can only draw a straight line, so it cannot solve XOR. Add a hidden layer and it can bend space until a boundary fits. Backpropagation is how it finds the bends.

Machine Learning

Activation Curves

Activations

Loading…

Pick a function and slide the input to see its shape.

What it teaches

Between layers each neuron passes its total through a curve that decides how much to fire. Without that bend, stacking layers just gives you one big straight line.

Machine Learning

Find the Groups

Clustering

Loading…

Choose how many groups, then press Step until it settles.

What it teaches

With no labels at all a machine can still find groups: guess some centres, colour each point by its nearest, slide the centres to the middle, and repeat until nothing moves.

Machine Learning

Ask the Neighbours

Nearest neighbours

Loading…

Drag the grey point around and change how many neighbours vote.

What it teaches

The simplest classifier there is: to label a new point, just ask its closest neighbours to vote. More neighbours means a smoother, calmer boundary.

Machine Learning

Too Clever

Overfitting

Loading…

Slide the complexity and compare the fit on the dots against unseen points.

What it teaches

A model too simple misses the pattern; one too complex memorises the noise and fails on anything new. Good learning is the honest middle, and you can watch it happen.

Machine Learning

Scores to Choices

Softmax

Loading…

Move the scores and the temperature and watch the bars respond.

What it teaches

Softmax turns a row of raw scores into probabilities that add to one. Temperature decides whether the top choice dominates or the whole field stays in play. Every model ends this way.

AI Architectures

Who Looks at Whom

Attention

Loading…

Click any word to make it the question and see what it attends to.

What it teaches

Attention lets each word look at all the others and pull in the ones that matter. It is how a model works out that "it" means the tiger, not the deer.

AI Architectures

Guess the Next Word

Language models

Loading…

Pick from the model's suggestions to build a sentence one word at a time.

What it teaches

A language model does exactly one thing: guess the next word from the words so far. String those guesses together and it writes. This one learned from a few nursery rhymes.

AI Architectures

The Running Memory

State space / Mamba

Loading…

Press Play and change the memory to see how long an early signal survives.

What it teaches

Rather than re-read every word like attention, a state-space model like Mamba keeps one running summary and updates it as each word arrives. Memory decides how far back it remembers.

AI Architectures

Build a Model

Scaling laws

Loading…

Add and widen layers, watch the counter, and see what the model might manage.

What it teaches

Stack layers and widen them and the parameter count explodes. More parameters can do more, but cost far more to train and run. This is why big models are big deals.

AI Architectures

A Map of Meaning

Embeddings

Loading…

Tap a word to see its neighbours, then try the famous analogy.

What it teaches

Words become points in space, arranged so similar meanings sit close. You can even do arithmetic with them: king minus man plus woman lands right on queen.

AI Architectures

Lights Out

Parity

Loading…

Tap a light to flip it and its four neighbours. Get the whole board dark.

What it teaches

Every light is wired to its neighbours, so turning them all off is really a puzzle about even and odd.

Logic & Puzzles

Tower of Hanoi

Recursion

Loading…

Tap a peg to lift its top disc, tap another to set it down. Never rest a big disc on a smaller one.

What it teaches

Moving a tall stack is the same problem one disc smaller, done twice. That is recursion you can watch.

Logic & Puzzles

Fifteen Puzzle

Planning

Loading…

Click a tile next to the gap to slide it in. Arrange the numbers 1 to 15.

What it teaches

Fifteen tiles and one gap. Order has to be built move by move, each of which looks like a step backward.

Logic & Puzzles

Nim

Game theory

Loading…

Take any number of stones from one pile. Take the very last stone to win. The computer plays perfectly.

What it teaches

A fully solved game. The winner is fixed in advance by the exclusive-or of the piles, not by luck.

Logic & Puzzles

Mastermind

Deduction

Loading…

Guess the four hidden colours. A dark key means right colour and place; a pale key means right colour, wrong place.

What it teaches

Each guess is an experiment, and the feedback shrinks a space of over a thousand codes toward one.

Logic & Puzzles

Logic Gates

Boolean logic

Loading…

Flip the input switches or swap the gate until the bulb matches the goal.

What it teaches

AND, OR, XOR. The whole of digital logic is a handful of these little truth machines wired together.

Logic & Puzzles

Wolf, Goat, Cabbage

Search

Loading…

Row items across, but never leave wolf with goat, or goat with cabbage, unwatched.

What it teaches

A classic planning puzzle. Some states are traps, and the only way through is to sometimes carry things backward.

Logic & Puzzles

Missionaries & Cannibals

Constraints

Loading…

Load one or two into the boat and cross, never letting cannibals outnumber missionaries.

What it teaches

Every move must keep a rule true on both banks at once. That is constraint satisfaction, the idea behind scheduling and Sudoku.

Logic & Puzzles

Water Jugs

State search

Loading…

Fill, empty, and pour between the jugs until one holds four litres.

What it teaches

With a 5 and a 3 litre jug you can measure a 4. The reachable amounts are exactly the multiples of the two sizes’ greatest common divisor.

Logic & Puzzles

Sokoban

Planning

Loading…

Push every box onto a dot, using the arrows.

What it teaches

You can push a box but never pull it, so one careless shove into a corner can doom the level. Real planning means thinking before you move.

Logic & Puzzles

Mini Sudoku

Constraints

Loading…

Click a cell to cycle its number until the whole grid obeys the rules.

What it teaches

A tiny Sudoku. Each row, column, and box must hold every digit once, and each filled cell rules out choices for the rest.

Logic & Puzzles

Prime Sieve

Number theory

Loading…

Click a number to strike out its multiples. Keep going until only the primes survive.

What it teaches

Cross out every multiple and the primes are simply whatever is left standing. The trick is 2000 years old.

Maths

Times Lightning

Mental maths

Loading…

Pick the right product before the clock runs down. A wrong tap costs you two seconds.

What it teaches

Instant recall of the multiplication table is a muscle. Here are thirty seconds of reps for it.

Maths

Fraction Match

Fractions

Loading…

Read the shaded pie and pick the fraction that matches, reduced to lowest terms.

What it teaches

A fraction is a slice of a whole, and many different fractions name the very same slice.

Maths

Line of Best Fit

Algebra

Loading…

Tune the slope and the intercept to fit the dots, chasing the lowest error.

What it teaches

A straight line is a slope and a height. Threading one through a cloud of points is what regression does.

Maths

Dot Estimator

Number sense

Loading…

The dots flash for a moment. Guess how many there were, then check.

What it teaches

You can feel roughly how many things are there without counting them. That sense sharpens with practice.

Maths

Next in Line

Sequences

Loading…

Work out the rule and choose the number that comes next.

What it teaches

Add, multiply, square, or Fibonacci. Spotting the rule behind a run of numbers is the heart of the thing.

Maths

Angle Aim

Geometry

Loading…

Point the arrow at the dot and read the angle off the protractor.

What it teaches

Degrees measure turning. Ninety is a right angle, and every target sits at one exact angle from the corner.

Maths

The Slope

Calculus

Loading…

Slide the point along the curve and read the slope of the pink tangent.

What it teaches

The derivative is the slope of a curve at a single point. Where the slope is zero you are at a peak or a valley, which is exactly where training stops.

Maths

Area Under the Curve

Calculus

Loading…

Add rectangles and watch the estimate approach the real area.

What it teaches

The area under a curve is a sum of many thin rectangles. Add more and the estimate homes in on the true value. That is integration.

Maths

Dot Product

Linear algebra

Loading…

Drag the two arrows and watch the dot product and the angle.

What it teaches

A dot product measures how much two arrows point the same way: positive when aligned, zero at a right angle. It is the core of attention and of embeddings.

Maths

Bend the Grid

Linear algebra

Loading…

Change the four numbers, or try a preset, and watch the square transform.

What it teaches

A 2 by 2 matrix bends the whole plane: rotate, stretch, shear, flip. Its determinant is how much area grows. Every neural layer is a matrix like this.

Maths

The Cannon

Projectiles

Loading…

Set the angle and the power, then fire to land on the target.

What it teaches

Gravity pulls down at the same rate whatever the sideways speed, and that is exactly what bends the path into a parabola.

Physics

Orbits

Gravity

Loading…

Drag anywhere and release to fling a planet past the star. Find the speed that loops.

What it teaches

An orbit is just falling forever and always missing. Too slow and you crash in; too fast and you escape.

Physics

Pendulums

Oscillation

Loading…

Set two lengths, pull them back, and watch one beat slower than the other.

What it teaches

A pendulum keeps time by its length alone. The weight of the bob never enters the period; longer just means slower.

Physics

The Ramp

Acceleration

Loading…

Change the ramp angle and drop the ball. The acceleration reads out as you go.

What it teaches

On a slope the useful part of gravity is g times the sine of the angle. Steeper means a bigger push down the ramp.

Physics

Bounce Box

Collisions

Loading…

Drag to fling a ball. Add a few more and watch them knock each other about.

What it teaches

When two equal balls hit, they swap the speed along the line between them. Energy sloshes around and barely leaks away.

Physics

Balance Beam

Torque

Loading…

Click to the left or right of the pivot to drop a weight. Make the two sides balance.

What it teaches

What tips a lever is not weight but weight times distance from the pivot. That product is torque.

Physics

The Spring

Oscillation

Loading…

Drag the block aside and release. Change the stiffness.

What it teaches

A spring pulls back in proportion to how far you stretch it. Let go and it swings at a rhythm set by its stiffness and the mass, never by how far you pulled.

Physics

Cart Collisions

Momentum

Loading…

Set the masses and launch. Watch the momentum readout stay fixed.

What it teaches

In an elastic collision total momentum is exactly preserved. A heavy cart barely flinches when a light one hits it; two equal carts swap speeds.

Physics

Simon

Working memory

Loading…

Watch the pads light up in order, then repeat the pattern back. It grows by one each time.

What it teaches

Holding a growing sequence in your head is working memory, stretched one extra step every round.

Mind & Senses

Memory Match

Recall

Loading…

Flip two cards. If they match they stay. Clear the board in as few moves as you can.

What it teaches

Where was that pair? Memory for places improves surprisingly fast with a little play.

Mind & Senses

Reaction Time

Reflex

Loading…

Wait for green, then click as fast as you can. Clicking too early sends you back.

What it teaches

From a flash of light to your click is about a fifth of a second. Here you can measure your own.

Mind & Senses

Stroop Test

Attention

Loading…

Click the colour of the ink, not the word it spells. Thirty seconds on the clock.

What it teaches

Reading is so automatic that naming the ink of a colour word fights the word itself. That clash is the Stroop effect.

Mind & Senses

Binary Blocks

Number systems

Loading…

Flip the switches so their place values add up to the target number.

What it teaches

Every whole number is a sum of powers of two, which is all a computer ever counts in. Eight switches reach 255.

Mind & Senses

Every game here is a few dozen lines of plain JavaScript, no libraries, drawn with the same care as the rest of the site. Only twelve show at a time, so it stays light; search or filter to find the rest. If one breaks on your browser, that is a bug worth an email.