# Heuristic Search

Document Sample

```					  Finish up the five “uninformed
search” strategies
• Slides actually contained in s09
Programming Assignment #1
• Posted online – I will reference this in class
Programming Assignment #1
1111
1111
1111
1111

There are several “optimal” solutions
2, 8, 9, 15 or 15, 9, 8, 2 or 2, 15, 9, 8 …
Programming Assignment #1
• Your language must be “approved”
WRT/ITTC labs.
• Your code must take an input String
describing the board
– All on would be “1111111111111111”
• Your final result should include the solution
path, an indication of how many nodes were
expanded (time) and how many nodes are
still in memory (space)
Chapter 3.5
Heuristic Search
Learning Objectives
• Heuristic search strategies
– Best-first search
– A* algorithm

• Heuristic functions
Heuristic Search
• Review: tree search
a strategy is defined by picking the order of
node expansion
Heuristic Search
• Best-first search: use an evaluation function
for each node
– Estimate of “desirability”
– Expand most desirable unexpanded node
– Implementation: fringe is a queue sorted in
decreasing order of desirability
– Special cases:
• Greedy search
• A* search
Heuristic Search
• Romania with step costs in km
Heuristic Search
• Greedy search
– Evaluation function h(n) (heuristic) =
estimate of cost from n to closest goal
– Example: hSLD(n) = straight-line distance from
n to Bucharest
– Greedy search expands the node that appears to
be closest to goal
Heuristic search
• Greedy search example
Heuristic Search
• Greedy search example
Heuristic Search
• Greedy search example
Heuristic Search
• Properties of greedy search
– Complete??
Heuristic Search
• Complete?? No – can get stuck in loops, e.g., start
in Iasi with Oradea as goal….

• Iasi  Neamt  Iasi  Neamt 
• Complete in finite space with repeated-state
checking
Heuristic Search
• Properties of greedy search
– Complete?? No – can get stuck in loops, e.g.,
Complete in finite space with repeated-state checking
– Time??
Heuristic Search
• Properties of greedy search
– Complete?? No – can get stuck in loops, e.g.,
Complete in finite space with repeated-state checking
– Time?? O(bm), but a good heuristic can give
dramatic improvement
Heuristic Search
• Properties of greedy search
– Complete?? No – can get stuck in loops, e.g.,
Complete in finite space with repeated-state checking
– Time?? O(bm), but a good heuristic can give
dramatic improvement
– Space??
Heuristic Search
• Properties of greedy search
– Complete?? No – can get stuck in loops, e.g.,
Complete in finite space with repeated-state checking
– Time?? O(bm), but a good heuristic can give
dramatic improvement
– Space?? O(bm) – keeps all nodes in memory
Heuristic Search
• Properties of greedy search
– Complete?? No – can get stuck in loops, e.g.,
Complete in finite space with repeated-state checking
– Time?? O(bm), but a good heuristic can give
dramatic improvement
– Space?? O(bm) – keeps all nodes in memory
– Optimal??
Heuristic Search
• Properties of greedy search
– Complete?? No – can get stuck in loops, e.g.,
Complete in finite space with repeated-state checking
– Time?? O(bm), but a good heuristic can give
dramatic improvement
– Space?? O(bm) – keeps all nodes in memory
– Optimal?? No

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 4 posted: 8/19/2012 language: pages: 21
How are you planning on using Docstoc?