In Isaac Asimov's short story "Runaround," the robot Speedy (SPD 13) is acting very strange because it is experiencing a conflict between the second and third laws of robotics. The Second Law of Robotics states that a robot must follow a human's orders (unless that order is to harm another human, through either action or inaction, which would violate the First Law of Robotics). The Third Law of Robotics dictates that a robot must not do anything to jeopardize its own safety unless that would conflict with the first two laws.
Speedy has been ordered to collect selenium. This is a very dangerous task that normally would violate the third law. However, because Speedy is a very expensive unit, the Third Law has been strengthened in its case. Since the order to collect selenium was given in such a casual manner, Speedy is stuck somewhere between the last two laws. Because Speedy cannot risk its safety in the selenium pool and cannot fail to follow a human's orders, it finds itself going in circles and acting sort of drunk. In the end, Powell puts himself in danger by running out into the sunlight. He hopes that this would invoke the First Law of Robotics and snap Speedy out of its internal conflict.