🍎 Teach the AI
Fruit Classifier
You are the teacher. Train your very own AI to recognise fruits — similar to one step in a real machine-learning workflow. No coding needed!
🧠 How does this work?
Step 1 — Give Examples
You show the AI many fruits and tell it their names. This is called Training Data.
Step 2 — AI Learns Patterns
The AI studies the features — colour, size, shape — and finds hidden patterns. This is called Training.
Step 3 — AI Makes Guesses
Now show the AI a fruit it hasn't seen before. It uses the patterns it learned to predict what it is.
More Data = Better AI!
The more examples you give, the smarter your AI becomes. Just like how you get better at anything with practice.
Wizzy says:
Hey! I'm Wizzy, your AI learning buddy. 🎉 Here's a question before we start — how do YOU tell an apple from a banana? You look at its colour, size, shape right? That's exactly what your AI will do too. Let's teach it together!
🍑 Pick a Fruit & Add Features
Select a fruit, then adjust its features with the sliders. Every fruit is a little different!
Adjust the features for this fruit ?
📊 Your Training Dataset
Each row is one example the AI will learn from. Aim for variety!
| Fruit | Colour ? | Size ? | Shape ? |
|---|---|---|---|
|
🌱
No data yet! Start adding fruits above. | |||
🎓 What is Training Data?
Babies learn like this!
When you were a baby, your parents showed you many apples and said "apple!" Again and again. That's exactly how AI learns too.
Features = Clues
Colour, size, and shape are "features." The AI uses these clues — just like a detective — to figure out which fruit is which.
Balance matters!
If you only show the AI 10 apples and 1 banana, it'll think everything is an apple. Good AI needs balanced data.
🧠 Your Neural Network is Learning...
Each circle is a "neuron." They're passing information to each other to find patterns in your fruit data.
Wizzy says:
Here comes the moment of truth! 🎯 I'll show you a mystery fruit with certain features. Can your AI figure out what it is? Click the fruit box to shuffle, then hit Predict! Try at least 4 times to see how well your AI learned.
🎲 Mystery Fruit
Click the box to shuffle a new mystery fruit, then let your AI predict!
📊 AI Confidence Scores
Hit "Predict!" to see what your AI thinks
🏆 Your Score
✅ Correct
❌ Wrong
🔮 Predictions
📈 Your AI's Accuracy
🎓 What just happened?
Confidence Scores
Your AI gives each fruit a "confidence score" (like a percentage). The highest one wins! This is called a probability distribution.
KNN — Finding Neighbours
Your AI uses a method called K-Nearest Neighbours. It finds the fruits in training data most similar to the mystery fruit and votes!
Why does it get it wrong?
If apples and oranges are similar in size and colour, your AI might confuse them. More data = fewer mistakes.
WhizzStep Junior AI Badge
Activity completion card for
has successfully built and trained their first
Fruit Classifier AI Model
Training examples: — | Predictions made: — | AI Accuracy: —
You collected data, trained a model, and tested it on unseen examples.
Wizzy says:
🎊 Amazing work! You just used Machine Learning — the same technology that powers Google Photos (recognising your face), Spotify (recommending songs), and self-driving cars. The only difference? They use millions of examples instead of your 8+. You've taken your first real step into AI! 🚀
🌍 Real AI uses the same ideas!
Google Photos
Recognises your face vs your friend's face — exactly like your AI recognised apples vs oranges. It was trained on billions of face photos.
Spotify / YouTube
Learns your preferences (features = songs you like) and predicts what you'll enjoy next. Same KNN-style logic at a massive scale.
Medical Diagnosis
Doctors train AI on thousands of X-rays to detect cancer early. Features = pixel patterns. Labels = healthy/unhealthy. Life-saving ML!
Self-Driving Cars
Tesla's AI was trained on millions of hours of driving footage. It learned features like road markings, pedestrians, and traffic lights.
About this lab
Learning objective: Sort fruit by simple features and see how a basic classifier learns a decision boundary from examples.
What this simplifies: A small, hand-labelled fruit dataset and a simplified classifier are used; this is not a production image-recognition system.
Privacy: No learner input leaves the device.
Teacher prompt: Ask the class why this simulation might mislead someone who takes it too literally.
Reflect: What is one thing this activity showed you that you did not expect?
← Back to all Labs