Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Informed Search CS 171/271 (Chapter 4) Some text and images in these slides were drawn from Russel & Norvigs published material.

Similar presentations


Presentation on theme: "1 Informed Search CS 171/271 (Chapter 4) Some text and images in these slides were drawn from Russel & Norvigs published material."— Presentation transcript:

1 1 Informed Search CS 171/271 (Chapter 4) Some text and images in these slides were drawn from Russel & Norvigs published material

2 2 Search Strategies Revisited Strategy defines order of node expansion We can view BFS, Uniform-Cost, DFS, and others as strategies that select nodes according to an evaluation function f(n): some measure on node n Select the node with minimum f(n)

3 3 Search Strategies Revisited Uninformed search Evaluation function dependent on states and successor function only Improvements achieved if repeated states are detected Informed (heuristic) search Problem-specific information may be incorporated in the evaluation function

4 4 Informed Search Greedy Best-First Search A* Search Local Search Algorithms

5 5 Greedy Best-First Search Strategy: expand node that is closest to goal Based on a heuristic function on each node that represents closeness to goal Closeness measure not necessarily accurate (of course!), but has some basis

6 6 Example 1: Route Finding Straight-line distance heuristic Direct distance from node to goal Actual cost is not always this distance since not all nodes are connected by a straight line path Practical significance You have a map where straight-line distances are more obvious than the sums of connections

7 7 Example 2: 8-puzzle Sum of Manhattan distances Select the move that yields the minimum sum of distances of tiles from their goal positions (horizontal/vertical steps only) Number of misplaced tiles Select the move that renders a configuration with the fewest number of misplaced tiles

8 8 Sum of Manhattan distances: = 18 Sum of misplaced tiles: 8

9 9 About Greedy Best-First Search Not always optimal/complete Completeness depends on heuristic Example? (see page 97) Implementation requires a priority queue Uninformed (and Informed) Search Algorithms are in fact special cases of Greedy Best-First search

10 10 A* Search Greedy Best-First Search where the evaluation function is g(n) + h(n) Guaranteed to be optimal as long as h is admissible heuristic: node to goal cost to reach node

11 11 Admissible Heuristics A heuristic is admissible if it never overestimates the cost to reach the goal Examples Straight-line distance Manhattan distance Number of misplaced tiles Note: a relaxed version of a problem yields an admissible heuristic

12 12 Local Search Most appropriate when the path-cost is not relevant Strategy: start with an initial complete state, and then improve incrementally Example: n-queens use complete-state formulation instead of incremental formulation Repeatedly move to a successor (move a queen within a column) that has the fewest queen-pairs that attack each other (hill-climbing)

13 13 Hill-Climbing Search

14 14 Climb Illustration Number of hostile queen-pairs: 17 Several possible moves improve this measure to 12

15 15 Problem: Local Maximum

16 16 Getting Stuck in a Local Maximum Not a goal state but improvement is not possible

17 17 Escaping Local Maxima Simulated Annealing Select successors randomly Allow downhill moves in early iterations Local Beam Search Keep k states instead of just one Choose top states from all successors Mimics natural selection (survival of the fittest)


Download ppt "1 Informed Search CS 171/271 (Chapter 4) Some text and images in these slides were drawn from Russel & Norvigs published material."

Similar presentations


Ads by Google