How robots can learn to follow a moral code.pdf