How would a robot or AI make a moral decision?

#artificialintelligence 

The first question is philosophical: a matter of moral theory. The second is technical: a matter of practical engineering. Philosophical analysis of the theoretical problem of practical action (moral theory) informs software design. Software design informs moral theory. As Lewin (1943) puts it: "There's nothing so practical as a good theory." My solution to the problem of right and wrong, succinctly stated, consists of five steps.