Python GUI application to visualize Dijkstra and A* SPF algorithms.
This programm aims to visualize how the Dijkstra and A* algorithms work to find the shortest path between two nodes in a graph.
Dijkstra’s algorithm (or Dijkstra’s Shortest Path First algorithm, SPF algorithm)[4] is an algorithm for finding the shortest paths between nodes in a graph […] (Wikipedia: Dijkstra’s Algorithm)
The algorithm may be used either for finding the shortest path between a given source and destination in graph or for finding all shortest paths from one source to all other nodes.
One popular application of this algorithm is the OSPF routing protocol used in networking as a interior gateway protocol by the routers of one network to determine the shortest path to all other routers.
A (pronounced “A-star”) is a graph traversal and path search algorithm, which is often used in many fields of computer science due to its completeness, optimality, and optimal efficiency. ([Wikipedia: A search algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm))
git clone https://github.com/dvdvgt/shortest-path-visualizer.git
cd shortest-path-visualizer
pip install --user -r requirements.txt
python -m pathfinder.main
After the shortest path to the destination has been found you may reassign the destination to a different, already discovered (coloured grey or blue) node to show the shortest path to that node (as can be seen in the example GIF).
Copyright (C) 2020 David Voigt
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses.