Informed Search
Informed Search
Search
Chapter 4 (b)
Some material adopted from notes
by Charles R. Dyer, University of
Wisconsin-Madison
Today’s class: local search
Height Defined
by Evaluation
Function
Hill-climbing search
• If there exists a successor s for the current state n such that
– h(s) < h(n)
– h(s) <= h(t) for all the successors t of n
then move from n to s. Otherwise, halt at n
• Looks one step ahead to determine if a successor is better
than the current state; if so, move to the best successor.
• Like Greedy search in that it uses h, but doesn’t allow
backtracking or jumping to an alternative path since it
doesn’t “remember” where it has been.
• Is Beam search with a beam width of 1 (i.e., the maximum
size of the nodes list is 1).
• Not complete since the search will terminate at "local
minima," "plateaus," and "ridges."
Hill climbing example
2 8 3 1 2 3
start 1 6 4 h = -4 goal 8 4 h=0
7 5 7 6 5
-5 -5 -2
2 8 3 1 2 3
1 4 h = -3 8 4 h = -1
7 6 5 7 6 5
-3 -4
2 3 2 3
1 8 4 1 8 4 h = -2
7 6 5 7 6 5
h = -3 -4
f(n) = -(number of tiles out of place)
Exploring the Landscape
local maximum
• Local Maxima: peaks that
aren’t the highest point in
plateau
the space
• Plateaus: the space has a
broad flat region that gives
the search algorithm no
direction (random walk)
• Ridges: flat like a plateau, ridge
but with drop-offs to the Image from: http://classes.yale.edu/fractals/CA/GA/Fitness/Fitness.html
sides; steps to the North,
East, South and West may
go down, but a step to the
NW may go up.
Drawbacks of hill climbing
• Problems: local maxima, plateaus, ridges
• Remedies:
– Random restart: keep restarting the search
from random locations until a goal is found.
– Problem reformulation: reformulate the
search space to eliminate these problematic
features
• Some problem spaces are great for hill
climbing and others are terrible.
Example of a local optimum
2 5
-4
1 7 4
start 8 6 3 goal
1 2 5 1 2 5 1 2 3
7 4 7 4 -4 8 4 0
8 6 3 8 6 3 7 6 5
-3
1 2 5
8 7 4 -4
6 3
Hill Climbing and 8 Queens
Annealing