Skip to main content
Module 5 · Dijkstra's Algorithm

Lesson 8 · Building Experience — Knowledge ChecksAnswer key

Correct answers are marked and the explanation follows each question.

  1. Why does the robot navigate better on Run 2?

    1. A.It learns a smarter algorithm
    2. B.The algorithm is identical — but the blocked list starts with obstacles learned in Run 1, so paths are planned around them from the start
    3. C.Its motors get faster
    4. D.It skips destinations

    Same Dijkstra, better data. Pre-loading Run 1's discoveries means Run 2 plans around those obstacles immediately instead of rediscovering them.

  2. Run 1 took 12 steps with 3 reroutes; Run 2 took 8 steps with 0 reroutes. Why the change?

    1. A.The battery was fuller
    2. B.Run 2 started already knowing the obstacles, so it planned around them and never had to reroute
    3. C.The grid got smaller
    4. D.Random luck

    With obstacles pre-loaded, Run 2's initial paths already avoid them — no mid-run surprises, so zero reroutes and fewer steps.

  3. Can Run 2 discover an obstacle Run 1 never found?

    1. A.No — Run 2 knows everything already
    2. B.Yes — Run 2 may take a different route and encounter obstacles Run 1 never drove past
    3. C.No — obstacles never change
    4. D.Only if the grid grows

    The robot only discovers obstacles it drives toward. A new route can reach nodes Run 1 skipped, so Run 2 can still find something new — feeding Run 3 even better data.

  4. Why is a file needed to remember obstacles between separate program runs?

    1. A.Files are faster than lists
    2. B.Python variables disappear when the program stops — a file stores the data on disk so it survives a restart
    3. C.The blocked list is too big for memory
    4. D.It is not needed

    A list variable lives only while the program runs. Writing the blocked list to a file (and reading it back) is what makes the knowledge persist across restarts.

  5. What is 'convergence' in this context?

    1. A.The robot running out of battery
    2. B.After enough runs the robot knows all relevant obstacles, so its paths are optimal from the start and no more reroutes happen
    3. C.Two robots meeting at a node
    4. D.The grid shrinking over time

    Each run can add knowledge until there's nothing new to learn. At that point paths are optimal immediately — the robot's map has converged.