Back to Student Worksheet
Computer Science Grade 6-8 Answer Key

Computer Science: Robotics Algorithms: Sense-Plan-Act

Designing robot decisions using sensing, planning, and action

Answer Key
Name:
Date:
Score: / 15

Computer Science: Robotics Algorithms: Sense-Plan-Act

Designing robot decisions using sensing, planning, and action

Computer Science - Grade 6-8

Instructions: Read each problem carefully. For each robot scenario, identify what the robot senses, how it plans, and what action it takes. Show your reasoning in the space provided.
  1. 1

    A classroom delivery robot needs to bring a note to Room 204. It uses a camera to read room numbers in the hallway. Describe one Sense step, one Plan step, and one Act step for this robot.

    Separate what the robot observes from what it decides and what it physically does.

    The robot senses the room number using its camera. It plans by comparing the number it sees to Room 204 and deciding whether to keep moving or stop. It acts by driving forward, turning, or stopping at Room 204.
  2. 2

    Label each part of this robot behavior as Sense, Plan, or Act: The robot detects a wall 20 centimeters ahead. The robot decides to turn right because the path ahead is blocked. The robot rotates its wheels to turn right.

    Detecting a wall 20 centimeters ahead is Sense. Deciding to turn right is Plan. Rotating the wheels to turn right is Act.
  3. 3

    A robot vacuum bumps into a chair leg. It backs up, turns, and continues cleaning. What information did the robot sense, and why was that information useful?

    Think about what changed in the robot's environment.

    The robot sensed that it hit an obstacle, such as a chair leg. That information was useful because it told the robot that the path was blocked and that it needed to choose a different direction.
  4. 4

    Write a simple sense-plan-act algorithm for a robot that follows a black line on a white floor. Include at least two possible sensor readings and actions.

    A line-following robot usually changes direction when it loses the line.

    The robot senses whether the line sensor sees black or white. If it senses black, it plans to move forward and acts by driving straight. If it senses white, it plans to search for the line and acts by turning slightly until black is detected again.
  5. 5

    A rescue robot has a heat sensor, a camera, and wheels. It is searching a room for a person. Give one example of how each sensor or part could be used in the sense-plan-act cycle.

    The heat sensor can sense warm areas that might be a person. The camera can sense shapes or movement in the room. The robot can plan a route toward a possible person and act by moving its wheels in that direction.
  6. 6

    A robot is programmed with this rule: If the distance sensor reads less than 10 centimeters, stop. Otherwise, move forward. Identify the Sense, Plan, and Act parts of the rule.

    The if statement is usually part of planning because it makes a decision.

    The Sense part is reading the distance sensor. The Plan part is checking whether the distance is less than 10 centimeters. The Act part is stopping if the object is too close or moving forward if the path is clear.
  7. 7

    A warehouse robot must avoid crashing into people. Explain why the robot should sense, plan, and act repeatedly instead of only doing the cycle once.

    The robot should repeat the cycle because people and objects can move. By sensing again, the robot can update its plan and choose safer actions as the environment changes.
  8. 8

    Look at this situation: A robot is at a hallway intersection. The left hallway is blocked by boxes, the forward hallway is clear, and the right hallway has a wet floor sign. What should the robot sense, plan, and act?

    A good plan uses safety and the goal, not just the first open path.

    The robot should sense the boxes, the open forward hallway, and the wet floor sign. It should plan to choose the safest clear path, which is likely forward. It should act by driving forward through the clear hallway.
  9. 9

    A student writes, "The robot plans by moving forward." Explain what is wrong with this statement and rewrite it correctly using sense-plan-act vocabulary.

    The statement is wrong because moving forward is an action, not a plan. A correct version is: The robot plans to move forward after deciding the path is clear, then it acts by moving forward.
  10. 10

    A robot pet hears a loud clap and rolls toward the sound. Name the sensor data, the decision, and the action in this example.

    Sound can be sensor input just like light or distance.

    The sensor data is the loud clap and possibly the direction of the sound. The decision is to move toward the sound. The action is rolling in the direction of the clap.
  11. 11

    Create pseudocode for a robot that turns on a light when a room is dark. Use the words IF and ELSE in your answer.

    One correct pseudocode answer is: Sense the light level. IF the light level is dark, plan to turn on the light and act by switching it on. ELSE plan to leave the light off and act by doing nothing.
  12. 12

    A Mars rover receives a picture of a large rock in front of it. It decides to drive around the rock instead of over it. Why is planning important in this situation?

    Planning is important because the rover must choose a safe route before moving. Driving over the rock could damage the rover or get it stuck, so planning helps it avoid danger and continue its mission.
  13. 13

    Sort these robot tasks into the correct order for a sense-plan-act cycle: choose the shortest safe path, scan the room with a camera, drive to the charging station.

    The robot needs information before it can make a decision.

    The correct order is scan the room with a camera, choose the shortest safe path, and drive to the charging station. These match Sense, Plan, and Act.
  14. 14

    A robot arm in a factory uses a camera to find a blue block, calculates how to grab it, and closes its gripper around the block. Describe the sense-plan-act cycle in this example.

    The robot senses the blue block using the camera. It plans by calculating the position of the block and how to move the arm and gripper. It acts by moving the arm and closing the gripper around the block.
  15. 15

    Design a sense-plan-act rule for a school robot that must stop at crosswalks in the hallway. Your rule should include what the robot senses, how it decides, and what it does.

    A rule can be written as an if-then decision.

    The robot senses hallway markings or signs that show a crosswalk. It plans by checking whether a crosswalk is ahead and whether it should stop. It acts by stopping before the crosswalk, waiting if needed, and then moving again when it is safe.
LivePhysics™.com Computer Science - Grade 6-8 - Answer Key