Choose the best traffic lights to avoid collision on the road