1 / 19

Optimised Search Techniques

Optimised Search Techniques. Basic Idea. BFS brances out to all surrounding nodes No discrimination based on direction of target node. BFS example. S. E. BFS example. S. E. BFS example. S. E. BFS example. S. E. BFS example. S. Large area needlessly explored. E. Alternatives.

Download Presentation

Optimised Search Techniques

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. Optimised Search Techniques

  2. Basic Idea BFS brances out to all surrounding nodes No discrimination based on direction of target node

  3. BFS example S E

  4. BFS example S E

  5. BFS example S E

  6. BFS example S E

  7. BFS example S Large area needlessly explored E

  8. Alternatives Best-First Search: Branch out to nodes which intuitively seem to be the closest to the destination Use heuristics to estimate distances to destination node Greedy algorithm However, a better solution exists

  9. A* algorithm A* is an improvement over Best-First Search Nodes are given weights based on: Cost to reach the node Estimated cost to reach the end node

  10. Manhattan Distance Manhattan distance - sum of the absolute distances between coordinates M(x1,y1,x2,y2) = |x1-x2| + |y1-y2| Reflection of distance between points if travel only parallel to axes

  11. Implementation of A* Using Manhattan distance as an heuristic to estimate distance to end point w(x,y) = c(x,y) + M(x,y,xE,yE) Item in priority queue with lowest weight popped off Surrounding nodes added with calculated weights

  12. A* example S E

  13. A* example S 9 7 E

  14. A* example S 9 7 9 7 E

  15. A* example S 9 7 9 7 7 E

  16. A* example S 9 7 9 7 7 7 7 E

  17. A* example 11 S 9 11 11 9 7 9 11 9 7 7 7 9 7 7 9 9 E

  18. Comparison: BFS vs A* BFS A* S S E E

  19. Special cases of A* Dijkstra's Algorithm is a case of A* with the weighting based solely on cost: w(x,y) = c(x,y) Breadth-First Search is just A* with all nodes have a weight of 0: w(x,y) = 0

More Related