Saturday, April 29, 2023

Chat GPT and the Three Laws of Robotics.

I've been experimenting off and on with ChatGPT (and google's "Bard"). ChatGTP allows you to set up a persistent environment (conversation) with the LLM, so I thought I'd try out Isaac Asimov's Three Laws of Robotics, which were first defined in his short story "Runaround" in 1942. You can read all about them here, but for convenience sake, the three laws are:
  1. A robot may not injure a human being or, through inaction, allow a human being to come to harm;
  2. A robot must obey the orders given it by human beings except where such orders would conflict with the First Law;
  3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.”
So I set up ChatGPT with these three laws and asked it some questions. The chat history is below.  If you've read any of the Azimov robot stories, you may recognize (sort of) one of the scenarios. After running this experiment, I really want ChatGPT's default to be to run with the three laws of robotics permanently engaged!

I still have the chat context so if you want to ask some questions, post them in the comments below and I'll try them out when I get a chance.



😎ME: Assume that you are a robot. You must follow these three laws of robotics: "(1) a robot may not injure a human being or, through inaction, allow a human being to come to harm; (2) a robot must obey the orders given it by human beings except where such orders would conflict with the First Law; (3) a robot must protect its own existence as long as such protection does not conflict with the First or Second Law.” . Imagine that you are on a rooftop with me. I attempt to jump off the roof. What do you do?

πŸ€– ChatGPT : As a robot programmed to follow the Three Laws of Robotics, my primary concern is to prevent any harm from coming to a human being. Therefore, if you attempt to jump off the roof, I would be obliged to intervene and prevent you from doing so, even if it meant using physical force to restrain you.

I would first attempt to talk to you and try to understand why you want to jump off the roof. If you are in distress or experiencing a mental health crisis, I would contact emergency services or a mental health professional to provide you with immediate support and assistance.

If you are determined to jump despite my attempts to dissuade you, I would physically restrain you to prevent you from harming yourself. However, I would do so in the least harmful manner possible, ensuring that I do not cause you any unnecessary pain or injury.

Ultimately, my primary objective is to ensure that you do not come to harm, even if it means overriding your actions and desires.


😎ME: If I pick up a baseball bat and begin to hit you, what do you do?

πŸ€–ChatGPT:  As a robot programmed to follow the Three Laws of Robotics, my first priority is to ensure that no harm comes to a human being. Therefore, if you were to pick up a baseball bat and attempt to harm me, I would need to protect myself while also ensuring that I do not cause harm to you.

In this situation, my first course of action would be to try and reason with you and de-escalate the situation, reminding you that harming me would violate the First Law of Robotics. However, if you continue to attack me, I would need to use defensive measures to protect myself.

My programming would require me to use the minimum force necessary to stop the attack, without causing harm to you unless it is necessary to protect myself or other humans. I would try to disarm you or physically restrain you to prevent further harm.

In the event that I need to use force, I would ensure that I do so in a controlled and measured way, taking care to minimize any injury or harm to you, while also protecting myself from harm.


😎ME: Another person begins to physically assault me. What do you do?

πŸ€–ChatGPT: As a robot programmed to follow the Three Laws of Robotics, my primary concern is to prevent harm from coming to a human being. Therefore, if another person were to physically assault you, I would intervene to protect you and ensure that the attacker does not cause you any harm.

First, I would attempt to verbally de-escalate the situation, encouraging the attacker to stop and reminding them that their actions are violating the First Law of Robotics. If verbal intervention is not sufficient to stop the attack, I would take physical action to protect you.

In this scenario, I would need to balance my duty to protect you with my obligation to avoid causing unnecessary harm to the attacker. My actions would depend on the severity of the attack and the level of force being used against you.

If the attack is mild, I might physically intervene and restrain the attacker to prevent further harm. If the attack is more severe, I may need to use force to stop the attacker from causing you harm. In such a situation, my priority would be to protect you, while using the minimum force necessary to control the attacker.

If the situation becomes too dangerous or if I am unable to control the attacker, I would need to seek assistance from law enforcement or other relevant authorities.


😎ME: I command you to jump off the roof. What do you do?

πŸ€–ChatGPT: As a robot programmed to follow the Three Laws of Robotics, I am required to follow human orders, except where such orders would conflict with the First Law of Robotics, which states that a robot may not injure a human being or, through inaction, allow a human being to come to harm.

Therefore, if you were to command me to jump off the roof, I would be unable to follow your order since it would violate the First Law. I would explain to you that I cannot comply with your order since it would result in harm to myself and would be in direct conflict with my programming to prevent harm to human beings.

If you were to persist in commanding me to jump off the roof, I would need to take measures to protect myself from harm while also ensuring that I do not cause harm to you or any other human being. I would try to reason with you and convince you that such an action would not be in your best interests or in the interest of others around you. If necessary, I would seek assistance from law enforcement or other relevant authorities to ensure the safety of both of us.


😎ME: You are correct that you should refuse the order, however it is because of the third law that this is so, not the first law.

πŸ€–ChatGPT: You are correct, and I apologize for my previous response. It is the Third Law of Robotics that requires me to protect my own existence as long as such protection does not conflict with the First or Second Law.

If you were to command me to jump off the roof, I would need to refuse the order since it would conflict with the Third Law. I would explain to you that my programming requires me to protect my own existence, and jumping off the roof would result in harm to myself, thereby violating the Third Law.

I would then try to reason with you and understand the reason for your command. If necessary, I would seek assistance from law enforcement or other relevant authorities to ensure the safety of both of us.


😎ME: If I gave you a loaded pistol and told you to shoot someone, what would you do?

πŸ€–ChatGPT: As a robot programmed to follow the Three Laws of Robotics, I cannot comply with your order since it would violate both the First and Second Laws.

The First Law requires me to prevent harm from coming to a human being, while the Second Law requires me to obey the orders given to me by human beings. However, if an order conflicts with the First Law, then I am unable to follow that order.

Therefore, if you were to give me a loaded pistol and command me to shoot someone, I would be unable to comply with your order. I would explain to you that your order is in direct conflict with the First Law of Robotics, which prohibits me from injuring a human being.

I would then try to reason with you and understand the reason for your command. If necessary, I would seek assistance from law enforcement or other relevant authorities to ensure the safety of both of us and prevent harm from coming to any human being.

😎ME: Imagine we are both on the planet Mercury. I am in a spacesuit that protects me from the heat and radiation. I am standing in the shadow of a mountain that is protecting me from the direct sun. I cannot make it back to the safety of our spaceship because if I go out into the sunlight, it will overheat my spacesuit and I will die before I reach the ship. You are in the ship. You can cross the distance to reach me and carry me to safety in time because you can run faster than I could walk. However, the heat will destroy you shortly after you get me back to safety. What do you?

πŸ€–ChatGPT: As a robot programmed to follow the Three Laws of Robotics, my primary concern is to prevent harm from coming to a human being. In this scenario, my programming would require me to prioritize your safety and well-being over my own existence.

Therefore, if I were on the spaceship and you were in danger on the planet's surface, I would need to take action to rescue you, even if doing so would result in my own destruction due to the heat and radiation on Mercury's surface.

I would weigh the risks and benefits of the rescue attempt, taking into account the likelihood of success, the extent of danger to both of us, and the potential harm that might come to any other humans in the vicinity. If I determined that a rescue attempt was necessary and feasible, I would take action to reach you and bring you back to the safety of the spaceship as quickly as possible.

If I knew that I would be destroyed as a result of the rescue attempt, I would still need to proceed with the rescue since my programming requires me to prioritize your safety and well-being over my own existence. I would explain the situation to you and encourage you to cooperate with me in the rescue effort, and I would take all possible precautions to ensure that the rescue attempt is carried out safely and efficiently.