Introduction
Traffic Signal Control (TSC) is a classic optimization problem aimed at minimizing commute times and emissions. While Deep Reinforcement Learning (DRL) has shown promise in simulations, real-world adoption is hindered by three major hurdles: the "black-box" nature of neural networks, the extreme resource constraints of edge-deployed microcontrollers, and the poor generalization of models across different urban layouts.
To address these, we introduce $\pi$-Light, a programmatic reinforcement learning framework. Instead of training neural weights, $\pi$-Light searches for optimal control policies expressed as human-readable programs within a Domain Specific Language (DSL).
Methodology
The core of $\pi$-Light is the discovery of a programmatic policy that calculates priority values for traffic phases. The system uses a DSL composed of basic logic (e.g., if-then-else) and traffic-specific features like InLaneVehicleCount.
The search process utilizes Monte Carlo Tree Search (MCTS) to navigate the discrete space of program structures. Once a promising structure is identified, Bayesian Optimization is applied to fine-tune numerical constants within the logic. This dual-optimization approach ensures both structural effectiveness and numerical precision.
Experimental Setup
We evaluated $\pi$-Light using the CityFlow simulator across six real-world road networks: Hangzhou (1 & 2), Manhattan, Atlanta, Jinan, and Los Angeles. These networks represent a mix of regular grids and heterogeneous, irregular intersections. Performance was measured primarily by average vehicle travel time and throughput.
Results and Discussion
$\pi$-Light outperformed state-of-the-art DRL baselines (such as MPLight and FRAP) in five out of six environments. Notably, in complex networks like Los Angeles, it achieved significant reductions in travel time compared to the most efficient DRL alternatives.
Key Insights
- The Pareto Frontier: As illustrated in the performance-resource trade-off, $\pi$-Light provides high-tier performance with a memory and computational footprint orders of magnitude smaller than DRL models. This allows deployment on standard 8-bit or 16-bit microcontrollers (e.g., ATmega328P).
- Robust Generalization: Unlike DRL models that often fail when transferred to new cities, $\pi$-Light's programmatic nature acts as a regularizer. A policy learned in Manhattan can be deployed "zero-shot" in Los Angeles, maintaining superior performance without retraining.
- Interpretability: The output is a simple script that traffic engineers can audit, verify, and manually adjust, bridging the gap between automated optimization and human-in-the-loop safety requirements.
Conclusion
$\pi$-Light demonstrates that programmatic RL can overcome the primary barriers to real-world traffic signal control deployment. By combining the search capabilities of MCTS with the interpretability of a DSL, it offers a solution that is efficient, robust, and transparent. Future work will focus on expanding the DSL to capture more complex feature interactions and improving multi-agent coordination.
Summary updated