Machine-translated by Google. Questions are authored in English.
Top

Discussion

Why does uniform cost search apply the goal test on expansion rather than generation?

  • A.Expansion is where the algorithm has access to the goal test
  • B.A cheaper path to the goal may still be found later
  • C.Generation happens too early for the path cost to be known
  • D.Testing on generation would miss goals in the explored set

Answer: B

A goal node may be generated by an expensive path while a cheaper route to it is still on the frontier, so returning it immediately would break optimality. Testing when the node is selected for expansion guarantees no cheaper path remains. Breadth first can safely test on generation because all edges cost the same. A small implementation detail that determines whether a guarantee holds is exactly the kind of thing worth being precise about. Most errors here come from carrying a result across from a neighbouring case where it does not hold.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.