Lesson 4: My Robotic Friends Jr.
Algorithms | Debugging | Unplugged
Using a set of symbols in place of code, students will design algorithms to instruct a "robot" to stack cups in different patterns. Students will take turns participating as the robot, responding only to the algorithm defined by their peers. This segment teaches students the connection between symbols and actions, the difference between an algorithm and a program, and the valuable skill of debugging.
This unplugged lesson brings the class together as a team with a simple task to complete: get a "robot" to stack cups in a specific design. This activity lays the groundwork for the programming that students will do throughout the course as they learn the importance of defining a clearly communicated algorithm.
Warm Up (5 min)
Activity (30 min)
Wrap Up (10 min)
Students will be able to:
- Attend to precision when creating instructions
- Identify and address bugs or errors in sequenced instructions
- Watch the My Robotic Friends - Teacher Video.
- (Optional) Print out one My Robotic Friends Symbol Key (Course B) - Key per group or 2-3. Alternatively, find a place to display this information where students can reference throughout the lesson.
- Prepare a stack of 10 disposable cups per group of 2-3 students, OR
- (Optional) print and cut out Paper Trapezoid Template - Manipulatives for each group if your class is not going to use cups.
- Print out one set of My Robotic Friends Cup Stack Pack (Course B) - Image Pack per group.
- Make sure each student has a Think Spot Journal - Reflection Journal.
For the Teacher
- My Robotic Friends - Teacher Video
For the Students
- Feeling Faces - Emotion Images
- My Robotic Friends Symbol Key (Course B) - Key
- My Robotic Friends - Unplugged Video (download)
- My Robotic Friends Cup Stack Pack (Course B) - Image Pack
- Paper Trapezoid Template - Manipulatives
- Think Spot Journal - Reflection Journal
- Algorithm - A precise sequence of instructions for processes that can be executed by a computer
- Bug - Part of a program that does not work correctly.
- Debugging - Finding and fixing problems in an algorithm or program.
- Program - An algorithm that has been coded into something that can be run by a machine.
Warm Up (5 min)
The goal of this quick discussion is to call out that while robots may seem to behave like people, they're actually responding only to their programming. Students will likely refer to robots from movies and TV that behave more like humans. Push them to consider robots that they've seen or heard of in real life, like Roombas, or even digital assistants like Amazon Alexa.
Talking to Robots
Display: Watch one of the videos below to give students context for the types of things that robots can do:
Discuss: Refer to the video that you chose and ask students how they think that the robot knew what to do. Does a robot really “understand” what you say? Is it worried about getting in trouble if it doesn't do what it's told?
Say: Robots can only do what they've been told to do, but we don't just tell them using words. In order to do something, a robot needs to have a list of steps that it can read. Today, we are going to learn what it takes to make that happen.
Activity (30 min)
Introduction and Modeling
- Up means that the cup automatically goes up as high as it needs to
- Down means that it automatically goes down until it lands on something
- The hand automatically returns to cup stack after setting down a cup
- Forward means the robot moves one step (1/2 cup width) forward
- Backward means the robot moves one step (1/2 cup width) Backward
- Note: Students may not use backward at this age unless they want to build the cup stacks in reverse (which is also okay)
- Programmers are not allowed to talk when the robot is working. This includes blurting out answers or pointing out when the robot has done something wrong
- Programmers should raise their hand if they see a bug
Simplify: Does this all feel a little complicated for your students?
Don't forget to model this in front of the class until students understand all of the rules. If it's still confusing, try running this whole activity together as a classroom using volunteers as robots, instead of breaking up into groups!
Intensify: Are your students more advanced? Do you want this lesson to relate more closely to the online puzzles? Here are some modifications that you can make:
- One arrow corresponds to one movement
- When a cup is removed from the stack, it returns to table-level before moving
- Students need to use multiple "up" arrows to lift the cup multiple levels
- Students need to use multiple "down" arrows to lower the cups multiple levels
- Students need to use the "back" arrows to get back to the cup stack
Set Up: Have stacks of cups or cut paper trapezoids available for groups.
Display: Display the My Robotic Friends Symbol Key (Course B) - Key or write the allowed actions on the board - make sure these are in a place where they can be seen for the whole activity. Explain to the class that these will be the only four actions that they can use for this exercise. For this task, they will instruct their “robot” friend to build a specific cup stack using only the commands listed on the key.
Model: In order to explain how the instructions are intended to work, model for the class how to create and follow an algorithm for replicating a simple pattern. Place a single stack of cups in front of you to start.
Display: Hold up the pattern you plan to model. A simple three cup pattern is a great place to start.
Prompt: Ask the class what the first instruction should be, using only the four instructions allowed. The first move should be to "pick up cup." If students suggest something else from the list, perform that action and allow them to see their error. If they suggest something not from the list, make a clear malfunction reaction and let them know that the command is not understood.
With cup in hand, ask the class to continue giving you instructions until the first cup is placed. This is a great place to clarify that "step forward" and "step backward" each imply moving half a cup width. See the image below for reference.
Continue asking for instructions from the classroom until you have completed the entire design.
Once your stack is complete, point out that they just gave you a list of steps for completing a task. That's an algorithm. Algorithms are great for sharing ideas, but spelling them out word by word can take a long time. That's what the symbols are for! When you change an algorithm into symbols that a robot (or computer) understands, that's called programming.
Ask the class to help you write the "program" for that first move by changing the text into an arrow. Then work with them to write down the rest of the moves necessary to complete the pattern. Depending on the confidence of your students, you might switch back and forth frequently between acting as the "robot" and writing down the code, or you might push them to write the whole program before you will implement it. One possible solution looks like this:
Volunteer: Once the class has completed the model program, ask one of the students to come up and act as the "robot" to ensure that the program really works. Encourage them to say the instructions out loud as they "run" the code.
Programming Your Robots
Group: Place students into groups of 4. Each group should then further break down into two pairs - each pair will develop their own program to be "run" by the other pair.
Distribute: Give each group one stack of cups or paper cutouts.
Display: Show My Robotic Friends Cup Stack Pack (Course B) - Image Pack to the class or hand out individual copies for groups to use. Have each pair (not group) choose which idea they would like their robots to do. Try to push for an easier idea for the first time, then have them choose a more complex design later on. Encourage pairs to keep their choice secret from the other half of their group.
Discuss: Give each pair time to discuss how the stack should be built, using only the provided symbols. Make sure each group writes down the "program" somewhere for the "robot" to read later.
Do: Once both of the group's pairs have completed their programs, they can take turns being "robots" for each other by following the instructions the other pair wrote. Encourage students to watch their "robot" closely to ensure that they are following instructions. If a student sees a bug and raises their hand, have the robot finish the instructions to the best of their ability. Afterward, have the students discuss the potential bug and come up with solutions. Continue repeating until the stack is built properly.
Circulate: Look for groups who are trying to take shortcuts by adding extra things (like numbers) to their code. Praise them for their ingenuity, but remind them that for this exercise, the robots do not understand anything but the provided symbols. If you like, you can hint that they should save their brilliant solution for the next time they play this game, since they might get the chance to use their invention soon!
Iterate: Depending on the time available, mix up the pairs and give them a chance to do a different pattern. Each time groups repeat the process, encourage them to choose a more challenging pattern.
Sense making: The goal of this discussion is to give students space to make sense of their experience both as robot and programmer. The questions are intentionally broad, but designed to get students thinking about the challenges of writing a clear program and the constraints of a robot or computer in interpreting your instructions.
Discuss: After everyone has had a chance to be the robot, bring the class back together to discuss their experience. In particular, discuss as a class:
- What was the most difficult part of coming up with the instructions?
- Did anyone find a bug in your instructions once your robot started following them?
- What was the bug?
- Why do you think you didn't notice it when writing the program?
- When you were the robot, what was the hardest part of following the instructions you were given?
Wrap Up (10 min)
Having students write about what they learned, why it’s useful, and how they feel about it can help solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
- Draw one of the Feeling Faces - Emotion Images that shows how you felt about today's lesson in the corner of your journal page.
- Draw your own stack of cups that you would like to see a robot build.
- Can you create a program for that cup stack?
CSTA K-12 Computer Science Standards
AP - Algorithms & Programming
- 1A-AP-09 - Model the way programs store and manipulate data by using numbers or other symbols to represent information.
This list represents opportunities in this lesson to support standards in other content areas.
Common Core English Language Arts Standards
L - Language
- 1.L.6 - Use words and phrases acquired through conversations, reading and being read to, and responding to texts, including using frequently occurring conjunctions to signal simple relationships (e.g., because).
SL - Speaking & Listening
- 1.SL.1 - Participate in collaborative conversations with diverse partners about grade 1 topics and texts with peers and adults in small and larger groups.
- 1.SL.1.b - Build on others’ talk in conversations by responding to the comments of others through multiple exchanges.
- 1.SL.2 - Ask and answer questions about key details in a text read aloud or information presented orally or through other media.
Common Core Math Standards
MD - Measurement And Data
- 1.MD.4 - Organize, represent, and interpret data with up to three categories; ask and answer questions about the total number of data points, how many in each category, and how many more or less are in one category than in another.
MP - Math Practices
- MP.1 - Make sense of problems and persevere in solving them
- MP.2 - Reason abstractly and quantitatively
- MP.3 - Construct viable arguments and critique the reasoning of others
- MP.5 - Use appropriate tools strategically
- MP.6 - Attend to precision
- MP.7 - Look for and make use of structure
- MP.8 - Look for and express regularity in repeated reasoning
Next Generation Science Standards
ETS - Engineering in the Sciences
ETS1 - Engineering Design
- K-2-ETS1-1 - Ask questions, make observations, and gather information about a situation people want to change to define a simple problem that can be solved through the development of a new or improved object or tool.
- K-2-ETS1-2 - Develop a simple sketch, drawing, or physical model to illustrate how the shape of an object helps it function as needed to solve a given problem.