A* search

The A* algorithm is a pathfinding algorithm meant to determne the shortest distance between two points.

Implementation
The algorithm relies on a priority queue, containing a set of nodes pertaining to the current pathfinding situation. In determining which child nodes to follow, it uses a function that quickly estimates the cost from travelling from the starting point to the goal.

Pseudocode is as follows: let g(x) be current cost spent travelling as spent on the current node path. let d(x) be estimated cost to destination (e.g. straight-bird distance) let c(x,y) be cost of travelling from node x to node y. Add all routes from initial node to priority queue. for each route in priority queue (take lowest of g(x)+c(x,y)) Add all routes from remote to priority queue. Node y will have cost added to g(x). Stop if destination is reached.