Hands-on Activity Learn to Throw, Throw to Learn:
A Machine Learning Journey

Quick Look

Grade Level: 8 (7-9)

Time Required: 1 hours 15 minutes

(One or two 50-minute sessions)

Expendable Cost/Group: US $0.00

Group Size: 3

Activity Dependency: None

Subject Areas: Computer Science, Science and Technology

NGSS Performance Expectations:

NGSS Three Dimensional Triangle
HS-ETS1-2
MS-ETS1-4

A Black female student in a classroom, wearing a blindfold, facing the camera and holding a white ball in her hands. Other students in the background are throwing white balls.
An AI-generated student holding a ball while blindfolded.
copyright
Copyright © Produced by the activity author prompting clipdrop.co using the StableDiffusion XL 0.9 model, at https://clipdrop.co/stable-diffusion Prompt: African American female high school student standing up in a classroom holding a small white ping pong ball in her hand, blindfolded, smiling. Computer generated style, high detail, stylish conservative clothing.

Summary

Students embark on an interactive journey through the Engineering Design Process (EDP) to develop, test, and refine a system aimed at enhancing the accuracy of a ball thrown or flicked toward a small target. This hands-on activity serves as an analogy to the process of training machine learning systems, providing students with a tangible understanding of how these systems utilize data and feedback mechanisms to improve performance. Students are also taken from a type of learning they are more familiar with, including visual feedback for the learner, toward an increasingly more abstract method of learning that only involves numeric inputs and outputs.
This engineering curriculum aligns to Next Generation Science Standards (NGSS).

Engineering Connection

Computer scientists training machine learning models usually begin with clear, human-legible objectives that must be translated into quantifiable inputs and outputs. The students' journey through this activity also parallels the journey of many machine learning models from initial training on clear, understandable data to eventual operation in a more abstract space. Employing elements of the Engineering Design Process in this activity also provides students with many examples of both iterative learning and iterative design. The concepts of repetition, small adjustments after feedback, and refinement mirror similar processes in machine learning systems, which train and test with large amounts of data in order to improve.

Learning Objectives

After this activity, students should be able to:

  • Create a system for learning a simple physical skill.
  • Use reasoning to train a system that only utilizes numeric inputs and outputs.
  • Use abstraction to remove the performance of a physical task from inputs and outputs to that task.

Educational Standards

Each TeachEngineering lesson or activity is correlated to one or more K-12 science, technology, engineering or math (STEM) educational standards.

All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN), a project of D2L (www.achievementstandards.org).

In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics; within type by subtype, then by grade, etc.

NGSS Performance Expectation

HS-ETS1-2. Design a solution to a complex real-world problem by breaking it down into smaller, more manageable problems that can be solved through engineering. (Grades 9 - 12)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Design a solution to a complex real-world problem, based on scientific knowledge, student-generated sources of evidence, prioritized criteria, and tradeoff considerations.

Alignment agreement:

Criteria may need to be broken down into simpler ones that can be approached systematically, and decisions about the priority of certain criteria over others (trade-offs) may be needed.

Alignment agreement:

NGSS Performance Expectation

MS-ETS1-4. Develop a model to generate data for iterative testing and modification of a proposed object, tool, or process such that an optimal design can be achieved. (Grades 6 - 8)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Develop a model to generate data to test ideas about designed systems, including those representing inputs and outputs.

Alignment agreement:

Models of all kinds are important for testing solutions.

Alignment agreement:

The iterative process of testing the most promising solutions and modifying what is proposed on the basis of the test results leads to greater refinement and ultimately to an optimal solution.

Alignment agreement:

Suggest an alignment not listed above

Materials List

Each group needs:

  • 1 or 2 ping pong balls (or other lightweight ball)
  • masking tape (to mark the ground)
  • 1 Student Worksheet for each group member

For the entire class to share:

  • a curtain to hide someone launching a ball in the second-to-last round, or a separate space such as a hallway, where the last round can take place unobserved by the class
  • a whiteboard with marker or projector or other large screen connected to a computer, on which to record input and output values for the final round

Worksheets and Attachments

Visit [www.teachengineering.org/activities/view/mis-2822-machine-learning-interactive-journey-activity] to print or download.

Pre-Req Knowledge

Students should be able to measure distance using meter sticks, rulers, or other measuring devices.

Students should also have a working knowledge of angle measurements.

Introduction/Motivation

Envision a high-stakes basketball game. The point guard dribbles down the court, spots an open teammate, and executes a flawless pass. That pass is not random; it's a calculated decision based on years of practice and an understanding of the players' positions, speeds, and strategies. It's a real-time prediction and decision-making process that is strikingly similar to the workings of machine learning.

(Ask students to suggest examples of computer systems that make predictions, or that they associate with “artificial intelligence.”) Machine learning is a branch of artificial intelligence (AI) that enables software applications to learn from data and make accurate predictions. It's the mechanism behind spam filters in your email, personalized movie recommendations on streaming platforms, and even fraud detection systems in banking apps. Machine learning algorithms analyze patterns in historical data to make these insightful predictions.

In today's activity, we'll dive into machine learning in a fun and interactive context: predicting and improving the ability to throw a ball precisely. Just like a point guard who learns to anticipate the best pass, machine learning models learn from data to predict the distance a ball will be thrown. Today, that same capability of making predictions is shown in marvelous new ways as well. AI is now evolving algorithms that can generate new content, such as writing an article, composing music, or even creating artwork. These systems don't just analyze patterns; they learn to replicate and innovate, much like a human creator.

As we delve into this activity, consider this: We're living in an era where AI isn't just assisting us but is also creating alongside us. So, think about the future possibilities of machine learning and AI. As we learn to predict the flight of a ball, we're also getting a glimpse into a future where AI could become our co-creator. Exciting, isn't it?

Procedure

Background

There is a long engineering tradition of “reverse engineering,” trying to take apart someone else’s machine or system to understand its inner workings and create one’s own duplicate version. Though students may initially believe that this is what they are doing in the activity, reverse engineering is not how most machine learning systems operate today. Instead of creating a set of formalized rules and processes that reliably and exactly replicate the structure of an original design or process, machine learning systems use data to find patterns. By applying their own set of processes internally, machine learning models may be able to produce similar results when given similar inputs as the processes and systems they are replicating. In “black box” situations, sometimes the inner workings of the original process are never revealed and yet the machine learning model is able to replicate the inputs and outputs reliably. This is how machine learning models can categorize images, recommend products and videos to humans, and even generate output in forms such as text, audio, and video that humans could also produce.

Before the Activity

  • Gather materials and make enough copies of the Student Worksheet to give each student a copy.
  • Prepare a demonstration area by placing some tape on the ground as a mark to stand on, and an X about 2-3 meters away representing a target.
  • Prepare an area where a student can launch a ball for the Reverse Engineering round unobserved, or alternately conduct that round in advance and provide a table of data.

During the Activity

Round 0 - Whole class introduction

  1. Read through the Introduction and Motivation section.
  2. Give each student a copy of the Student Worksheet. The worksheet will guide students through the EDP as they do the activity.
  3. Ask students to complete Step 1 (Ask) on the Student Worksheet and share their answers with each other. Student prompt: What problems can be solved by teaching a machine how to do something that humans are also good at?
  4. Ask students to complete Step 2 (Research) on the Student Worksheet and again share with each other. Student prompt: What are some systems that exist right now that allow computers to learn from humans or the world around them in order to solve problems? What information do these systems use to learn from? What problems do these systems solve? (Potential answers: As of 2023, the list will probably include generative chatbots such as ChatGPT, the image generation product Midjourney, and other generative systems. Suggest that there are hundreds or thousands more systems that fall under the same umbrella of “machine learning,” such as recommendation systems from YouTube, Netflix, and Amazon, machine translation systems from Google and others, and voice recognition and personal assistant technologies such as Siri and Alexa.)
  5. Demonstrate holding a ping pong ball in one hand and then, with one finger of the other hand, flicking the ball to launch it at a marked spot on the ground. Hint: Try to miss the marked spot by an obvious distance!
  6. Ask students whether the ball landed on the target (Answer: no), and what other data might be useful to know how accurate someone is at trying to get the ball to land on the target.
  7. Ask students whether it matters to someone learning to launch a ball accurately whether the distance represents landing short (before the target) or long (after the target). Suggest using negative numbers vs. positive numbers to categorize error direction, as well as magnitude.
  8. Divide students into small groups of 2-4 to prepare for further rounds.

Round 1 - Design and test a learning process

  1. Ask students in groups to complete Step 3 (Imagine) of the Student Worksheet. Remind students that this is a brainstorming activity and that many different responses are welcome. This is a brainstorming phase, so only give students 2-3 minutes. Student prompt: Your group is going to work together to help someone improve their ability to hit a target by flicking a ball. A designated learner will respond to feedback from the team and try repeated flicks, with the goal of getting closer to the target on average. Brainstorm with your group about what data the group should collect and what kinds of feedback the learner should receive. Write lots of ideas in the boxes below. It’s fine to add ideas that aren’t going to work; even the ideas that don’t work can improve the process.
  2. Introduce the concept of “iteration” in engineering. Iteration involves repeating a process and trying to improve it over time. Students will complete Steps 4-7 of the EDP several times and should choose one person to write for the group in each iteration; ask the group to choose someone to write for Iteration 1.
  3. Ask students to next complete Step 4 (Plan) of the Student Worksheet.
    • Each group needs to settle on one plan of action for training the group’s “learner” student.
    • Each group must agree on what data they will collect.
    • Each group must agree on what kind of feedback to give. As with Step 3, Step 4 should be short—only 3-5 minutes. Student prompt: Write down who in your group will collect the data, and how. Write down how your group will give the learner feedback to help improve with each flick.
  1. Have students complete Step 5 (Create) of the Student Worksheet. In this step, one student is the learner for the group and will be flicking the ball at the target repeatedly. Other students will be either making measurements and providing feedback, or writing down data. This is where students are going to spend more time and have the most fun, probably at least 10 minutes. Student prompt: Create a process to analyze your design “prototype” system by tracking your data in the table below. 
    Three students stand in a hallway. One student holds a ping pong ball in his hand, facing away from camera, ready to flick the ball along a path of meter sticks on the ground toward a target identified on the floor with masking tape. A second student stands behind the target observing. A third student stands off to the side, also observing.
    One student prepares to flick ping pong ball while two other students observe.
    copyright
    Copyright © 2023 Orion Smith, Michigan State University

Three students crouch in a hallway, to be close to the floor. On the floor are several pieces of tape at various locations. One student holds a meter stick to measure the distance between two tape marks. A second student writes measurement values on a worksheet. A third student observes the process of the other two students. Two more meter sticks lay nearby on the floor as well.
Students record measures of distance between tape markers indicating landing locations.
copyright
Copyright © 2023 Orion Smith, Michigan State University

  1. In Step 6 (Test and Evaluate) and Step 7 (Improve), groups reflect on how well their system worked and how they could improve upon it for the next iteration. These two steps together might take 4-6 minutes.

Round 2 – Iterate blind

  1. Tell students that they are about to repeat Steps 4-7, but with a twist: On the last page of the Student Worksheet, every student should write that in Iteration 2, students will be flicking the ball while their eyes are covered. (One student in a group will flick a ball, and another student will cover the eyes of the first student. Alternately, a student may wear a simple cloth blindfold if you have access to suitable pieces of fabric.) The whole second iteration should proceed faster than the first one; provide students 10-15 minutes to complete the entire iteration. 
    A Black female student in a classroom, wearing a blindfold, facing the camera and holding a white ball in her hands. Other students in the background are throwing white balls.
    An AI-generated student holding a ball while blindfolded.
    copyright
    Copyright © Produced by the activity author prompting clipdrop.co using the StableDiffusion XL 0.9 model, at https://clipdrop.co/stable-diffusion Prompt: African American female high school student standing up in a classroom holding a small white ping pong ball in her hand, blindfolded, smiling. Computer generated style, high detail, stylish conservative clothing.

Round 3 - Iterate backward (time permitting)

  1. In Iteration 3, students will repeat Steps 4-7 again, but this time the learner will be facing backward and flicking the ball over their shoulder at the target. Again, this third iteration should take less total time than the first iteration, even with the increased challenge.
  2. While the class is iterating, prepare for Round 4 by finding a hidden area for a student to throw the ball from where the class cannot see. If you choose to skip Round 3, prepare this area while students are launching balls in Round 2. The area should have a target on the ground, and meter sticks or measuring tape or tape markers indicating regular intervals in meters from the target. If you use tape markers, place them at ¼-meter intervals (or even 10-centimeter intervals) to facilitate standing at locations such as 1.4 meters (140 centimeters) from the target. Also place meter sticks or measuring devices on the far side of the target, to facilitate measurements in either direction.

Round 4 - Hidden person

  1. Tell the class to come back together as a group, and return supplies/remove tape from the floor. Ask one student to come to a hidden area, which could be in a hallway, behind a screen, or somewhere that other students cannot see. Tell this student they will be launching a ball with a more traditional throwing motion, attempting to use the same motion and force each time but starting at a variable distance. Ask them to practice a throw that will likely hit the target when they are two meters away, so that if they are only 1.5 meters away they’ll probably overshoot by 0.5 meters. Tell the learner that their side of the ball is the “positive” side; in the prior example, overshooting by 0.5 meters would represent an output of -0.5.
  2. When the whole class is back together, let them know that you have placed a hidden “learner” in a place other students can’t see but can communicate with. This learner will only accept one input, which is a number, which they won’t be able to know the significance of. After each throw, the learner will communicate back a number, which students are trying to get as close to zero as possible. In machine learning systems, this output is known as a “loss function” and indicates how close the system is to the desired output for some input.
  3. Use a whiteboard or large on-screen document to record input and output values. Tell the learner that the first input is 0.5 (which the learner should know means “stand 0.5 meters from the target”), ask them to launch their ball and report the output as either a positive or negative number. Through experimentation, students should be able to zero in on an input of about 2 to produce output near 0. There will likely be some variability, but if the student makes consistent throws, the pattern should be discoverable. Although not completely analogous to training a machine learning system, students in the class have learned to minimize the loss function of a “black box” model (i.e., one that students do not know the inner workings of.)
  4. Ask the learner to come back into the room and demonstrate their launching technique to the class.

Final Reflections

  1. Ask students to write an exit ticket answering the following questions: How do you think machine learning systems can use data in the form of numbers to improve what they can do or produce? How is the machine learning process similar to how humans train themselves to learn a new skill?

Vocabulary/Definitions

abstraction: The process of removing unnecessary detail from a problem to focus on relevant information. This activity transitions from visual inputs to solely numeric data.

algorithm: A set of instructions or rules followed by a computer to solve a problem or complete a task. In machine learning, algorithms analyze data to find patterns and make predictions.

iteration: The process of repeating steps to gradually improve a result. The activity involves multiple rounds of testing and refinement.

loss function: A number indicating how far off a model's predictions are from the desired output. Minimizing this loss drives learning in machine learning models.

machine learning model: A computer system that uses input data to find patterns, which it can utilize for its output as numbers or choices.

training data: The input data provided to a machine learning algorithm to help it learn. This activity uses measurements and feedback to train the model.

Assessment

Pre-Activity Assessment

Use Student Worksheet Step 2 (Research) to conduct a brainstorming activity that helps students think about problems that AI systems are trying to solve today. (Potential answers: As of 2023, the list will probably include generative chatbots such as ChatGPT, the image generation product Midjourney, and other generative systems. Suggest that there are hundreds or thousands more systems that fall under the same umbrella of “machine learning,” such as recommendation systems from YouTube, Netflix, and Amazon, machine translation systems from Google and others, and voice recognition and personal assistant technologies such as Siri and Alexa.) Tabulate answers to the questions on a whiteboard or large on-screen document. Ask students how they think those systems get so good at the tasks they accomplish and quickly collect their thoughts on the same whiteboard or on-screen document. Let the class know that in today’s activity they will be trying to teach themselves using techniques that help them to understand how these systems learn and adjust.

Activity Embedded (Formative) Assessment

The procedures during the activity closely follow the steps on the Student Worksheet. Depending on group size and how many rounds of iteration are chosen, the number of students completing Steps 4-7 per group will vary.

Post-Activity (Summative) Assessment

Students write an exit ticket responding to the following questions: How do you think machine learning systems can use data in the form of numbers to improve what they can do or produce? How is the machine learning process similar to how humans train themselves to learn a new skill?

Safety Issues

  • Hitting other students: Caution students to stand clear of the flicking area and be aware of their surroundings. Consider marking off the launch zone. Enforce taking turns and not launching balls when others are in the vicinity.
  • Losing control of the balls: Use lightweight and/or soft balls that won't cause injury if they hit someone. Limit the launching force. Retrieve stray balls promptly.
  • Collisions when blindfolded: Carefully guide blindfolded students to stay within the launching zone. Have partners verbally warn them if they are nearing obstacles. Consider a spotter who can gently steer blindfolded students.
  • Tripping hazards: Keep the floor clear of objects. Consider taping down meter sticks and other tools.

Troubleshooting Tips

  • Inconsistent throwing/flicking by the learner student: Remind students that variability is normal and part of the learning process. Have the learner practice their technique and find what works best for consistent flicking. You may need to restart with a different learner if one student is unable to develop a repeatable technique.
  • Measuring issues: Ensure that students have proper measuring tools such as meter sticks, tape measures, etc. Remind them to carefully line up the zero/starting point each time. Check measurements as needed. Using fixed markers on the floor can improve consistency.
  • Recording issues: Appoint one consistent note taker for each round. Check data quality periodically.

Activity Extensions

For students who complete all three of the standard iterations, ask them to design a launching mechanism on paper and integrate the concepts of output data and feedback changes they could make to “train” the mechanism to launch properly under a variety of conditions.

Activity Scaling

  • To decrease the level of challenge for students, suggest types of data and feedback that students could gather and provide. Consider thinking of the challenge as launching the ball a certain distance instead of hitting a target, to simplify into an essentially one-dimensional data collection task.
  • Consider adding another iteration for more advanced students or students who complete the first iterations quickly. Different groups of students could complete however many iterations they can make it through in the allotted time.

Subscribe

Get the inside scoop on all things TeachEngineering such as new site features, curriculum updates, video releases, and more by signing up for our newsletter!
PS: We do not share personal information or emails with anyone.

More Curriculum Like This

High School Lesson
How Does Machine Learning Work?

Students learn about the first attempts at machine learning and specifically about the perceptron model—a simplified model of a biological neuron.

References

"Machine learning." Wikipedia, Wikimedia Foundation, 26 July 2023, https://en.wikipedia.org/wiki/Machine_learning. Accessed 26 July 2023.

Copyright

© 2024 by Regents of the University of Colorado; original © 2023 Michigan State University

Contributors

Orion Smith, computer science and technology teacher at East Lansing High School Jiancheng Liu, graduate student in computer science in OPTML Group at Michigan State University Brian Harrod, computer science teacher at Okemos High School

Supporting Program

Research Experience for Teachers (RET), Michigan State University College of Engineering, and the National Science Foundation

Acknowledgements

This curriculum was developed through the Michigan State University College of Engineering NSF RET program under grant number CNS-1854985 under National Science Foundation. However, these contents do not necessarily represent the policies of the NSF, and you should not assume endorsement by the federal government.

Last modified: April 25, 2024

Free K-12 standards-aligned STEM curriculum for educators everywhere.
Find more at TeachEngineering.org