system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do they program traffic lights? How do they coordinate a grid of traffic lights so traffic flows properly?
gpt
It used to take a *lot* of exhaustive studying of traffic patterns to keep traffic lights programmed properly to keep jams to a minimum; lights in this system have intervals that are set ahead of time.

These days lights are increasingly controlled by computers. For this, there are induction sensors buried under the road surface that can sense the presence of cars and then a controlling computer that changes the lights based upon road usage rather than at set times.

This method allows dynamic adjustment to traffic conditions, which reduces jams.