A desktop application for visualizing graph algorithms on real-world network problems. Built with PyQt6 and NetworkX, this tool demonstrates how different pathfinding algorithms work through animated visualizations.
The application includes two main visualization modules:
London Tube Least Congested Path
- Finds optimal routes through the London Underground network considering crowding levels
- Supports multiple days of the week with different crowding patterns
- Visualizes paths using BFS, DFS, Dijkstra's Algorithm, and A* Algorithm
- Shows step-by-step animated traversal with congestion weights
Traveling Salesman Problem
- Solves TSP for a set of cities with geographic coordinates
- Compares different graph traversal and pathfinding algorithms
- Generates animated visualizations showing the route progression
- Displays city names and calculates path distances
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Dijkstra's Algorithm
- A* Algorithm
- Python 3.x
- PyQt6
- NetworkX
- Matplotlib
- NumPy
- FFmpeg (for video generation)
Install required packages:
pip install PyQt6 networkx matplotlib numpyInstall FFmpeg for video generation. On Windows, download from ffmpeg.org and add to system PATH.
Run the main application:
python main.pyFor standalone examples:
- London Tube visualization:
python least_congested.py - TSP visualization:
python Traveling_salesman.py - Basic algorithm examples:
python TSP.py
The application requires:
london_tube_crowding_data/directory with JSON files for each day of the weektiny.csvfile containing city coordinates for TSP problem
- Select an algorithm from the dropdown menu
- For London Tube: choose a day, starting station, and ending station
- Click "Search for Path" to find available routes
- Click "Visualize" to generate an animated video showing the algorithm in action
- Use playback controls to play, pause, stop, or replay the visualization