-> LINK TO A VIDEO SHOWING HOW THE PROGRAM EXACTLY WORKS <-
This file includes the following chapters:
- Code Requirements
- Project description
- How to install
Python 3.8 with following modules installed:
- Pygame 1.9
The project supports following algorithms:
BFS runs on unweighted graphs with O(|V|+|E|) complexity. Guarantees the shortest path.
DFS runs on unweighted graphs with O(|V|+|E|) complexity. Doesn't find the shortest path.
DIJKSTRA runs on weighted graphs with O( (|V|+|E|) * log(|V|) ) complexity. Guarantees the shortest path.
A* runs on weighted graphs. Uses heuristics to guarantee the shortest path much faster than Dijkstra's Algorithm.
Contrary to typical graphs, in my project weights are not a feature of edges but of nodes. The more weight a node has, the darker its color is. Completely black nodes are barriers that cannot be crossed. Completely white nodes weigh 1.
If the path between the starting and ending vertices is found or it turns out that no exists, the animation stops by itself. To repeat it, press the RESET button and turn it on again.
You can draw random graphs, create, save and load your own, or use a special maze.
Some screenshots:
If you're familiar with git you can clone the repo. Otherwise you can simply download whole project as a compressed folder.
Then you need to make sure your device meets the requirements in chapter 1 (appropriate libraries installed). You can install them with pip from the command line.
Finally run the program using command line. Navigate to the directory, where the project is located and type python main.py
Wait a few second... And you should see sth like that: