Giving smart cities the green light: how AI can make traffic flow