A high-performance 3D maze simulation featuring multiple AI pathfinding algorithms, real-time OpenGL visualization, and multi-agent navigation.
Pathfinding is a fundamental challenge in robotics, game development, and autonomous systems. The 3D Maze-Space Arena provides an interactive platform for visualizing and comparing AI algorithms in real time. Whether you are a student learning about search algorithms, a researcher benchmarking navigation strategies, or a developer prototyping agent behavior, this project offers a hands-on environment to explore and experiment.
- 9 Pathfinding Algorithms: A*, BFS, DFS, Dijkstra, Greedy Best-First, IDS, Bidirectional Search, Beam Search, and Genetic Algorithm
- Real-Time 3D Visualization: Smooth OpenGL rendering with dynamic camera controls
- Multi-Agent Simulation: Deploy multiple agents simultaneously, each with configurable algorithms
- Environment Themes: Choose between Forest and Space scenes with distinct visual styles
- Performance Metrics: Compare algorithm efficiency with nodes explored, path length, and execution time
- Interactive Configuration: Adjust grid size, obstacle density, and agent settings through an intuitive UI
- Python 3.12 or higher
- OpenGL-compatible graphics driver
-
Clone the repository:
git clone https://github.com/osamahmada2024/3D-Maze-Space-Arena.git cd 3D-Maze-Space-Arena -
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
Launch the application and use the configuration panel to set up your simulation:
python app.pyExample workflow:
- Select an environment theme (Forest or Lava)
- Configure grid dimensions and obstacle density
- Add one or more agents and assign pathfinding algorithms
- Click Start Simulation to watch agents navigate the maze
- Review performance metrics in the results dashboard
Expected output:
The application opens a 1024x720 window displaying a 3D maze. Agents visualized as distinct models navigate from start to goal positions, with their paths rendered in real time.
| Algorithm | Time Complexity | Optimal | Best Use Case |
|---|---|---|---|
| A* | O(E) | Yes | Shortest path with heuristic guidance |
| BFS | O(V + E) | Yes | Unweighted shortest path |
| Dijkstra | O(E + V log V) | Yes | Weighted graphs |
| DFS | O(V + E) | No | Maze exploration |
| Greedy BFS | O(V) | No | Fast approximate paths |
| IDS | O(b^d) | Yes | Memory-constrained environments |
| Bidirectional | O(b^(d/2)) | Yes | Large search spaces |
| Beam Search | O(b * w) | No | Constrained memory search |
| Genetic | Variable | No | Dynamic or complex environments |
For detailed analysis, see Algorithm Comparison Report.
3D-Maze-Space-Arena/
├── app.py # Application entry point
├── ai_algorithms/ # Pathfinding algorithm implementations
├── core/ # Grid generation, agent logic, scene management
├── rendering/ # OpenGL rendering modules
├── ui/ # Menu manager and configuration panel
├── environments/ # Environment themes (Forest, Space)
├── assets/ # Textures and 3D models
└── config/ # Configuration files
- pygame 2.6.1 — Window management and input handling
- PyOpenGL 3.1.10 — 3D graphics rendering
- NumPy 1.26.4 — Numerical computations
- noise 1.2.2 — Procedural terrain generation
- Pillow 10.1.0 — Image processing
See requirements.txt for the complete list.
Current Version: v2.0.0
This project is licensed under the MIT License. See LICENSE for details.