I am working on a problem where I have a set of goal nodes of which some, all, or none of will appear in a search tree.
Is there a search algorithm which returns the lowest cost path to one goal node, when there are potentially many different goal nodes present in a tree, or failure?
This can obviously be solved by iterating through the set of goal nodes and applying a search algorithm on each of the goals and then comparing the paths to find the lowest cost path, but I would like know if there is a more elegant solution.
Thanks