ReadyAI – Elementary School – Grades 4-6

Unit 3: Peekaboo AI

Essential Question

How Does Facial Recognition Work?


In the previous lesson, students received a brief orientation to how facial recognition works, but students spent the majority of their time testing two AI-powered games and designing their own imitations of them. In this lesson, students will gain a deeper understanding of how facial recognition works and design coding that uses the principles of “Peekaboo” to demonstrate their mastery over the concepts.



Oral Responses

  • Students may be evaluated based on participation or presentation.

Written Responses

  • Students may be evaluated using the complete the summative mastery quiz.


Students will be able to

  • Identify coding necessary to code peekaboo.
  • Build a scenario where peekaboo may be applicable.
  • Create coding that programs Cozmo to play peekaboo as both the player and the recipient.

Tools and Materials

  • a tablet, laptop, or phone (2-3 students per device)
  • Projector linked to device with Cozmo app or to a computer to share the PowerPoint Presentation
  • Pencils (1 per student)
  • Whiteboard or large sheets of paper (to be saved for future classes)
  • PowerPoint 3
  • Handouts 3.1 – 3.3
  • Teacher Resources 3.1

Connecting to Prior Knowledge

  • Where is Facial Recognition Important?

If you have any question about the lesson plan, please contact

Teaching Guide

Warm-up (5 minutes)

Teacher begins class by sharing selected moments from the following video:

Teacher asks students to think of reasons why “Peekaboo” is a game many infants and toddlers enjoy. Possible answers include

  • Lack of object permanence means they see new things
  • Surprise element builds expectation
  • Loving mother/father/family friend playing with child
  • Tone of voice elicits positive reaction

Teacher may follow up this question with, “How do children know the person is playing a game? Possible answers include

  • Tone of voice is non-threatening
  • Recognition of family friend
  • Physical contact after surprise

Teacher asks if AI units can demonstrate a similar sort of intelligence?

Teacher resources:

PowerPoint 3

Check for understanding:

What does the game “Peekaboo” show?


Can your AI unit demonstrate a similar level of intelligence?

Teacher Presentation (15 minutes)

Teacher begins by asking how AI facial recognition works. From the previous lesson, students should remember some of the following:

  • Location of eyes
  • Location of mouth
  • Shape of mouth
  • Shape of eyes
  • Shape of eyebrows

Teacher asks, “But how does the AI unit even know what an eye, an eyebrow, or a mouth is?”

Teacher may share the following brief video:

Teacher may then ask, what did you learn? Teacher may demonstrate using fictitious numbers: “Let’s say my eyes are three inches apart. How does the AI know me from any other person who has eyes the same distance? Or, how it does tell me from a drawing of a person with eyes three inches apart?”

Teacher explains how AI systems have been trained on millions of images so as to recognize humans from bananas or cars or anything else. Teacher may use the following videos as he or she determines are appropriate:

Optional Materials

Teacher may also introduce the following software to students via the Projector or in additional time in the Guided Practice area: Google QuickDraw. If students have devices, they may be invited to play. Teacher should note that while the app is guessing, it is also adding the students’ image to its database and “learning” what the item drawn looks like to other people.

Teacher concludes presentation with, “Let’s see these complex ideas demonstrated in a very simple program.”

Teacher resources:

See Teacher Resource 3.1 for a more comprehensive overview of computer vision and how machine learning takes place.

Check for understanding:

How do AI units use their ability to “see”?


Let’s see these complex ideas demonstrated in a very simple program.

Guided Practice (15 minutes)

Teacher distributes AI units and controlling devices. Teacher asks students to open “Peekaboo” game in the Cozmo App.

Teacher encourages students to play with the app. Each student should try the game with the AI unit. Students should also be asked to test what works and what does not work in the app. To assist, students can use Handout 3.1. Handout 3.1 also prompts students to try faces people and other objects for students to test what triggers the AI unit to react.

After groups have had ample time to play with the unit and test the limitations of the peekaboo game, the teacher may review the following guiding questions found on Handout 3.1:

  • What triggered the AI unit to play the game?
    • Generally, faces, live or printed
  • What conclusions can you draw?
    • The AI unit cannot differentiate between live people and printed pictures
  • What did the AI unit not recognize?
    • Generally, anything that was not a human face does not work.
  • What conclusions can you draw?
    • The AI unit has not been trained to recognize these objects.
  • (Question not on 3.1) What would happen if you were to train the AI unit to react to a pet?
    • Nothing, unless the AI unit had already been trained to recognize pets, which Cozmo’s “Explore” function demonstrates has been done. This feature, however, has not been tied to the peekaboo game.
  • (Question not on 3.1) What have you learned? How does machine learning and computer vision work?
    • AI units must be trained on thousands of images to recognize patterns. The students’ AI units have been trained on recognizing various and diverse human faces.

Teacher concludes Guided Practice with, “How might this particular skill–responding when it sees human faces–be useful?”

Optional Resources:

Teacher may use the following video to highlight limitations of facial recognition:

Teacher resources:

Handout 3.1 provides students a checklist of what they can try doing with the Peekaboo game. It also contains questions for students to document limitations in order to bein understanding what goes into facial recognition (i.e. thousands, even millions, of images ‘creating’ a baseline for recognition).

Check for understanding:

How does machine learning work?


How might this particular skill–responding when it sees human faces–be useful?

Student Production (20 minutes)

Teacher announces that students will now design a scenario where their AI unit waits until it sees a human face in order to react. Students should

  1. imagine a scenario where this is necessary
  2. produce the coding needed to accomplish this task
  3. dramatize the scenario and share it with the class.

As the students work, the teacher may prompt students to use Constructor Mode instead of the basic Code Lab feature as this provides greater tools to create this code. Such features may include emotions the AI unit may demonstrate as well as faces or facial features. Students may also demonstrate their AI units not responding to other items or objects, such as pencils, notebooks, and so forth.

After approximately 10 minutes, the teacher may ask the students to share their ideas and their coding, even dramatizing the scenario if time permits.

Teacher resources:

Handout 3.2 provides students an opportunity to document their idea as well as the coding necessary. This may be used for a formative assignment grade if the teacher so chooses.

Check for understanding:

How did you use the machine learning already in your AI unit?


Teacher asks, “Where in the world would AI need to differentiate between people and objects?”

Closure (5 minutes)

Teacher gathers students’ comments on where and when AI needs to tell people from other objects.

Teacher asks students to assist in putting away AI units.

Check for understanding:

Have students share their thoughts. Teacher may also assign the summative assessment if he or she chooses (See Handout 3.3, and Answer Key).