Machine Learning Unplugged
Duration: 45 minutes
Grade Levels: 4-12
Who says you need a computer to learn about artificial intelligence? In this unplugged activity, take the role of a wildlife conservationist who uses data to refine and test a machine learning algorithm.
Grade Levels: 4-12
Duration: 45 minutes
Concepts/Skills: Machine learning, algorithms, categorizing and identifying, training data, testing data, artificial intelligence
Objectives:
- Explore algorithms by categorizing organisms based on a set of rules.
- Gain an understanding of the basics of what machine learning is and how it can be used to identify animals.
Background Information
Artificial Intelligence (AI) most often refers to a device or program designed to mimic aspects of human intelligence to complete complex tasks and make decisions. AI is also used for:
- visual recognition (facial recognition, visual image search).
- speech recognition (used in software like Siri and a virtual assistant like Amazon's Alexa).
- machine translation (i.e., Google Translate).
Machine learning (ML) is a branch of AI where the goal is to create a program that improves over time or “learns” as it processes more data.
Engineers provide training data (e.g., numbers, photos, text) which the AI uses as the basis for an algorithm: the set of rules for making classifications or predictions. Engineers could then provide more data, rules, or both to test or adjust the algorithm to ensure that it is performing accurately. Some examples of machine learning are self-driving cars and recommendation systems, like you might see while using Netflix or shopping on Amazon.
AI, Bees, and Computer Science
For an example of AI, see this article about some researchers at Monash University in Australia.They developed an AI system to track bees and other pollinators. In addition to identifying the insects they were able to see where they flew between plants. This machine learning model can help farmers monitor their plants and decide if they to attract more pollinators.
- AI can track bees on camera, here’s how that will help farmers The Conversation by Malika Nisal Ratnayake, Adrian Dyer, Alan Dorin, February 15, 2023
For more resources on AI, see thetech.org/ai
Preparation
- Print the Data Set Cards (1 set per group).
- Note: Set aside the Part 2 cards for distribution later in the activity.
- Plan to have learners work in groups of 3-4.
- Try the activity with other educators or kids you know. This will give you practice with the materials to be able to anticipate student questions.
- Note: Review the Answer Key if needed.
Outline
Part 1: Machine Learning Scenario |
20 min total |
Introduction |
5 min |
Test the AI Program |
10 min |
Debrief |
5 min |
Part 2: Revise and Improve |
25 min total |
Iterate |
10 min |
Test the AI Program |
10 min |
Debrief |
5 min |
Lesson Directions
Part 1: Machine Learning Scenario
Introduction (5 min)
- Provide students with a basic introduction to artificial intelligence (AI) and machine learning (ML). Use the Background Information above and discussion questions below:
- What comes to mind when you think of AI?
- When do you see AI being used?
- What do you think of when you hear the words "machine learning”?
- Introduce the scenario.
Design Scenario |
U.S. Fish and Wildlife Services (FWS) needs your help! Wildlife conservationists work hard to protect animals and their habitats. Counting and tracking animals helps them understand the population levels of a species. FSW uses photos and video recordings to track animals, but sorting and identifying those images can take a long time. AI and machine learning can be used to identify and track animals more quickly and efficiently than human eyes can. Your job is to test and train a new AI model to correctly identify images of different animals to help FWS with their conservation work. |
3. Divide students into groups of 3-4. Let them know that you will give them:
- A set of images (testing data) of animals they are monitoring.
- An algorithm (set of rules) created by the AI to categorize the animal.
These data will help test how well the AI model can identify the animal.
- Their job as humans will be to test the algorithm and sort the images into two categories, A or B.
Algorithm: Step-by-step instructions to solve a problem. When solving a problem, it is important to create a plan for your solution.
Real-world examples of algorithms:
- Recipes
- Instructions for making furniture
- Plays in sports
- Directions for building blocks sets
- Directions to a place on a map
Note: Classical algorithms are written by people (usually programmers) and use the traditional step-by-step approach.
Machine learning (ML) algorithms are created by a computer based on the data provided. Essentially, ML creates its own rules based on the data.
Test the AI Program (10 min)
- Have learners test the algorithm that the AI program created.
- Distribute the Data Set Cards for Part 1 to each group.
- Give them 5 minutes to sort the cards for Part 1 based on the rules from the Algorithm (see below).
- Define any words that students may not understand or provide them with synonyms.
- Remember that those are the only rules that the AI program understands, so students cannot use their existing knowledge of the species.
- The algorithm may be imperfect or lead to errors. Remind students that they should notice them rather than correct them.
Category A | Category B | |
Wings | wing is colorful | wing is dull |
Body | thin | plump |
4. When time is up, have groups share the images they added to each category.
- See if they can identify the two species which are being categorized.
- Refer to the Answer Key for more information. Remind students that their goal was to test the AI model, not themselves.
Examples of sorted cards:
Debrief (10 min)
- Lead a discussion which considers some of the following questions:
- How did you decide if the image belonged to Category A or B?
- How many images were categorized correctly based on the AI algorithm?
- How helpful was the AI’s algorithm? If you could modify the algorithm, what would you change or add?
- What is the difference between how people see and how AI/machines “see”?
Part 2: Revise and Improve
Iterate (10 min)
- Reassure the students that it would have been unlikely that they would have been able to categorize all of the animals correctly based on the algorithm provided.
- Introduce them to the new scenario:
Design Scenario The FWS has a new set of data to test with the AI. However, before testing they have asked that you try to improve the algorithm so that it will be more accurate.
Your job is to develop a revised set of rules (algorithm) which will lead to more accurate and reliable results. Then, test that the AI can correctly identify a new set of data.
- Students can base their revisions on the algorithm and images provided in Part 1.
- They should check first that their new algorithm helps the AI correctly categorize the data set from Part 1 before testing it on a new set of images.
Beginning Programmers
If students need additional support adjusting the algorithm, the following is a revised set of rules that can be provided:
Revised Algorithm
Category A | Category B | |
Wings |
|
|
Body |
|
|
Antennae |
|
|
Test the AI Program (10 min)
- Let the groups know that they will now be provided with a new testing data set (Part 2) to test the revised algorithm.
- Try one of the following options:
- Teacher Testing: Model the testing process with an algorithm that is likely to make mistakes. Demonstrate how to follow the algorithm during testing despite this. Give students a few minutes to adjust their algorithms again before having them test out their algorithm with the new data.
- Peer-to-Peer Testing: Have groups exchange algorithms and test each other’s rules. Encourage them to share their results with each other and note the mistakes that the AI systems made.
- Special Guests: Invite special guests to visit the class and help test out the algorithms. Guests could include people from the school (another class, teachers, or principal), volunteers from a local business or even professionals who work with AI. Pair guests up with one or more groups to test the algorithms.
- Once students understand the process, distribute the Data Set Cards for both Parts 1 and 2.
- Give them about 5 minutes to sort the Data Set Cards for Part 2 based on the rules from the algorithm.
- Remind groups that those are the only rules that the AI program understands.
- Note: It is recommended that the images be categorized with the closest match to the written algorithms even if it’s a mistake. This provides an opportunity for students to see the types of mistakes AI systems can make based on algorithms.
- Remind students that their goal is to test the AI, not themselves.
- When time is up, have groups share the images they added to each category.
- Have them discuss how they considered the new species which were introduced.
- Refer to the Answer Key for more information.
Examples of sorted cards:
Beginning Programmers
Learners may notice that the new testing data set has expanded to include additional species which do not fit either category. This highlights how an AI needs to be given additional training data in order to consider information that does not fit within the rules created from the initial data set. Machine learning requires the AI to “learn” from these additional data and once again revise its algorithm.
Some learners may have a hard time forgetting their own biases and existing knowledge. For example, they may already know that a peacock is not the same as a butterfly. Encourage them to pretend that they haven’t learned the names of any of these animals yet. They have to pretend that all they know is what is listed in the algorithm.
Advanced Programmers
The data set in Part 2 contains other animals such as a dragonfly and a peacock. It’s important to note that AI systems will still categorize those animals according to the algorithms. However, the system usually has a confidence level to which it believes to be accurate. In the situation of the dragonfly and peacock, that confidence level may be very low in comparison to the other images.
You can learn about confidence levels by using Teachable Machine and having students train a computer to recognize images. Once the computer has been trained it will make a prediction on what it thinks the image is and it will provide the confidence level to which it believes to be accurate.
Debrief (5 min)
- Lead a short debrief of the activity and the concepts. Help students make connections between the skills they used in this activity, the work of computer scientists, and real world applications of AI and ML.
- Remind students computer scientists need to find the data they want to use to train a ML model and then test that model.
- Example: Security cameras that use AI to recognize objects have large data sets that computer scientists provide the model so that they can test and “see” if it’s a person, animal, or another object.
- During the activity, students practiced this themselves by using training and testing data and revising an algorithm based on previous data.
- Remind students computer scientists need to find the data they want to use to train a ML model and then test that model.
- Possible Debrief Questions include:
- How did your algorithm determine if the image was under Category A or B?
- How many images were categorized correctly based on the new algorithm?
- Compare and contrast the algorithms you used for both data sets.
- How detailed does an algorithm (set of rules) need to be to increase accuracy?
- When training AI models, what is important to keep in mind?
Tips
- Try to guide students in understanding that the wider the range of training data the model was built with, the better the algorithm will be in predicting. Testing data is used to assess the algorithm for accuracy, similar to the process students used in Part 1 and 2.
It is important to understand that AI models can be biased if they do not include a wide range of training data.
- This means that there needs to be a large amount of data and a lot of variety in that data.
- Example: Students may notice that testing data which showed different angles of a species were more difficult to identify correctly using the algorithm in Part 1.
- If the training data of a species is made up of images from many different angles but the total amount of images is small, then the AI will have trouble learning that the different images are all the same species.
- In contrast, if the data is only made up of images from the same angle, then the AI may assume that species
is present more often than it actually is while also failing to identify the species from other angles. The AI has learned to identify the species very well but only from one angle because it was taught with a large data set with limited variation.
Encourage students to ask questions about the data they encounter and consider what they notice and wonder about how it is used.
Standards Connections
CSTA Computer Science Standards | ||
Grade | Standard | Description |
3-5 | 1B-DA-06 |
Organize and present collected data visually to highlight relationships and support a claim. |
3-5 | 1B-AP-08 | Compare and refine multiple algorithms for the same task and determine which is the most appropriate. |
3-5 | 1B-AP-15 | Test and debug (identify and fix errors) a program or algorithm to ensure it runs as intended. |
6-8 | 2-DA-08 | Collect data using computational tools and transform the data to make it more useful and reliable. |
6-8 | 2-AP-17 | Systematically test and refine programs using a range of test cases. |
9-10 | 3A-DA-12 | Create computational models that represent the relationships among different elements of data collected from a phenomenon or process. |
9-10 |
3A-IC-25 | Test and refine computational artifacts to reduce bias and equity deficits. |
11-12 | 3B-AP-08 | Describe how artificial intelligence drives many software and physical systems. |
11-12 | 3B-AP-10 | Use and adapt classic algorithms to solve computational problems. |
11-12 |
3B-AP-11 | Evaluate algorithms in terms of their efficiency, correctness, and clarity. |
Vocabulary
Term | Definition |
algorithm |
Step-by-step instructions to solve a problem. |
artificial intelligence (AI) |
most often refers to a device or program designed to mimic aspects of human intelligence to complete complex tasks and make decisions. |
data |
Information that can be collected, analyzed, and used to inform decisions. |
data set | A collection of data |
machine learning (ML) | A branch of AI where the goal is to create a program that improves over time or “learns” as it processes more data. |

More AI Activities
The fun doesn’t stop here! AI models can be trained to identify more than just two different types of animals. Apply this process and train a model to identify other animals such as birds, dogs, horses, etc.
Check out our other artificial intelligence activities to apply critical thinking to other AI models.

Visiting The Tech Interactive
Want to see artificial intelligence in action? Check out our Animaker exhibition.
Animaker uses machine learning, 3D scanning, and visual recognition to identify the animals you show it.