A* Sample


Conceptual explanation

A* is a network searching algorithm that takes a "distance-to-goal + path-cost" score into consideration. As it traverses the network searching all neighbors, it follows lowest score path keeping a sorted priority queue of alternate path segments along the way. If at any point the path being followed has a higher score than other encountered path segments, the higher score path is abandoned and a lower score sub-path is traversed instead. This continues until the goal is reached. [2]

In computer science, A* (pronounced "A star") is a best-first graph search algorithm that finds the least-cost path from a given initial node to one goal node (out of one or more possible goals). [1]

References

  1. [1,2] A* search algorithm (From Wikipedia, the free encyclopedia)

Github A* Sample Application

The original source code for the A* pathfinding component can be downloaded from Github. This is the pathfinding component used in the TWMiniGame sample application found at this TWMiniGame.

The A* pathfinding component requires the following items to be installed;


  • XNA 4.0 redist (Included)
  • Visual Studio 2010 Express or higher
https://github.com/TemporalWars/AStarPathfinding