Watch a neural network read your handwriting
Draw a digit. A small neural network, written from scratch in Rust and running right here in your browser, lights up layer by layer as it decides what you drew.
An experiment to see how good AI is at making AI. Nobody trained this version. Claude, an AI model, chose every one of the 25,818 weights itself by reasoning about what handwritten digits look like, with no training data and without ever correcting a mistake. It has never seen a real handwritten digit.
On 10,000 real handwritten digits it gets 39.7% right. Pure chance would be 10%; the trained version gets 96.8%.
Learned from 70,000 handwritten digits. This version started with completely random weights, so at first it was right only by luck. It was then shown every image in the MNIST collection of handwritten digits, 70,000 of them, 20 times over. For each image it made its guess, the guess was compared with the right answer, and every weight was nudged a tiny bit in the direction that would have made the answer more right (backpropagation). That happened in small groups of 32 images: 43,760 rounds of nudging all 25,818 weights, about 25 seconds on a laptop.
Trained the same way on 60,000 of the images, it reads 96.8% of the other 10,000 correctly, images it had never seen. The version running here then used those 10,000 as well.
1 · Draw a digit (0–9)
2 · What the network sees
Your drawing, cropped, shrunk to 28×28 pixels and centred.
3 · Its answer
Inside the network
Loading…pushes a neuron on holds it back · brighter = more active · hover or tap a neuron to see what it looks for
Dev mode · collect test samples
Draw a digit, then click the digit it should be (or press that key). The 28×28 image is saved with your label and the canvas is cleared.
What am I looking at?
On the left is your drawing as 784 pixels. Each circle after that is a neuron: it adds up what the previous layer tells it, and lights up if the total is high enough. The last layer has ten neurons, one per digit; the brightest one is the answer.
Both versions are the same network with the same 58 neurons; only the weights differ. Draw something and flip the switch at the top to see how differently they react.