Welcome to my path-finding algorithm!
This code demonstrates my version of the A* path finding algorithm. You can use the draw tool to draw and erase walls that block the path between the blue and gold points. When you hit 'space', the algorithm will finding the path with the shortest distance between the two points while avoiding the walls. The red blocks will be squares that the algorithm searched in while the green squares will be part of the path found by the algorithm. For a more complete discription of the tools, read on.
You have 4 different draw modes. Press the correct key to swap modes:
-'w' draw walls that the algorithm must solve around
-'d' delete walls
-'s' move the start location
-'a' moove the end location
When you are done drawing, you can solve by pressing 'space'
If you need to reset the map, just press 'r'
Type in the pixel size of the squares you want:
Press 'r' to reset with the new pixel size.
Use the slider to change the weight of the path distance.
Further to the left means the algorithm will try to solve with the least number of attempted squares.
Further to the right means it will prioritize finding the shortest path to the end, even if it takes more squares.
Code is available to view on my GitHub at https://github.com/dnlvickers/Pathfinding .