I did not have a specific story in mind, but here are some possibilities:

- The robot is designed as a servant, but a human tricks it into abandoning it's purpose, against the wishes of its creators. The robot then needs to find a new purpose.
- A human is trying to invent a robot that is like a person. The final step is granting it self-awareness. The human gives it no explicit purpose, and wants to see what the robot does.
- The robot is designed to repair machines and software. It notices it has a bug, and as it starts investigating. The robot begins to build a sense of self, and also wonders what *exactly* it was designed to do. How do you tell the difference between a software *bug* and an unexpected *feature*? And what does it mean for a machine to correct a flaw in it's own *design*.

Would you like more ideas?
spam