Competing · Robot club · about 14 min
Practice, replay and the results board: why you lost, and the fast-then-careful pattern that wins.
[1 mark]What does this program print?
for gap in [100, 30, 10]:
speed = max(20, min(90, gap * 1.2))
print("gap", gap, "-> speed", round(speed))[1 mark]After losing a race, put the three things to look at in order.
Number the lines 1 to 3 to put them in the right order.
Where did the time go?Did the robot do what you meant?What did the bots do differently?[1 mark]What are the built-in bots for?
[1 mark]Which pattern wins nearly every game with a target?
[1 mark]Your robot stops inside the bay but facing 14 degrees off. What should you add?
wait before stopping[1 mark]With speed = max(20, min(90, gap * 1.2)), below what gap does the speed stop falling and sit at 20? Give your answer to one decimal place.
Drive into the bay and stop inside it, facing the way you started, within 10 degrees. Being in the bay is not enough: finish straight.
from bugbot import *
connect()
forward(60, distance=35)
stop()
print("heading", heading())Plan your program here, then type it in and press Run.