I'm reminded of Isaac Asimov, who has built a whole range of stories on the 3 principles of robotics, with many situations arising where reality didn't match how the creators thought the robot should behave in a given situation.
It looks we are making a huge progress in that direction, with very similar problems arising.
It looks we are making a huge progress in that direction, with very similar problems arising.