A* Pathfinding Simulator
Unity, C#
An algorithmic simulator demonstrating how the A* pathfinding algorithm acts on a grid based graph. This was created as a hobby project by myself due to an interest in the algorithm after completing a 1600 word research paper about it in my Data Structures and Algorithms course.
The big focuses for this project were creating a clean user interface and allowing for animations to be paused/slowed down in an effort to make this a useful and satisfying educational tool.
- Specifics of Algorithm
This implementation weighs its edges by 10 for cardinal movement and 14 for diagonal movement. The heuristic is calculated using the diagonal distance formula as follows:
dx = |x1 - x2|
dy = |y1 - y2|
h(n) = max(dx, dy) + (√2-1) * min(dx, dy)
If you want a full detailed explanation on the algorithm, feel free to download my research paper on A* completed in my Data Structures and Algorithms class, that did receive an A from my professor.