There’s an urgent need to study how artificial intelligence makes ethical choices because it soon will make many such decisions in our stead, says computer scientist Iyad Rahwan