chapter3part2

# chapter3part2 - CS2710,ISSP2610 Chapter3,Part2...

This preview shows pages 1–13. Sign up to view the full content.

1 CS 2710, ISSP 2610 Chapter 3, Part 2 Heuristic Search

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
3 Best-First-Search An evaluation function  determines order of  nodes on the fringe  (there are variations,  depending on the search algorithm)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Best-First-Search In our framework:   treesearch or graphsearch, with nodes ordered on the  fringe in increasing order by an evaluation function,  f(n).
5 def treesearch (qfun,fringe): while len(fringe) > 0: cur = fringe[0] fringe = fringe[1:] if goalp(cur): return cur fringe = qfun(makeNodes(successors(cur)),fringe) return [] best-first search: qfun appends the lists together and sorts them in increasing order by f-value [In the more efficient version, a heap is used to maintain the queue in increasing order by f-value]

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Heuristic Evaluation Function,  h(n) F may involve  “heuristic evaluation function”,  h(n)
7 h(n)  Metric on states.   Estimate  of shortest distance to  some goal. h : state   estimate of distance to goal h (goal) = 0 for all goal nodes

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Greedy Best-First Search f (n) = h (n) Greedy best-first search may switch its strategy  mid-search.  For example, it may go depth-first for  awhile, but then return to the shallow parts of the  tree.
9 Greedy Example In the map domain, h(n) could be the straight line  distance from a city to Bucharest Greedy search expands the node that currently  appears to be closest to the goal

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10 Go from Arad to Bucharest Oradea Zerind Arad Sibiu Timisoara Lugoj Mehadia Dobreta Rimnicu Vilcea Fagaras Craiova Pitesti Giurgiu Bucharest Urziceni Vaslui Iasi Neamt Hirsova Eforie 71 75 151 140 118 99 80 97 146 138 120 75 70 111 101 90 211 85 366 329 374 380 253 176 0 193 160 244 241
11 Greedy Example Arad 366 Sibiu 253 Zerind 374 Timisoara 329 Arad 366 Oradea 380 Fagaras 178 Rimniciu 193 Bucharest 0 Sibiu 253

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Greedy Search Complete? Nope
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/22/2011 for the course CS CS 2710 taught by Professor Wiebe during the Fall '11 term at Pittsburgh.

### Page1 / 37

chapter3part2 - CS2710,ISSP2610 Chapter3,Part2...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online