This is an interactive tool to utilise and explain Dijkstra's pathfinding algorithm.
Create your desired graph using the add, move, connect, erase, edit and clear tools below. To change edge costs, select the edit tool, select the edge you want to change, then update the value in the text box.
Once the graph is created, simply specify which node you want to start at and hit run. If you want to be walked through how the algorithm works before you see the final results, tick the 'walkthrough' box.
In the algorithm table, 'step' denotes the current iteration, 'N'' denotes the set of included nodes, and 'D(X), P(X)' denotes the cost to and predecessor node (the node you have to go through before reaching the destination) of the given destination, respectively.
Calculate paths with starting node: Walkthrough:
Ensure all nodes are connected before running.