wiki.neuro.tu-berlin.de

A* Search Algorithm

A* is a pathfinding algorithm that uses heuristics to guide its search. It can be considered as a generalization of Dijkstra’s algorithm. A* only finds a path between two given nodes, where as Dijkstra’s algorithm finds the shortest path tree from a start node.

Variables and Functions[1]

A* formulates the problem space using a weighted directed graph and uses the following variables and functions:

Algorithm

Following pseudocode is adapted from the original article [1:1]:

  1. First mark s as open, calculate the f(s) and add it to the priority queue.
  2. Select the open node n whose f-value is smallest from the queue. Resolve ties arbitrarily, but always in favor of any goal node.
  3. If n is a goal node, mark n as closed and terminate the algorithm.
  4. Otherwise, mark n as closed and apply the successor operator \Gamma to n. Calculate f-values for each successor of n and mark as open each successor not already marked closed. Go to Step 2.

References


  1. Hart, Peter E., Nils J. Nilsson, and Bertram Raphael. "A formal basis for the heuristic determination of minimum cost paths." IEEE transactions on Systems Science and Cybernetics 4.2 (1968): 100-107. pdf ↩︎ ↩︎