Skip to content

This is a GUI based on PyQt to visualize graph search algorithms like BFS, DFS, A* and Dijkstra's algorithm.

License

Notifications You must be signed in to change notification settings

Powein/Visualize-Graph-Search-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visualize Graph Search Algo.s GUI

Description:

This is a light program based on PyQt5 to visualize graph search algorithms like BFS, DFS, A* and Dijkstra's algorithm. You can easily customize nodes and algorithms, even the render orders.

Quick Start:

For windows:

git clone https://github.com/Powein/Visualize-Graph-Search-Algorithms.git
cd Visualize-Graph-Search-Algorithms
python -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt

For unix-like OS:

git clone https://github.com/Powein/Visualize-Graph-Search-Algorithms.git
cd Visualize-Graph-Search-Algorithms
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

After that, you can just run the UI through

python searchUI.py

Have fun.

How to customize all these stuffs in UI?

In file search.py, there is city_coordinates = {<cityname>:(<coordX>,<coordY>)} represents the nodes with their coordinates in the graph. The coordinates co-ops with city_data = {<cityName>:[(<cityName> : <distance>)]} which is a dictionary to describe the link status between nodes. Through modify these two dict, the structure of the graph can be easily modified. In this file, algorithms can also be modified. You may notice that the result of a single sort algorithm should be properly organized to align with the input format in UI part.

As for UI settings, It can be found in searchUI.py. In it, DrawingWidget provides interfaces to draw city positions and texts with customized color or font sizes.

About

This is a GUI based on PyQt to visualize graph search algorithms like BFS, DFS, A* and Dijkstra's algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages