a
play

A * A path finding algorithm. A path finding algorithm. Given a - PowerPoint PPT Presentation

A * A path finding algorithm. A path finding algorithm. Given a state space, such as a 2-dimensional map, find a path from point A to point B in that space, if such a path exists. If such a path exists, return a path within certain criteria


  1. A * A path finding algorithm.

  2. A path finding algorithm. Given a state space, such as a 2-dimensional map, find a path from point A to point B in that space, if such a path exists. If such a path exists, return a path within certain criteria - ie: shortest path, most straight path, avoiding certain areas, etc.

  3. The A * Algorithm Developed in 1968 for solving different kind of problems such as the ‘15-puzzle’. Searches for the least costly path from a starting state to a goal state by examining adjacent states of a particular state.

  4. The A * Algorithm Developed in 1968 for solving different kind of problems such as the ‘15-puzzle’. Searches for the least costly path from a starting state to a goal state by examining adjacent states of a particular state.

  5. Starting State Adjacent States Goal State

  6. Starting State Adjacent States Goal State

  7. Starting State Adjacent States Goal State

  8. The algorithm works by repeatedly examining the most promising unexplored adjacent state. A priority queue ‘ Open ’ contains all adjacent unexamined states, sorted in order of lowest cost. A list ‘ Closed ’ contains all examined states. Initially, the Closed list is empty, while the Open list contains a single starting state.

  9. A Simple Example Open Closed A B C A1 (0) 1 0 2 3 G

  10. A Simple Example Open Closed A B C A1 (0) 1 0 1 2 1 3 G Adjacent States (1 move from start)

  11. A Simple Example Open Closed A B C A1 (0) 1 0 1 B1 (1) A2 (1) 2 1 3 G

  12. A Simple Example Open Closed A B C 1 1 B1 (1) A2 (1) 2 1 3 G

  13. A Simple Example Open Closed A B C A1 (0) 1 0 1 B1 (1) A2 (1) 2 1 3 G

  14. A Simple Example Open Closed A B C B1 (1) A1 (0) 1 0 1 A2 (1) 2 1 3 G

  15. A Simple Example Open Closed A B C B1 (1) A1 (0) 1 0 1 2 A2 (1) 2 1 2 3 2 G Adjacent States (2 moves from start)

  16. A Simple Example Open Closed A B C B1 (1) A1 (0) 1 0 1 2 A2 (1) C1 (2) 2 1 2 B2 (2) 3 2 G A3 (2)

  17. A Simple Example Open Closed A B C A1 (0) 1 0 2 C1 (2) 2 2 B2 (2) 3 2 G A3 (2)

  18. A Simple Example Open Closed A B C A1 (0) 1 0 1 2 B1 (1) A2 (1) C1 (2) 2 1 2 B2 (2) 3 2 G A3 (2)

  19. A Simple Example Open Closed A B C C1 (2) A1 (0) 1 0 1 2 B2 (2) B1 (1) A2 (1) A3 (2) 2 1 2 3 2 G

  20. A Simple Example Open Closed A B C C1 (2) A1 (0) 1 0 1 2 B2 (2) B1 (1) A2 (1) A3 (2) 2 1 2 3 3 2 3 G Adjacent States (3 move from start)

  21. A Simple Example Open Closed A B C C1 (2) A1 (0) 1 0 1 2 B2 (2) B1 (1) A3 (2) A2 (1) 2 1 2 3 C2 (3) 3 2 3 G B3 (3)

  22. A Simple Example Open Closed A B C A1 (0) 1 0 1 B1 (1) A2 (1) 2 1 3 C2 (3) 3 3 G B3 (3)

  23. A Simple Example Open Closed A B C A1 (0) 1 0 1 2 B1 (1) A2 (1) 2 1 2 3 C2 (3) C1 (2) 3 2 3 G ... B3 (3)

  24. A Simple Example Open Closed A B C C2 (3) A1 (0) 1 0 1 2 B3 (3) B1 (1) A2 (1) 2 1 2 3 C1 (2) 3 2 3 ...

  25. A Simple Example Open Closed A B C C2 (3) A1 (0) 1 0 1 2 B3 (3) B1 (1) A2 (1) 2 1 2 3 C1 (2) 3 2 3 4 ... Adjacent State is Goal!

  26. A Simple Example A B C It is now possible 1 0 1 2 to construct a path back to the starting point. 2 1 2 3 3 2 3 4

  27. A Simple Example This example is very simple, and every state within the 3x3 grid was explored. However, many optimizations can be made to the A * algorithm to increase efficiency. One such optimization is to add a Heuristic to the cost of each state evaluated. A good heuristic will increase efficiency - up to 100% in best cases.

  28. Heuristic Bad Heuristic Good Heuristic Closed Search Space S G S G

  29. Summary The A * algorithm will always return the most efficient path, if one exists. If there is no path, however, then the A * algorithm becomes inefficient, as all state space will be explored. The A * algorithm can be extended to support multiple goals and multiple start locations, and is generally very adaptable to many different problem domains, ranging from music to computer graphics.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend