A Python project that simulates different routing algorithms on dynamic networks with visualization capabilities.
- Dynamic network simulation with changing topology
- Multiple routing algorithms:
- Dijkstra's algorithm
- Floyd-Warshall algorithm
- Q-learning reinforcement learning
- Deep Q-learning neural networks
- Real-time visualization (PyQt6 backend)
- Performance metrics tracking
- Easy-to-use interface for all skill levels
-
Install Python:
- Download from python.org
- Check "Add Python to PATH" during installation
-
Run the Simulation:
- Windows: Double-click
run_simulation.bat - Mac/Linux: Run
./run_simulation.shin terminal - Or simply:
python main.py
- Windows: Double-click
# Setup virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Run test simulation
python test_simulation.py
# Run custom simulation
python main.py --nodes 20 --packets 100 --algorithm qlearning --visualize| Parameter | Description | Default |
|---|---|---|
--nodes |
Number of nodes in network | 10 |
--packets |
Number of packets to simulate | 100 |
--algorithm |
Routing algorithm to use | dijkstra |
--visualize |
Enable real-time visualization | Off |
--max_steps |
Maximum simulation steps | 1000 |
Available algorithms: dijkstra, floyd, qlearning, deepq
network_final.png: Final visualization screenshotnetwork_step_*.png: Step-by-step screenshots (if visualization fails)
-
Visualization Issues:
- Try simpler test:
python test_simulation.py - Check console for error messages
- Screenshots are saved as fallback
- Try simpler test:
-
Missing Packages:
pip install -r requirements.txt
-
Need Help?
Contact: [Your Email/Contact Info]
├── network_simulation/ # Core simulation logic
├── routing_algorithms/ # Pathfinding implementations
├── reinforcement_learning/ # RL algorithms
├── visualization/ # PyQt6 visualization
├── main.py # Main entry point
├── test_simulation.py # Test script
├── run_simulation.* # Platform-specific run scripts
└── requirements.txt # Dependencies
MIT License