Chap 3 (3) - InformedSearch
Chap 3 (3) - InformedSearch
Chap 3 (3) - InformedSearch
413 =
220+193
Arad 646 Fagaras 415 Oradea 671
Rimnicu Vilcea
415
=317+98
Pitesti Craiova 573
418
=418+0 Bucharest Craiova 615 Rimnicu 607
Properties
• A* search is complete, optimal, and optimally
efficient for any given admissible heuristic function
• Complete
– It guarantees to reach to goal state
• Optimality
– If the given heuristic function is admissible, then A* search
is optimal.
– Proof optimality of A* search
• Takes memory:
– It keeps all generated nodes in memory
– Both time and space complexity is exponential
• Time and space complexity of heuristic algorithms
depends on the quality of the heuristic function.
– Worst case is exponential
Local Search
• In many problems, the path to the goal is irrelevant; the goal
state itself is the solution
e.g., n-queens: State space = set of complete configurations.
Find configuration satisfying constraints
–In these cases, we can use local search algorithms that keep a single
current state, try to improve it.
• Being able to ignore the path offers two main advantages:
–Less memory is used, generally a constant amount.
–A reasonable solution can be found in infinite search spaces for which
systematic search would be unsuited.
• They are also very useful for optimization problems where the
goal is to find the best state according to a function. Many of
these problems are not suitable for standard search.
–As an example, nature provides a function of reproductive success that
is used to guide Darwinian evolution. Evolution tries to optimize this
function, but there is no path cost or goal test.
Example: n-queens. Put n queens on an n × n board with no
two queens on the same row, column, or diagonal.
Iterative improvement algorithm (IIA)
• The general idea is to start with a complete
configuration and to make modifications to improve
its quality
• It keeps track of only the current state and try to
improve it until goal state is reached,
– It does not look ahead beyond the immediate neighbors of
that state
• Implementation:
–Consider all states laid out on the surface of a landscape
–IIA moves around the landscape trying to find the highest
peaks, which are the optimal solutions
• Two search algorithms:
–Hill climbing
–Simulated annealing