How much of the driving code changes between the BFS run and the Dijkstra run?
- A.drive_path() needs a weight parameter
- B.None of it — the planner returns a list of intersections either way, and drive_path() drives lists
- C.turn_to() has to know about the slow segment
- D.track_to_intersection() runs slower on purpose
Answer Why?
A team's Dijkstra run takes 5 steps and 21 seconds; their BFS run takes 3 steps and 29 seconds. A normal block is about 4 seconds. Do the numbers make sense?
- A.No — more steps must take more time
- B.Yes — 5 normal blocks is about 20 s; 2 normal blocks plus a weight-5 segment is about 28 s
- C.No — BFS should always be faster
- D.Only if the battery was changed between runs
Answer Why?
Both runs produce the same path and the same time. What is the most likely cause?
- A.Dijkstra is broken
- B.SLOW_SEGMENT was not typed in (or its weight is 3 or less), so the two planners have no reason to disagree
- C.The robot is too fast
- D.drive_path() ignores the planner
Answer Why?