Artificial intelligence has the potential to make lives easier by understanding human desires or driving people's cars, but if it were uncontrolled, the technology could pose a serious threat to society.