This application was designed to visualize popular graph traversal algorithms in an easy to use and intuitive manner. Many algorithms can be difficult to visualize and thus their understanding may be lost with some individuals. Therefore, seeing certain operations being performed in a visual manner can help with understanding algorithms in a fun and interactive way.
When starting the application, the user is brought to the landing screen where a canvas shows an interactive cube "box" where
they can manipulate its orientation and size.
The user can then generate a "maze" which is composed of nodes in a graph. Each nodes represents a inner cube in the outer cube frame, where certain nodes
are designate as maze pathways (green) and maze walls (blue). Each node in this initialization state is transparent.
Once the desire maze has been generated the user can then select an algorithm to begin solving the maze, and once the maze has been solved the shortest path is then displayed to the user. Mazes can be continualy generated and solved by the user.
There were four main algorithms used in this project: depth first search (DFS), breadth first search (bfs), djikstras algorithm, and the a-star algorithm.
DFS is used in order to create the maze pathways from a starting node to an ending node. This is not the recursive version seen in many implementations, instead a first in first out (FIFO) data structure known as a stack is used to perform DFS.
BFS is the first traversal algorithm implemented and uses a queue in order to visit all the nodes in the graph.
The shortest path calculated from bfs may not be the true shortest path, but indeed it will be the first path discorvered by the algorithm.
Djikstra's algorithm is the second traversal algorithm which uses known edge weights to calculate distances from any node to the start node. Node weights are visua!
lized as a heat map from light (low weight) to dark (heavy weight)
Unlike BFS, the shortest path is indeed the shortest path from start node to end node
A-star is the third and final algorithm to be implemented, it operates much the same as djikstra's algorithm but uses an extra heurstic in its node distance calculation. This heurstic is determined to be the Euclidean distance from the start node to any other node.
The shortest path calculation is the same as djikstra's algorithm and results in the same shortest path.
For each traversal algorithm, the pseudo code is available for visualization. This allows the user to see the code responsible for the interactive algorithm.