Skip to content

Chapter 2: How Robots Think and Learn

Robots “think” in their own way. They do not feel or guess. They follow steps. These steps are called algorithms algorithms: A list of instructions that tells a computer exactly what to do, step by step. . An algorithm is a list of instructions that tells a computer exactly what to do, step by step.

It may look like the robot is thinking the way you do, but it is really just following instructions and checking choices. You use algorithms every day without even noticing. When you brush your teeth, you follow steps. When you get ready for school, you follow steps. When you line up in class, you follow steps. Robots solve problems by carefully following instructions, one step at a time.

Robots are not born knowing things. They must learn, just like you do. One way robots learn is by looking at examples. These examples are called data data: Examples and information used to teach a robot so it can learn. .

Imagine you show a robot many pictures of fish. Some fish are labeled “Safe,” and some are labeled “Poisonous.” The robot looks at the pictures and tries to find patterns patterns: Something that repeats in a certain way, like colors, shapes, or sounds. . Maybe all the red fish are poisonous. Maybe all the striped fish are safe. The robot studies the examples and searches for a rule.

After seeing many examples, the robot makes a guess about the rule. When it sees a new fish, it uses what it learned to predict predict: Using what you have learned to guess what happens next. whether the fish is safe or poisonous. It does not truly understand what a fish is. It looks for patterns in color and shape.

You can practice this by sorting objects. If you sort blocks by color or shape, you are creating a rule. If a friend looks at your sorted blocks, they might guess the rule you used. That is similar to how robots learn. They look at many examples and try to find patterns in the data.

Robots do not learn by understanding feelings or stories. They learn by finding patterns in numbers and examples.


📖 The Sandwich Step-by-Step

Maya wanted to teach her kitchen robot, Chef-Bot, how to make a peanut butter sandwich.

“It is easy, Chef-Bot,” Maya said. “Just put the peanut butter on the bread.”

Chef-Bot’s computer brain started thinking. It made a map of all its choices, like a tree with many branches. Should I put the jar on the bread? Should I use a spoon?

Chef-Bot grabbed the whole jar of peanut butter and plunked it right on top of a slice of bread. Clunk!

“Oh no!” cried Maya. “You need an algorithm! That is a special list of steps.”

Maya gave Chef-Bot a new list:

  1. Pick up the knife.
  2. Scoop some peanut butter.
  3. Spread it on the slice.

Chef-Bot followed the steps perfectly. Then, Maya showed Chef-Bot three more sandwiches so it could learn the pattern. Now, Chef-Bot was a sandwich master!


  1. Can you write an algorithm (step-by-step instructions) for making your favorite snack?
  2. How is the way a robot learns from fish pictures similar to the way you learn to sort objects?
  3. What would happen if a robot only saw pictures of one kind of fish—would it be able to recognize other kinds?