The Adaptive Graph Search Suite is a high-performance, full-stack educational platform designed to visualize and analyze advanced graph traversal algorithms on realistic map topologies. At its core, the project utilizes a robust C++17 simulation engine capable of executing a wide array of classical algorithms, including Breadth-First Search, Depth-First Search, Dijkstra’s Algorithm, A* Heuristic Search, Greedy Best-First Search, Bellman-Ford, and the Floyd-Warshall algorithm. This low-level backend ensures highly optimized calculations, actively evaluating the time constraints, space complexities, and microsecond-level execution latency of paths mapping across thousands of nodes.
Bridging the native C++ engine is a lightweight Python web server that seamlessly coordinates backend-to-frontend communication. It also manages an onboard map generator that programmatically builds and serves complex JSON graph datasets themed around Indian contexts—such as the Mumbai-Pune Expressway, massive Delhi NCR road layouts, Bengaluru traffic hubs, and structured dimensional grids.
The user experience is anchored by a stunning, premium glassmorphism web interface built natively with HTML, CSS, and Vanilla JavaScript. As algorithms execute on the backend, the UI’s interactive HTML5 <canvas> parses the generated computation traces to vividly animate the step-by-step search process. The visualization engine incorporates silky-smooth mouse panning, dynamic zooming, adjustable playback speeds, and eye-catching neon glows that meticulously differentiate between the active search frontiers and the final deduced shortest path.
Ultimately, the Adaptive Graph Search Suite serves as a powerful, visually captivating bridge between theoretical computer science and practical software engineering, allowing users to tangibly watch and compare how algorithmic logic systematically conquers complex geographic networks.
The project is structured into three strictly decoupled layers, communicating seamlessly via structured JSON data pipelines:
- Core C++ Engine (
src/): Pure object-oriented C++ classes. Includes an abstractAlgorithminterface and aGraphclass storing data instd::unordered_mapand adjacency lists. Time measurements use<chrono>. Outputs rich trace metadata including Time/Space complexities. - API Bridge (
server.py): A dependency-free Python backend routing HTTP logic dynamically to the compiled C++ executable (subprocess.run()). It queriesdata/maps/structures and serves the frontend. - Visualization Client (
ui/): A reactive GUI utilizing native JS and the Canvas API. Includes pan/zoom capabilities, playback controls, and real-time complexity/latency performance data panels.
| Algorithm | Heuristic? | Time Complexity | Space Complexity | Use Case |
|---|---|---|---|---|
| Breadth-First (BFS) | No | Finding shortest paths on unweighted graphs. | ||
| Depth-First (DFS) | No | Exhaustive maze solving and topological sorting. | ||
| Dijkstra's Algorithm | No | Optimal shortest paths routing on weighted maps. | ||
| A Search (A-Star)* | Yes (Euclidean) | High-speed, directed mapping prioritizing the goal. | ||
| Greedy Best-First | Yes (Euclidean) | Extreme-speed mapping prioritizing proximity over perfect optimality. | ||
| Bellman-Ford Algorithm | No | Advanced routing capable of handling negative edge constraints. | ||
| Floyd-Warshall | No | All-pairs shortest path dynamic programming matrix solver. |
The repository includes a Python generator (bin/generate_maps.py) that proceduralizes Map architectures into scalable datasets. Current profiles include contextualized Indian topologies generated with underlying Minimum Spanning Trees to guarantee connectivity:
Mumbai_Pune_Expy(50 unstructured randomized nodes mapped to highway distances)Delhi_NCR(200 unstructured nodes simulating a major metropolitan area)Bengaluru_Traffic(400 unstructured nodes mimicking dense traffic grids)Indian_Grid(15x15 cartesian grid map for structured metric testing)Small_Campus(5x5 small lattice network for algorithm dry runs)
Data format: nodes.csv (id,x,y) and edges.csv (u,v,w)
This project strictly utilizes local standard libraries without bloat.
make clean && makeOutputs compiled binary to bin/adaptive_map.
python3 bin/generate_maps.pypython3 server.pyNavigate your browser to: http://127.0.0.1:9000/
- Interactive Canvas: Use Scroll Wheel to Zoom. Click and drag to Pan the camera around large networks.
- Search Engine: Select a map dataset, source node, target node, and algorithm.
- Execution: C++ executes the logic in roughly ~0.5ms. The UI then consumes the
trace.jsonto animate the engine's internal states. - Metrics Bar: Highlights Time/Space constraints theoretically, alongside actual microsecond latency retrieved via
<chrono>down at the bottom frame.
Initial Basic C Version Developed by: Adarsh Dwivedi
Advanced Upgrade Rewrite: Upgraded entirely to high-performance C++ by overriding raw structs with decoupled OOP, establishing complexity tracking, sealing new algorithms (Bellman, Floyd, Greedy), scaling contextual data ingest, and building a premium Glassmorphism rendering client.