You are on page 1of 6

LOCAL SEARCH ALGORITHMS AND

OPTIMIZATION PROBLEMS
J. Felicia Lilian
(Based on Slides by Mausam
Stuart Russell, Peter Norvig, NPTEL)
Local search
• Local search algorithms operate using a single
current node (rather than multiple paths) and
generally move only to neighbors of that node.
• Typically, the paths followed by the search are not
retained “amnesia”.
• Although local search algorithms are not systematic,
they have two key advantages:
(1) they use very little memory—usually a
constant amount.
(2) they can often find reasonable solutions in
large or infinite (continuous) state spaces.
Hill Climbing Search
• The loop (climber) continually moves in the direction of
increasing value—that is, uphill.
• It terminates when it reaches a “peak” where no neighbor
has a higher value.
Example: Hill Climbing
• Ex: 8-queens problem
– heuristic cost function h is the number of pairs of
queens that are attacking each other, either
directly or indirectly
– Global Minimum = 0
– Hits = 17
– Need 5 moves
Limitations of HC
• Local Maxima – nowhere else to go
• Ridge – sequence of local maxima
• Plateau – flat local maxima

You might also like