Skip Navigation

Learn Like a Computer

By Bilal Qadar 30 minutes
Level
For Everyone
Subjects
Science and Technology,
Mathematics,
Other
components
  • Programming
  • Computing and Networks
  • Data
  • Technology and Society
Tools & Languages
Unplugged

Key Coding Concepts

  • Algorithms

Terminology

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, learners will explore how machine learning algorithms work, and their uses in day-to-day life!

Created in partnership with:
Amazon future Engineer logo

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 learners into a circle, about 10 people each.

Choose 1 learner to be the picnic organizer. Have this learner 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 learner at a time. Each learner says “Can I bring _____ on your picnic?”. The picnic organizer should respond with “yes” or “no”. The game should continue until all learners have discovered the rule. Remind learners who have discovered the rule that they shouldn’t reveal it.

Reflection

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 learners. 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)

Additionally you can show learners this short video: AI 101 What is Machine Learning.

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 learner who will be the 'machine' that will learn. Ask the learner to cover their eyes while the other learners hide the object.

Once the object is hidden, the ‘machine’ will open their eyes and will start searching for the hidden item. The other learners 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 learner finds the hidden object.

If remote: Open this Scratch project by Michele Albach.

Press the green flag, and then hit the spacebar with your eyes closed. Dot the dog will reveal themselves to the learners, but you won't know where they are hiding because your eyes are closed! Then, find Dot as the learners guide you by saying 'colder' when you are further away or 'hotter' when you move closer to Dot's hiding place. Click on a spot to "check" it. If you've found Dot, they will appear! Press the right arrow to go to the next level. 

Reflection

Ask: How did the learner 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? (A: 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!

Technology and Society:

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 learners partner up! Learners 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.) Learners 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).

Learners should write a one page reflection about how their new technology could help people in their day-to-day lives!

Machine Learning Reflection Worksheet
Simplified Reflection Worksheet
Editable Google Doc

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

Practice training a computer using the Teachable Machine

Computing and Networks

Learners can research careers in AI, machine learning and data science, to see what opportunities are out there, and the different pathways that could lead to a career in ML. (Learners in grades 7 and 8 have access to a program called MY Blueprint which allows them to research careers and post secondary course offerings.) For example, Anjeliki and her path to becoming a Senior Speech Scientist for Alexa.

AI 101: What is Machine Learning? (Accenture)
https://www.youtube.com/watch?v=JS4AHSlYm0I&feature=youtu.be

AI keeps Amazon warehouses humming (Amazon News)
https://www.youtube.com/watch?v=B2Humr181Qw&feature=youtu.be

AlphaGo Movie
https://www.alphagomovie.com/

Google’s Teachable Machine
https://teachablemachine.withgoogle.com/

Amazon Pioneers
https://www.amazon.jobs/en/pioneers/angeliki-m

Number Recognition AI (Scratch Project) by noahjb:
https://scratch.mit.edu/projects/290786070/

AI teaches itself to walk without any human help (video) by Science Museum:
https://www.youtube.com/watch?v=imOt8ST4Ejc

Teach lessons that are tied to your existing curriculum! https://bit.ly/CLClessons

r

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 ➝

    Programming

    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.

    Data

    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.

    Design

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