Professional Documents
Culture Documents
6 - C Informed Search Strategies
6 - C Informed Search Strategies
5
GBFS
6
Greedy Best-First- Analysis
Complete – No
From Iasi to Fagaras
No – can get stuck in loops, e.g., Iasi -> Neamt -> Iasi ->Neamt …
Optimal - No
Time Complexity - O(bm)
Space Complexity – O(bm) keeps all nodes in memory
A∗ search
most widely known form of best-first search
evaluates nodes by combining g(n), the cost to reach the
node, and h(n), the cost to get from the node to the goal
9
A* search - Demo
10
Conditions for optimality
Admissibility
admissible heuristic that never overestimates the cost to reach the
goal, i.e., it is optimistic
A heuristic h(n) is admissible if for every node n, h(n) ≤ h*(n), where
h*(n) is the true cost to reach the goal state from n
Example: hSLD(n) –straight line cannot be an overestimate
Consistency
A heuristic is consistent if for every node n, every successor
n' of n generated by any action a,
Triangle inequality
the triangle is formed by n, n', and
the goal Gn closest to n
Workout
Optimality of A*
15