CS2201 5
CS2201 5
• The uninformed and informed search algorithms that we have seen are designed to
explore search spaces systematically.
• They keep one or more paths in memory and by record which alternatives have
been explored at each point along the path.
• When a goal is found, the path to that goal also constitutes a solution to the
problem.
• If the path to the goal does not matter, we might consider a different class of
algorithms that do not worry about paths at all. => local search algorithms
Local Search
• Local search algorithms operate using a single current node and generally move
only to neighbors of that node.
• Local search algorithms ease up on completeness and optimality in the interest
of improving time
and space complexity?
• Although local search algorithms are not systematic, they have two key
advantages:
1. They use very little memory (usually a constant amount), and
2. They can often find reasonable solutions in large or infinite (continuous) state
spaces.
• In addition to finding goals, local search algorithms are useful for solving pure
optimization problems, in which the aim is to find the best state according to an
objective function.
• In optimization problems, the path to goal is irrelevant and the goal state itself is
the solution.
• In some optimization problems, the goal is not known and the aim is to find the
best state.
Local search algorithms
• In many optimization problems, the path to the
goal is irrelevant; the goal state itself is the
solution
•
• h = number of pairs of queens that are attacking each other, either directly
or indirectly
• h = 17 for the above state
•
Hill Climbing Features
• Features of Hill Climbing:
a. S, A, G