Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A* is a best-first pathfinding algorithm that maintains a set of candidate paths through a “world” with the purpose of finding the least difficult (Bratko 2000) path to some goal. The difficulty (or cost) of a path is garnered by the A* algorithm through the use of a function, typically named f, that builds an estimate of the total cost from a start point to the goal. The application of this cost-estimate function f is used to sort the candidate paths (Hart 1968) in the order most likely to prove least costly.
To represent the world, we’ll again use a simple 2D matrix representation: