Week 22 Quiz

Advanced Robot Behaviors and State Machines

Student Information

Quiz Questions

1. What is a state machine in robotics?

2. Which of these is NOT a benefit of using state machines?

3. What is a state transition?

4. In the code example, what does the "switch" statement do?

5. Which real-world example uses state machines?

6. What should happen when a robot's battery is low in any state?

7. In the exploring robot example, when should it transition from EXPLORING to AVOIDING?

8. What is the purpose of the "enum" in the state machine code?

9. Design a simple 3-state machine for a robot security guard. Name the three states and describe when the robot should transition between them. (Short Answer)

10. Explain why state machines make robot programming easier compared to writing one long program without states. Give at least two specific reasons. (Short Answer)

← Back to Lesson 📚 Semester Overview Next: Week 23 →