Artificial Intelligence (AI) will revolutionise medicine, and help to combat climate change. But it also threatens to usher in a new age of automated drone warfare. With smart machines poised to take more decisions out of our hands, how can we ensure these decisions are ethical, moral, and in our interest? Paul Barclay talks to Professor Toby Walsh.