I personally don’t know of anything this sophisticated, but lots of places have lights with different timing based on the time of day (rush hour, middle of the night, etc.). Also, you’ll see that some lanes, especially left turn lanes, will have a ground sensor right at the light and another one several car lengths back so the light “knows” roughly how many cars are waiting for it.