erlang Implementation of the A* Pathfinding Algorithm
%% generate grids graph
Graph = astar:graph([
[0,0,1,0,0,0,1,0,0,0], % 0
[0,0,1,0,0,0,1,0,0,0], % 1
[0,0,1,0,0,0,1,0,0,0], % 2
[0,0,1,0,0,0,1,0,0,0], % 3
[0,0,0,0,0,0,0,0,0,0], % 4
[0,0,0,1,0,0,0,0,0,0], % 5
[0,0,0,1,0,0,0,0,0,0], % 6
[0,0,0,1,0,0,0,0,0,0], % 7
[0,0,0,1,0,0,0,0,0,0], % 8
[0,0,0,1,0,0,0,0,0,0] % 9
], 10, 10),
%% return astar path points
[{0,0},{1,1},{2,1},{3,1},{4,2},{4,3},{5,4},
{6,5},{7,6},{8,7},{9,8},{9,9}] = astar:search(Graph, {0, 0}, {9, 9}).