正在加载图片...
Best-first search INFORMED SEARCH ALGORITHMS Expand most desirable unexpanded node fringe is a queue sorted in decreasing order of desirability CHAPTER 4,SECTIONS 1-2 Special cases: Outline Romania with step costs in km ◇Best-first search ◇A search ◇Heuristics 445 Review:Tree search Greedy search Evaluation function()(heuristic) =estimate of cost fromnto the closest goa empty then return failure Egs(n)=straight-line distance fromnto Bucharest eeds return nod Greedy search expands the node that appears to be closest to goal Astrategy is defined by picking the order of node expansionInformed search algorithms Chapter 4, Sections 1–2 Chapter 4, Sections 1–2 1 Outline ♦ Best-first search ♦ A ∗ search ♦ Heuristics Chapter 4, Sections 1–2 2 Review: Tree search function Tree-Search( problem, fringe) returns a solution, or failure fringe ← Insert(Make-Node(Initial-State[problem]),fringe) loop do if fringe is empty then return failure node ←Remove-Front(fringe) if Goal-Test[problem] applied to State(node) succeeds return node fringe ← InsertAll(Expand(node, problem),fringe) A strategy is defined by picking the order of node expansion Chapter 4, Sections 1–2 3 Best-first search Idea: 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 Chapter 4, Sections 1–2 4 Romania with step costs in km Bucharest Giurgiu Urziceni Hirsova Eforie Neamt Oradea Zerind Arad Timisoara Lugoj Mehadia Dobreta Craiova Sibiu Fagaras Pitesti Rimnicu Vilcea Vaslui Iasi Straight−line distance to Bucharest 0 160 242 161 77 151 241 366 193 178 253 329 80 199 244 380 226 234 374 98 Giurgiu Urziceni Hirsova Eforie Neamt Oradea Zerind Arad Timisoara Lugoj Mehadia Dobreta Craiova Sibiu Fagaras Pitesti Vaslui Iasi Rimnicu Vilcea Bucharest 71 75 118 111 70 75 120 151 140 99 80 97 101 211 138 146 85 90 98 142 92 87 86 Chapter 4, Sections 1–2 5 Greedy search Evaluation function h(n) (heuristic) = estimate of cost from n to the closest goal E.g., hSLD(n) = straight-line distance from n to Bucharest Greedy search expands the node that appears to be closest to goal Chapter 4, Sections 1–2 6
向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有