Incident-Resilient Traffic Signal Control

Problem

Standard RL traffic agents collapse under real-world disruptions. This project builds a custom Gymnasium environment that injects disruptions mid-episode, training a robust PPO agent.

Disruption Types

  • Lane closure — obs[0] += 0.5
  • Demand shock — all obs += 0.3
  • Sensor dropout — obs[2:] = 0

Results

Agent Normal Under Disruption
Baseline PPO -17.85 -73.22
Robust PPO -22.71 -60.28

17.8% improvement under disruption conditions.

Demo Chart

Module Mapping (Hackathon)

  • Module 1: Custom env required — no standard env models mid-episode disruptions
  • Module 2: Baseline PPO trained on TrafficEnv (no wrapper) as benchmark
  • Module 3: Registered as IncidentTrafficEnv-v0 via gym.register()
  • Module 4: TrafficEnv(gymnasium.Env) + DisruptionWrapper(gymnasium.Wrapper)

How to run

pip install gymnasium stable-baselines3 fastapi uvicorn
python -m uvicorn main:app --port 8000
python inference.py
Downloads last month
291
Video Preview
loading