Lecture 08 Informed Search Strategies-I
Lecture 08 Informed Search Strategies-I
Lecture 08 Informed Search Strategies-I
Lecture # 08
Monday, February 17, 2020
Fall 2020
FAST – NUCES, Faisalabad Campus
Zain Iqbal
[email protected]
Outline
Informed = use problem-specific knowledge
Informed Search Strategies
Which search strategies?
⚫ Best-first search and its variants
Heuristic functions?
⚫ How to invent them
A* Search
A strategy is defined by
picking the order of node
expansion
Limitations of uninformed
search
8-puzzle
⚫ Avg. solution cost is about 22 steps
⚫ branching factor ~ 3
⚫ Exhaustive search to depth 22:
⚫ 3.1 x 1010 states
18-Feb-20 11
Greedy best-first search
Special case of best-first search
⚫ Uses h(n) = heuristic function as its
evaluation function
⚫ Expand the node that appears closest to
goal
Let us see how this works for route-finding problems
in Romania; we use the straight-line distance
heuristic, which we will call hSLD.
If the goal is Bucharest, we need to know the straight
line distances to Bucharest, which are shown in
Figure
Romania with step costs in km
Greedy best-first search
example
Greedy best-first search example
Greedy best-first search example
Greedy best-first search example
Optimal Path
140 80
99 151
A* search example
140
80
220
80
146 97
A* search example
A* search example
220
97
317
138
97
101
Condition’s of A* optimality
Admissible heuristics
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.
Theorem:
If h(n) is admissible, A* using TREE-SEARCH is optimal
Admissibility of a heuristic
Let c(n) denotes the optimal path from
node n to any goal node. A search
heuristic h(n) is called admissible
YES
• h(n) is monotonic if, for every node n and every successor n’ of n generated by
any action a, the estimated cost of reaching the goal from n is no greater than the
step cost of getting to n’ plus the estimated cost of reaching the goal from n’:
• h(n) ≤ c(n,a,n’) +h(n’).
• This implies that f(n) (which equals g(n)+h(n)) never decreases along a path from
the root.
If h is consistent, we have
f(n') = g(n') + h(n')
= g(n) + c(n,a,n') + h(n')
≥ g(n) + h(n) = f(n)
Because g(n’)=g(n)+c(n,a,n')
i.e., f(n) is non-decreasing along any path
A* Y Y O(bm) O(bm)
(when arc costs > 0
and hadmissible)
21
TASK
Reading Material
Russell & Norvig: Chapter # 3
David Poole: Chapter # 3
George Luger: Chapter # 4
An article: A*’s use of Heuristic
http://theory.stanford.edu/~amitp/GameProgra
mming/Heuristics.html