AI Pattern Recognition Demo
Draw shapes on a small grid, label them to train a nearest-neighbour classifier, then test new drawings and see how confidence depends on the examples it has seen.
Before you try
What if you only ever showed the AI big circles? Would it recognise a tiny one?
Try it out
Interactive activity
Sign in to play
Use a Google account (yours or a parent’s) to unlock this simulator. We store only your name and email so your favourites and progress follow you.
Signing in needs an internet connection. Once you are signed in, simulators also work offline.
Free preview
Loading controls…
What happened?
Move a control to see what changes and why.
This learns from the handful of drawings you make. Real AI systems train on millions of examples, and they still get things wrong.
Something went wrong
This simulator could not load. Check your connection and try again.
Try these ideas
- Teach 3 circles and 3 crosses, then draw a wobbly circle. Does it guess right?
- Teach only huge shapes and then test a tiny one.
- Teach a new label of your own, like “triangle”.
Why it works
Machine learning systems do not follow hand-written rules; they learn patterns from labelled examples. This demo uses one of the simplest methods, “nearest neighbour”: a new drawing is compared with every stored example and gets the label of the most similar ones.
Draw on the 8×8 grid, choose a label (circle, line, cross or your own), press Teach to add it to the memory, and then draw something new and press Guess. The similarity bars show why the AI chose its answer, and why it gets confused when it has too few or too similar examples.
Check your understanding
Question 1 of 3
How does this AI decide what a new drawing is?
What usually helps an AI make better guesses?
If an AI was only trained on big circles, a tiny circle might be…
Explain it in your own words
What changed? Why did it happen? Where might you notice this in everyday life?
What will you discover next?
Try Coding Loops and Conditions: Guide the Robot next.
For parents & teachers
- Ask: what might go wrong if an AI is trained on unfair or incomplete examples?
- Where do you meet AI in daily life? Voice assistants, photo tags, recommendations?
- Discuss: should people check an AI’s answers? Why?