Live demo

train-ai-from-scratch

Two of the six models, trained from scratch and running in your browser. Nothing is sent to a server.

01Supervised99.29% on MNIST

Draw a digit.

This is the actual 421,642-parameter network from train.py, re-implemented in about 60 lines of plain JavaScript and loaded with its trained weights. It learned from 60,000 handwritten examples.

draw 0 – 9 here
?
Confidence-

What the model seesYour drawing cropped, shrunk to 28×28 pixels and centred, exactly like the training images. That's why the size and position of your drawing don't matter.

05Reinforcement0.2 → 20.1 apples per game

Watch it play Snake.

Nobody showed this agent a single good move. It played 3,000 games, earning +10 per apple and −10 per crash, and filled in a table of how good each move is in each situation. Switch to Untrained to see where it started.

Score0
Best0
Games0
Average-

What it senses: 11 yes/no facts

What it thinks each move is worth

Q-values from the trained table. It always picks the highest.