Robot Behaviors - Text-based
As mentioned previously, behaviors are a way to talk about the robot's actions. One way to get students thinking about behaviors and organizing actions in a sequence is to have students label different parts of their project using comments. The students can label the different behaviors from the challenges throughout the project.
Consider a simple example challenge of playing Tag. The students are asked to program the robot to turn quickly to avoid being tagged, drive slowly to tag someone, and then turn quickly again to run away. View the example below of using the comments to describe the sequence of behaviors:
Notice that the description of the behavior is in simple language and the comments capture single components (i.e., turning quickly, driving forward slowly, and turning slowly) of the larger behavior (playing tag).
It is good practice to ask the students to explain how they will plan for these challenges in terms of how they want and expect the robot to behave.