Skip to main content
Module 5 · Pathfinding Around Obstacles

Lesson 5-2 · Finding the Path — Knowledge ChecksAnswer key

Correct answers are marked and the explanation follows each question.

  1. Walking downhill, you are on an intersection numbered 4. Its open neighbors are numbered 3, 3 and 5. Where can you step?

    1. A.To either 3: both lead down to the destination in 3 more steps✓
    2. B.Only to the first 3 you check
    3. C.To the 5, because it is further from the destination
    4. D.Nowhere: two 3s means there is no path

    Any neighbor with one less works. Two choices just means two different shortest paths, both correct.

  2. Why does the computer take intersections from the FRONT of the to-visit list?

    1. A.The front holds the oldest, so everything 1 step away is handled before anything 2 steps away✓
    2. B.So the search heads toward the start
    3. C.It doesn't matter: any order gives the right numbers
    4. D.So blocked intersections are skipped

    New intersections go on the end, so the front is always the oldest. Oldest-first means the wave front moves out one step at a time, which is what makes every number a shortest distance.

  3. What in the algorithm makes sure no intersection is ever numbered twice?

    1. A.Only a neighbor that does not have a number yet gets one and joins the list✓
    2. B.Always taking the intersection at the front of the list
    3. C.Stopping when the list is empty
    4. D.Walking downhill from the start

    A neighbor that already has a number is left alone. That is the numbered-once rule from Lesson 5-1.

  4. What makes sure everything 1 step from the destination is numbered before anything 2 steps away?

    1. A.New intersections join the end of the list, and the next one is always taken from the front✓
    2. B.Stopping when the list is empty
    3. C.Looking at the open neighbors only
    4. D.Walking downhill from the start

    Joining at the end and taking from the front means the oldest is always next, so the wave front moves out one step at a time.