Strategy
Purpose
| Learning: | how robot code makes decisions |
|---|---|
| Making Sumo: | improve robot's behavior |
Sandbox
Skip around a couple minutes of these videos from Sumo competitions:
Write in your sprint notes…
what successful strategies did you notice?
Walkthrough
- Open your IR navigation program from yesterday
- Right-click the “IR Front Navigator” block
- Select “Expand Block”
- Look at the if/else statements:
- Both sensors see opponent → charge forward
- Left sensor only → turn left
- Right sensor only → turn right
- No detection → move forward
Check the box in your sprint notes when you’ve done the steps above.
Exercises
Detection Distance
Approaching
Change when your robot reacts to opponents:
- Find the number 7 in your code
- Try changing it to 5
- Test if this works better or worse
Write in your sprint notes…
what number worked best for your robot.
Turn Speed
Proficient
Adjust how fast your robot turns:
- Find the servo speed numbers in the code
- Try different speeds between -100 and 100
- Test which speeds work best
Write in your sprint notes…
what speeds you chose.
Search Mode
Distinguished
Make your robot search when it can’t find anything:
- Find the else section (when no opponent is seen)
- Instead of going straight, make it:
- Spin in place, or
- Drive in a circle
Take a video…
of your robot’s new search behavior.