Rock, Paper, Scissors with Teachable Machine
A reusable one-day AI/ML showcase lesson. No code required — students train and test a real image classifier using their webcam.
Objectives
- I can explain what training data is and why the quality and quantity of examples matters.
- I can collect image samples, train a machine learning model, and test it using Teachable Machine.
- I can describe what happens when a model is trained on too few examples or unrepresentative data.
- I can connect the idea of a classifier to real-world AI applications like face recognition or spam filters.
Warmup: How Does a Computer Learn to See?
Answer these questions in your head:
- If you wanted to teach a computer to tell the difference between a cat and a dog, what would you give it?
- What do you think would happen if all your cat photos were taken in the same room with the same lighting — and then you tested the model in a different room?
- Why do you think more examples usually lead to a better model?
We’ll come back to these questions at the end of class.
Explore the MIT RAISE Playground
Before we train our own model, spend 5 minutes exploring some AI tools built by researchers at MIT.
- Open playground.raise.mit.edu/main/ in a new tab.
- Pick one project that interests you (for example, an image classifier or a chatbot demo) and try it out.
- In your notebook, write one sentence about what the tool does and one sentence about something that surprised you.
Work Session: Build a Rock-Paper-Scissors Classifier
Today you will train a real machine learning model using your webcam. No code required — just your hand and your brain.
Key Vocabulary
- Training Data
- The collection of examples used to teach a machine learning model. For an image classifier, each example is a photo labeled with the correct answer.
- Class
- A category your model will learn to recognize. Today your classes are Rock, Paper, and Scissors.
- Model
- The result of training — a set of learned patterns the computer uses to make predictions on new input it has never seen before.
- Confidence Score
- A percentage that tells you how sure the model is about its prediction. A score of 95% means the model is very confident; a score of 40% means it is guessing.
- Epoch
- One complete pass through all your training examples. More epochs can improve accuracy, but too many can cause the model to memorize your exact training photos instead of learning general patterns.
Step 1 — Open Teachable Machine
Open teachablemachine.withgoogle.com/train/image in a new tab. This link takes you straight to a new image project — no setup needed.
You will see three empty classes at the top of the page. Rename them by clicking the pencil icon next to each name:
- Class 1 → Rock
- Class 2 → Paper
- Class 3 → Scissors
Step 2 — Collect Training Data
This is the most important step. Your model can only learn from examples you give it. Follow these guidelines carefully.
For each class (Rock, Paper, Scissors):
- Click Webcam under the class name.
- Hold your hand sign in front of the camera.
- Hold down the Hold to Record button and collect at least 50 samples per class.
- While recording, slowly rotate your hand, move it slightly left and right, and vary the distance from the camera.
- Try recording some samples with your hand lower in the frame and some higher.
Why vary the examples? If every Rock sample shows your fist in the exact center of the frame at the exact same distance, the model may only recognize Rock when those conditions are met. Variation teaches the model what Rock looks like in general, not just in one specific situation.
Step 3 — Train Your Model
Click Train Model. Teachable Machine will process all your samples and train a classifier.
While you wait (it takes 30–60 seconds), think about what is happening:
- The computer is analyzing patterns in every photo — shapes, edges, colors, positions.
- It is learning rules like “when I see a rounded shape with fingers folded over, that tends to be Rock.”
- It did not need a programmer to write those rules. It figured them out from your examples.
When training finishes, the Preview panel on the right will activate.
Step 4 — Test Your Model
Hold your hand signs up to the camera one at a time and observe the confidence scores.
Answer these questions in your notebook as you test:
- Which hand sign does your model recognize most reliably? Why do you think that is?
- Try showing your hand at an unusual angle — one you did not use during training. What happens to the confidence score?
- Have a neighbor try your model with their hand. Does it still work? What does this tell you about your training data?
- What would you need to do to make the model work for a wider range of people?
Step 5 — Improve Your Model (If Time Allows)
If your model is struggling with one class, do not start over. Instead:
- Click Edit on the underperforming class.
- Add more samples — especially in the positions and angles where the model is struggling.
- Click Train Model again.
This is the real-world machine learning workflow: collect → train → test → improve.
Closing
Let’s connect what you did today to the bigger picture.
You just did what data scientists and machine learning engineers do — you:
- Defined a problem (classify hand signs).
- Collected labeled training data.
- Trained a model.
- Evaluated its performance.
- Identified where it failed and thought about how to fix it.
Every AI system you interact with — your phone’s face unlock, spam filters in email, the “For You” page on social media — was built with this same loop.
Think-pair-share with a neighbor or write in your notebook:
- What was the most surprising thing that happened when you tested your model?
- Go back to the warmup questions. Were your predictions correct?
- What is one ethical concern you can think of with image recognition AI? (Think about bias in training data.)
Standards
- MS-CS-FCP.3.2 — Develop a working vocabulary of computational thinking including data, data collection, data analysis, and automation — students build and apply vocabulary around training data, classes, confidence scores, and the training process throughout the lesson.
- MS-CS-FCP.3.3 — Analyze the problem-solving process and how computers help humans solve problems — students directly observe the input-process-output model: webcam images (input) → training algorithm (process) → classifier predictions (output).
- MS-CS-FCP.3.4 — Develop an algorithm to decompose a problem of a daily task — students decompose the recognition problem into discrete classes and articulate how a classifier uses learned patterns to make decisions.
- MS-CS-FCP.4.2 — Utilize the design process to brainstorm, implement, test, and revise an idea — students follow the full design loop: collect data, train, evaluate, and improve the model based on test results.
- MS-CS-FCP.6.1 — Summarize ethical, privacy, and legal issues of a digital world using current case studies — the closing reflection prompts students to consider bias in training data and the real-world implications of image recognition systems.