CSC3402 Lecture4 InformedSearch
CSC3402 Lecture4 InformedSearch
Chapter 4 Section 1 - 3
Outline
Best-first search
Greedy best-first search
A* search
Heuristics
Local search algorithms
Hill-climbing search
Simulated annealing search
Local beam search
Genetic algorithms
Review: Tree search
A search strategy is defined by picking the order of
node expansion
Best-first search
Idea: use an evaluation function f(n) for each
node
estimate of "desirability“
Expand most desirable unexpanded node
Implementation:
Order the nodes in fringe in decreasing order
of desirability
Special cases:
greedy best-first search
A* search
Romania with step costs in
km
Greedy best-first search
Consistent heuristics
A heuristic is consistent if for every node n, every
successor n' of n generated by any action a,
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)
i.e., f(n) is non-decreasing along any path.
Theorem: If h(n) is consistent, A* using GRAPH-SEARCH is
optimal
Properties of A*
h (S) = ?
1
h (S) = ?
2
Admissible heuristics
E.g., for the 8-puzzle:
h1(n) = number of misplaced tiles
h2(n) = total Manhattan distance
(i.e., no. of squares from desired location of each tile)
h1(S) = ? 8
h2(S) = ? 3+1+2+2+2+3+3+2 = 18
Dominance
Hill-climbing search: 8-
queens problem
h = number of pairs of queens that are attacking each other, either directly or
indirectly
h = 17 for the above state
Hill-climbing search: 8-
queens problem
Properties of simulated
annealing search
One can prove: If T decreases
slowly enough, then simulated
annealing search will find a global
optimum with probability
approaching 1