Reputation: 297
Under what conditions will the A* search algorithm explore all the states in the search space? Is this the worst case?
According to me, it will be forced to search the entire search space if f(n) for each node on the route to the goal, is higher than the other nodes on the same level. This is the worst case since all the nodes generated must be expanded to reach the goal.
Is this correct?
Upvotes: 3
Views: 3106
Reputation: 8230
From wikipedia:
The time complexity of A* depends on the heuristic. In the worst case, the number of nodes expanded is exponential in the length of the solution (the shortest path), but it is polynomial when the search space is a tree, there is a single goal state, and the heuristic function h meets a certain criteria:
Upvotes: 1