Machine learning-based optimization of traffic light programs has been successfully employed to reduce emissions and traffic delays. Due to the variability of traffic flows, it is common practice to optimize multiple traffic light programs tailored for specific conditions and deploy them at predetermined times of the day or days of the week. We explore an alternative to this manual set-interval methodology. We create a system to automatically select the appropriate light controller program in response to continuously changing conditions. We analyze the current traffic density and close-time traffic patterns and instantiate the correct pre-optimized light program based on current conditions. Rather than creating a small set of programs tailored for specific periods of the day, we automatically create, and select from, an over-complete set of light controllers. Based on historic observations, a combination of machine learning approaches are used to find the best representative set of traffic flows to model the system. From these, multiple traffic-light controllers are created to address each flow individually. Using the automated matching system, we achieved reductions in both emissions and travel time over previously optimized lights. We examine the robustness of the system by ensuring that the system operates under large amounts of variability in traffic.