Skip Navigation

Learn Like a Computer

By Bilal Qadar 30 minutes
Level For Everyone
Subjects Science and Technology, Other
  • Programming
  • Data
Tools & Languages Unplugged
Key Coding Concepts
  • Algorithms

Machine learning (ML) provides the ability for a machine or program to learn and improve itself using data rather than written instructions.

Artificial Intelligence (AI) is an area of computer science that creates intelligent machines that act and work like humans.

Algorithms are step-by-step sets of operations to be performed to help solve a problem.

Neural Network is a computer system, modelled after the human brain.

Want to help kids understand the magic of machine learning? In this lesson students will learn how machine learning algorithms work, and their uses in day-to-day life!

Created in partnership with:
Amazon future Engineer logo

Ensure there is enough space in the classroom for students to move around.


Watch a run-through and tutorial of our unplugged "Learn Like a Computer" lesson plan:

Activity #1: Let’s Go on a Picnic

We are going to play a game! We are going to learn what we can and cannot take on a picnic.

Arrange students into a circle, about 10 people each.

Choose 1 student to be the picnic organizer. Have this student choose a rule that all objects being brought on the picnic must follow. An example rule could be that the object must be yellow. Make sure no one else in the circle knows what the rule is!

The trainer should return to the circle and start by saying “I am bringing ____ on my picnic.” The blank should be filled by an object that follows the rule they created. Go around the circle, one student at a time. Each student says “Can I bring _____ on your picnic?”. The picnic organizer should respond with “yes” or “no”. The game should continue until all students have discovered the rule. Remind students who have discovered the rule that they shouldn’t reveal it.


Let’s talk a little bit about learning!
Ask: What are some ways you like to learn?
Computers also have a favourite method of learning too: it’s trial and error! Computers love to learn from their mistakes!

Draw a number on a board or piece of paper and show students. Ask: What number is this? Follow up by asking how do you know that? (A: Because you have seen this number a thousand times).

Ask: Who has heard the term machine learning or artificial intelligence?

Ask: What is machine learning? (A: See terminology)

The process of learning based on data and human feedback is called supervised learning.

Ask: How did you make your first guess? (A: It was random!) Machine learning algorithms do the same thing, their initial guesses are completely random. This is because they don’t have enough information to make an educated guess.

Ask: What patterns were you looking for when deciding what to bring on the picnic? (A: Noticing a trend in the items that were allowed on the picnic). It was almost like connecting the dots, after you made enough connections in your head you could figure out the theme. This is exactly how machine learning algorithms such as neural network learns.

Supervised learning is the process of an algorithm learning by seeing many examples (data). The algorithm then looks for patterns in the data to learn about what it is seeing.

Activity #2: Hot or Cold?

In this next game, we are going to experience how machines learn to find the best solutions to problems.

Ask: In what ways are we seeing machines working to find ways to solve today's problems?

Select an object from the classroom and a student who will be the 'machine' that will learn. Ask the student to cover their eyes while the other students hide the object.

Once the object is hidden, the ‘machine’ will open their eyes and will start searching for the hidden item. The other students will guide the ‘machine’ by saying 'colder' when they move farther or 'hotter' when they move closer to the hidden object. The game ends when the student finds the hidden object.


Ask: How did the student start the search?

Initially, we can start randomly if we have little idea about where the object is, but after several games, we probably have already some intuition where to search first. Computers learn very similarly; if they are unfamiliar with the environment they will initially just guess. However, if they have seen the same room before, they may have better guesses and find the object much faster! Playing the game many times in different rooms will help computers solve this problem faster and faster. This type of learning is very typical for example with robots that need to navigate and act in real environments.

Ask: How did our ‘machine’ find the object? (by following our hints of getting ‘warmer’ or closer)
Ask: When we told them that they were ‘cold,’ why didn’t they keep looking in that area?

Notice that once a direction gets too much 'cold', the player will rule out that part of the room and will not go back. This means that the part of the room they need to search gets smaller and smaller. Over time, it will become so small that the player will eventually find the object.

This game is an example of how a machine can learn from feedback based on its actions. This is called reinforcement learning, which is very similar to how we train our pets; we reward them when they perform well so they become better behaved over time. In this game, we gave hints and encouragement as a ‘reward’ until our ‘machine’ found the hidden object.

Reinforcement learning differs from supervised learning, because reinforcement learning interacts with the environment and not with existing data. Reinforcement learning focuses on maximizing the possible reward!

To learn how Amazon uses artificial intelligence and machine learning to deliver packages to its customers, watch this video (!

Learning Outcomes:
I can explain how computers learn using machine learning.
I can explain the general idea behind supervised learning.
I can explain the general idea behind reinforcement learning.
I can learn programming concepts without a computer.

Assessment Ideas:

Have students partner up! Students should think of one way ML/AI could help them in their daily lives (ie. making a toaster that learns how not to burn bread.) Students should think about the data they would need to train their ML algorithm or AI and which type of learning would fit their idea best (supervised or reinforced). Students should write a one page reflection about how their new technology could help people in their day-to-day lives!

Learn about AlphaGo the machine learning algorithm that changed the game of Go:

Practice training a computer using the Teachable Machine:

Research careers in machine learning to see what opportunities are out there, and the different pathways that could lead to a career in ML. For example, Anjeliki and her path to becoming a Senior Speech Scientist for Alexa:

Automation, Computer technology, Trial and error, Problem-solving, Networks.

Number Recognition AI (Scratch Project) by noahjb:

AI teaches itself to walk without any human help (video) by Science Museum:

Robot image by Alex Knight from

Teach lessons that are tied to your existing curriculum!


More Lesson Plans For For Everyone

View All Lesson Plans

Explore lessons based on components

The K-12 Computer Science Framework

Although learning how to build digital projects is a key part of Computer Science education, students should also learn a wider set of skills and competencies that will help them to harness the power of digital technologies as both creators and consumers. A comprehensive approach to K-12 Computer Science education includes learning about the following five focus areas:

View Framework ➝


By the end of high school, students should be able to create a simple computer program.

Computing and Networks

By the end of high school, students should understand and be able to use the tools and devices commonly used to build digital projects.


By the end of high school, students should be able to explain how we use computers to create, store, organize, and analyze data.

Technology and Society

By the end of high school, students should be able to explore the ways in which technology and society have mutually shaped each other.


By the end of high school, students should be able to apply design principles to the digital projects they create.