1 / 33

What were your answers?

What were your answers?. Breadth-First Depth-First Uniform Cost Iterative-Deepening. What were your answers?. Breadth-First a , b, c, d, e, e, f, f, z Depth-first a, b, e, z Uniform Cost a, c, d, b, f, e, e, f, z Iterative Deepening

dsimons
Télécharger la présentation

What were your answers?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What were your answers? • Breadth-First • Depth-First • Uniform Cost • Iterative-Deepening

  2. What were your answers? • Breadth-First a, b, c, d, e, e, f, f, z • Depth-first a, b, e, z • Uniform Cost a, c, d, b, f, e, e, f, z • Iterative Deepening a, a,b,c,d, a,b,e,c,e,f,d,f, a,b,e,z

  3. Questions about HW1

  4. A Note about Wednesday

  5. Chapter 3Heuristic Search

  6. Learning Objectives • Heuristic search strategies • Best-first search • A* algorithm • Heuristic functions

  7. Review • Review: tree searcha strategy is defined by picking the order of node expansion

  8. Summary of algorithms

  9. Review • Review: tree searcha strategy is defined by picking the order of node expansion • Even when we try to use knowledge about the problem (uniform cost search) we are limited to what we have “learned” This makes it a “backward looking” search.

  10. But, when I ask you to get from Arad to Bucharest, what do you do?

  11. Heuristic Search • Heuristic searches use knowledge about the problem to include “forward looking” information. • That is, which move do I THINK would get me closest to the goal.

  12. Heuristic Search • Best-first search: use an evaluation function for each node • Estimate of “desirability” • Expand most desirable unexpanded node • Implementation: frontier is a queue sorted in decreasing order of desirability • Special cases: • Greedy search • A* search

  13. Heuristic Search • Romania with step costs in km

  14. 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

  15. Heuristic search • Greedy search example

  16. Heuristic Search • Greedy search example

  17. Heuristic Search • Greedy search example

  18. Heuristic Search • Properties of greedy search • Complete??

  19. 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

  20. Heuristic Search • Properties of greedy search • Complete?? No – can get stuck in loops, e.g., Complete in finite space with repeated-state checking • Time??

  21. 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

  22. 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??

  23. 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

  24. 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??

  25. 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

  26. Heuristic Search • A* search • Premise - Avoid expanding paths that are already expansive • Evaluation function f(n) = g(n) + h(n)g(n) = cost so far to reach nh(n) = estimated cost to goal from nf(n) = estimated total cost of path through n to goal

  27. Heuristic Search • A* search • A* search uses an admissible heuristici.e., h(n)  h*(n) where h*(n) is the true cost from n.(also require h(n) 0, so h(G) = 0 for any goal G.)example, hSLD(n) never overestimates the actual road distance.

  28. Heuristic Search • A* search example

  29. Heuristic Search • A* search example

  30. Heuristic Search • A* search example

  31. Heuristic Search • A* search example

  32. Heuristic Search • A* search example

  33. Heuristic Search • Properties of A* • Complete?? Yes, unless there are infinitely many nodes with f  f(G) • Time?? Exponential in [relative error in h x length of solution.] • Space?? Keeps all nodes in memory • Optimal?? Yes – cannot expand f i+1 until fi is finished A* expands all nodes with f(n) < C* A* expands some nodes with f(n) = C* A* expands no nodes with f(n) > C*

More Related