See a demo at http://www.briangrinstead.com/files/astar/
If you want just the A* search code (not the demo visualization), use code like this http://gist.github.com/581352
A few notes about weight values:
- A weight of 0 denotes a wall.
- A weight cannot be negative.
- A weight cannot be between 0 and 1 (exclusive).
- A weight can contain decimal values (greater than 1).
If you don’t have grunt installed, follow the grunt getting started guide first.
Pull down the project, then run:
npm install grunt