Perceptron MNIST: Simple Brain Cells
When you look at a handwritten number "3" or "7", your eyes and brain recognize it instantly. But to a computer, an image is just a grid of colored pixels. In this game, you can draw a digit on a grid, and watch a virtual neural network guess what number you drew in real-time.
This simulation is based on a famous historical experiment called the Perceptron. Invented in the late 1950s, the Perceptron was the very first model of an artificial brain cell (neuron) capable of learning to recognize patterns from raw inputs.
Cabinet Controls: Click and drag inside the drawing canvas to draw any number from 0 to 9. The cabinet will show its **Prediction** at the top right. Underneath the canvas, the **Weights Visualizer** displays the network's synapses. Red pixels represent positive weights (pixels that encourage a certain number guess), and blue pixels represent negative weights (pixels that discourage that guess). Click **Clear** to start drawing a new number!
The Perceptron works like a team of voters trying to make a decision. Here is how it processes your drawing:
- Pixel Inputs: The drawing canvas is made of pixels. If you draw on a pixel, its value is 1. If it's empty, its value is 0.
- Connection Weights: Each pixel is connected to the output neurons. Each connection has a "weight" (a number showing how important that pixel is). For example, pixels in the center have high weights for numbers like "8", but negative weights for numbers like "0" (since "0" is empty in the middle).
- Summing & Activation: The artificial neuron multiplies each pixel value by its weight and adds them all up. If the final score is positive and passes a threshold, the neuron fires, declaring its guess!
- Learning: When the perceptron makes a mistake during training, it automatically adjusts its weights. If it guessed "1" but you drew a "7", it decreases the weights of the pixels that led to the wrong guess and increases the weights of the pixels that should have been active.
The Perceptron is the fundamental building block of **Deep Learning**, the dominant form of AI today.
A single perceptron is like a single brain cell—it can only solve simple puzzles. But when scientists stacked millions of these perceptrons together in layers, they created **Deep Neural Networks**.
Every modern AI system that understands images—from face recognition on your smartphone to self-driving cars detecting stop signs—uses layers of artificial neurons. By playing this game, you are looking directly at the simple engine that makes the most advanced visual AI in the world work!