Skip to content

erlang Implementation of the A* Pathfinding Algorithm

License

Notifications You must be signed in to change notification settings

ryderside/astar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

astar

erlang Implementation of the A* Pathfinding Algorithm

Sample Usage

%% 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}).

About

erlang Implementation of the A* Pathfinding Algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages