How AI is helping to prevent three buses turning up at once