Skip to content

A* search

networks

Level 3 of 3

Also called A-star and Best-first search with a heuristic.

fresh numbers

The test's questions that a run answers, asked again on new numbers whenever you like. The answer, its working and the reason for every other choice come from a* search's own run on the numbers shown.

choose one

question 1

The search runs from A to D on this map. What estimate does it settle D at?

1319171215201310A30BCDEFG
the answer, and why

the answer is A

The shortest way is A, B, C, D, which is 13 + 15 + 10, so 38. D's line left is 0, so its estimate is 38.

if you chose another

  • That is the straight line from place A to D, not a way along roads.
  • That is A, E, F, G, C, D, longer than 38.
  • That adds only A-B and C-D, leaving out B-C.

new numbersthe test page's numbers

question 2

On this map, from E to H, counting E, what way so far does the third place settled have?

161014161416ABE30FGH
the answer, and why

the answer is A

E at 30 and F at 34 come first. Then G at 38, below A's 42 and B's 53. Its way is 14 + 14, so 28.

if you chose another

  • That adds 10 + 14, but road E-F is 14.
  • That is A's way. A's road from E is shorter than F's, but its estimate is 10 + 32, which is 42.
  • That is G's estimate, its way plus its line left of 10.

new numbersthe test page's numbers

question 3

The search runs from the first place after the semicolon to the second. On which map does it weigh up the most places?

the answer, and why

the answer is B

C-G 15, B-E 28, B-F 21, A-E 29, D-G 25, B-C 14; C D weighs up 8 places, the most of the four.

if you chose another

  • That map weighs up 6 places, fewer than 8.
  • That map weighs up 3 places, fewer than 8.
  • That map weighs up 5 places, fewer than 8.

new numbersthe test page's numbers