1 / 28

Heuristic Search

Heuristic Search. Henry Kautz. Problem: Large Graphs. It is expensive to find optimal paths in large graphs, using BFS, IDS, or Uniform Cost Search (Dijkstra’s Algorithm) How can we search large graphs efficiently by using “commonsense” about which direction looks most promising?. Example.

harryv
Download Presentation

Heuristic Search

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. Heuristic Search Henry Kautz

  2. Problem: Large Graphs • It is expensive to find optimal paths in large graphs, using BFS, IDS, or Uniform Cost Search (Dijkstra’s Algorithm) • How can we search large graphs efficiently by using “commonsense” about which direction looks most promising?

  3. Example 53nd St 52nd St G 51st St S 50th St 10th Ave 9th Ave 8th Ave 7th Ave 6th Ave 5th Ave 4th Ave 2nd Ave 3rd Ave Plan a route from 9th & 50th to 3rd & 51st

  4. Example 53nd St 52nd St G 51st St S 50th St 10th Ave 9th Ave 8th Ave 7th Ave 6th Ave 5th Ave 4th Ave 2nd Ave 3rd Ave Plan a route from 9th & 50th to 3rd & 51st

  5. Best-First Search • The Manhattan distance ( x+  y) is an estimate of the distance to the goal • It is a search heuristic • Best-First Search • Order nodes in priority to minimize estimated distance to the goal • Compare: Uniform-Cost / Dijkstra’s • Order nodes in priority to minimize distance from the start

  6. Best-First Search • Fringe: Priority queue (heap) • Key: h(n) – heuristic estimate of distance from n to goal

  7. Obstacles • Best-FS eventually will expand vertex to get back on the right track S G 52nd St 51st St 50th St 10th Ave 9th Ave 8th Ave 7th Ave 6th Ave 5th Ave 4th Ave 2nd Ave 3rd Ave

  8. Non-Optimality of Best-First Path found by Best-first = 10 53nd St 2 3 52nd St 1 2 S G 5 4 3 2 51st St 1 50th St 5 4 3 2 1 7 6 10th Ave 9th Ave 8th Ave 7th Ave 6th Ave 5th Ave 4th Ave 2nd Ave 3rd Ave Shortest Path = 8

  9. Improving Best-First • Best-first is often tremendously faster than UCS, but might stop with a non-optimal solution • How can it be modified to be (almost) as fast, but guaranteed to find optimal solutions? • A* - Hart, Nilsson, Raphael 1968 • One of the first significant algorithms developed in AI • Widely used in many applications

  10. h values 53nd St 2 3 52nd St 1 2 S G 5 4 3 2 51st St 1 50th St 5 4 3 2 1 7 6 10th Ave 9th Ave 8th Ave 7th Ave 6th Ave 5th Ave 4th Ave 2nd Ave 3rd Ave

  11. g values 53nd St 8 7 52nd St 9 6 S G 1 2 3 4 51st St 5 50th St 3 4 5 6 7 1 2 10th Ave 9th Ave 8th Ave 7th Ave 6th Ave 5th Ave 4th Ave 2nd Ave 3rd Ave

  12. f = g + h 53nd St 10 10 52nd St 10 8 S G 6 6 6 6 51st St 6 50th St 8 8 8 8 8 8 8 10th Ave 9th Ave 8th Ave 7th Ave 6th Ave 5th Ave 4th Ave 2nd Ave 3rd Ave

  13. Maze Runner Demo

  14. A* Graph Search • Optimal if h is consistent as well as admissible

  15. A* Graph Search for Any Admissible Heuristic if State[node] is not in closed OR g[node] < g[LookUp(State[node],closed)] then

  16. Properties of Heuristics • Let h1 and h2 be admissible heuristics • if for all s, h1(s)  h2(s), then • h1 dominates h2 • h1 is better than h2 • h3(s) = max(h1(s), h2(s)) is admissible • h3 dominates h1 and h2

  17. Exercise: Rubik’s Cube • State: position and orientation of each cubie • Corner cubie: 8 positions, 3 orientations • Edge cubie: 8 positions, 2 orientations • Center cubie: 1 position – fixed • Move: Turn one face • Center cubits never move! • Devise an admissible heuristic

  18. Next • Heuristic functions for STRIPS planning • Games

More Related