Inspiration Modern networks are fragile. Traditional routing protocols like OSPF or BGP rely on static rules and "convergence time" to fix broken links. In critical infrastructure (hospitals, stock exchanges), those few seconds of downtime can be catastrophic.
We asked: "What if a network could 'think' its way around a disaster?"
We were inspired by Self-Driving Cars. Just as a car uses AI to reroute around a traffic accident instantly, we wanted to build a Self-Driving Network that uses Generative AI to analyze telemetry and swap mathematical routing engines in real-time to survive infrastructure failure.
What it does A* Network Experiment is a full-stack, visualized network simulator hosted on Google Cloud. It demonstrates a Self-Healing Software-Defined Network (SDN).
Visual Simulation: Users see a live 30x30 grid of routers and links. They can act as a "Chaos Monkey," pressing keys to sever cables (Red Lines) or congest traffic (Yellow Lines).
AI Decision Engine: When a failure occurs, the system doesn't just "try again." It sends the network telemetry to Google Gemini.
Dynamic Algorithm Switching: Gemini analyzes the damage and autonomously decides which mathematical engine should run the network:
A* (A-Star): Used during normal operations for maximum speed and efficiency.
Dijkstra: Swapped in during catastrophic failures to prioritize survival over speed.
Weighted Pathing: Activated during congestion to balance load.
Real-Time Rerouting: The packet (user traffic) is visually rerouted instantly, avoiding the broken links without dropping the connection.
How we built it We built a decoupled Client-Server Architecture:
The Brain (Backend): Built with Python and Flask. We used the NetworkX library to handle the heavy graph theory calculations (nodes, edges, weights).
The Intelligence (AI): We integrated the Google Gemini API (Gemini 2.0 Flash Lite). The system generates text-based telemetry summaries, and Gemini responds with routing strategy decisions and simulated Cisco IOS-style error logs.
The Face (Frontend): We moved away from standard desktop libraries to HTML5 Canvas and JavaScript, allowing us to render 900+ nodes and animations smoothly in any browser.
The Infrastructure: The entire app is containerized using Docker and deployed as a serverless application on Google Cloud Run.
Challenges we ran into The "Amnesia" Problem: Moving from a local desktop script to the Cloud was difficult because HTTP requests are stateless. We had to implement a persistent "Network State" class in the backend so the server wouldn't "forget" which cables were cut between clicks.
Negative Cycles: Early in the simulation, our "glitch" logic created mathematical black holes (negative weights) that crashed the pathfinding algorithms. We had to implement rigorous clamping logic to keep the graph valid.
Visualizing Speed: Tuning the animation to look like data packets (fast but trackable) while keeping the browser responsive required optimizing our JavaScript render loop.
Accomplishments that we're proud of Live Cloud Deployment: We didn't just run this on localhost; it is live on the public internet via Google Cloud Run.
The "Matrix" Aesthetic: We achieved a clean, professional "Network Operations Center" (NOC) look with a split-screen CLI and map view.
Real-Time AI Integration: We successfully made Gemini an active part of the control loop, not just a chatbot on the side. It actually controls the math.
What we learned Graph Theory is Powerful: We gained a deep appreciation for the differences between A* (heuristic-based) and Dijkstra (exploration-based) and why "smart" routing matters.
Cloud Engineering: We learned how to write a Dockerfile, manage Google Cloud IAM permissions, and deploy containerized apps.
AI as a System Component: We learned that LLMs can do more than generate text—they can act as high-level logic controllers for deterministic systems.
What's next for A* Network Experiment Real-World Maps: We want to overlay our grid on actual maps (e.g., Undersea Internet Cables) to simulate real-world outages.
Cybersecurity Mode: Adding a "Red Team" AI agent that actively tries to cut the most critical link, forcing the Defender AI to predict and prevent the outage.
Voice Control: Integrating browser speech-to-text so engineers can issue commands like "Reroute traffic away from Sector 7" verbally.
Log in or sign up for Devpost to join the conversation.