# Is it possible to implement Asimov's Three Laws of Robotics?

Artificial Intelligence Asked by Mithical on November 30, 2020

Would it be possible to put Asimov’s three Laws of Robotics into an AI?

The three laws are:

1. A robot (or, more accurately, an AI) cannot harm a human being, or through inaction allow a human being to be harmed1

2. A robot must listen to instructions given to it by a human, as long as that does not conflict with the first law.

3. A robot must protect its own existence, if that does not conflict with the first two laws.

I think this is almost a trick question in a sense. Let me explain:

For law 1, any AI would abide by the first rule unless it was deliberately created to be malevolent, in that the AI it would understand harm was imminent but do nothing about or would actively attempt to harm. Any 'reasonable' AI would (try its best to) prevent any harm it understood, but couldn't react to imminent harm 'outside it's knowledge', thus satisfying law 1. Any AI that 'tries its best' to prevent harm works here.

For law 2, it is simply a matter of design. If one can design an AI capable of parsing and understanding the entirety of human language (beyond just speech), just program it to act accordingly, mindful of the first law. Thus, I think we can develop an AI that will obey every command it understands but getting it to understand anything and everything I believe is impossible.

For law 3, it rides in the same vein as law 1.

In conclusion, I think there is no philosophical problem with implementing such an AI, but that the actual design of such an AI is fundamentally impossible (understanding all possible harms, and all possible commands).

Answered by Avik Mohan on November 30, 2020

Defining "harm" and in particular, "allowing harm via inaction" in any meaningful way would be difficult. For example, should robots spend all their time flying around attempting to prevent humans from inhaling passive smoke or petrol fumes?

In addition, the interpretation of 'conflict' (in either rule 2 or 3) is completely open-ended. Resolving such conflicts seems to me to be "AI complete" in general.

Humans have quite good mechanisms (both behavioral and social) for interacting in a complex world (mostly) without harming one another, but these are perhaps not so easily codified. The complex set of legal rules that sit on top of this (polution regulations etc) are the ones that we could most easily program, but they are really quite specialised relative to the underlying physiological and social 'rules'.

EDIT: From other comments, it seems worth distinguishing between 'all possible harm' and 'all the kinds of harm that humans routinely anticipate'. There seems to be consensus that 'all possible harm' is a non-starter, which still leaves the hard (IMO, AI-complete) task of equaling human ability to predict harm.

Even if we can do that, if we are to treat as actual laws, then we would still need a formal mechanism for conflict resolution (e.g. "Robot, I will commit suicide unless you punch that man").

Answered by NietzscheanAI on November 30, 2020

The most challenging part is this section of the first law:

or through inaction allow a human being to be harmed

Humans manage to injure themselves unintentionally in all kinds of ways all the time. A robot strictly following that law would have to spend all its time saving people from their own clumsiness and would probably never get any useful work done. An AI unable to physically move wouldn't have to run around, but it would still have to think of ways to stop all accidents it could imagine.

Anyway, fully implementing those laws would require very advanced recognition and cognition. (How do you know that industrial machine over there is about to let off a cloud of burning hot steam onto that child who wandered into the factory?) Figuring out whether a human would end up harmed after a given action through some sequence of events becomes an exceptionally challenging problem very quickly.

Answered by Ben N on November 30, 2020

## Related Questions

### Can GANs be used to generate something other than images?

1  Asked on November 24, 2021

### What should the output of a neural network that needs to classify in an unsupervised fashion XOR data be?

1  Asked on November 20, 2021

### Choosing a policy improvement algorithm for a continuing problem with continuous action and state-space

1  Asked on November 20, 2021

### Why is the policy loss the mean of $-Q(s, mu(s))$ in the DDPG algorithm?

1  Asked on November 17, 2021 by dhanush-giriyan

### Are tabular reinforcement learning methods obsolete (or getting obsolete)?

1  Asked on November 12, 2021

### How do I test an LSTM-based reinforcement learning model using any Atari games in OpenAI gym?

1  Asked on November 10, 2021

### How does the target network in double DQNs find the maximum Q value for each action?

1  Asked on November 7, 2021

### Understanding the loss function in deep Q-learning

2  Asked on November 4, 2021

### Is a reward given at every step or only given when the RL agent fails or succeeds?

1  Asked on November 4, 2021

### Ways to keep up with the latest developments in Machine Learning and AI?

0  Asked on November 4, 2021 by tinu

### What is the expectation of an empirical model in model based RL?

1  Asked on November 4, 2021 by ijuneja

### How can I change observation states’ values in OpenAI gym’s cartpole environment?

1  Asked on August 24, 2021 by kashan

### What does the term $|mathcal{A}(s)|$ mean in the $epsilon$-greedy policy?

1  Asked on August 24, 2021 by metrician

### Do the order of the features ie channel matter for a 1d convolutional network?

1  Asked on August 24, 2021 by user289602

### What is convergence analysis, and why is it needed in reinforcement learning?

1  Asked on August 24, 2021 by daniel-koh

### Correct dimensionality of parameter vector for solving an MRP with linear function approximation?

0  Asked on August 24, 2021 by soitgoes

### How can I convert a simple CLI RPG to a compatible environment for training an RL agent via stable-baselines?

0  Asked on August 24, 2021 by seunosiko

### What is the amount of test data needed to evaluate a CNN?

0  Asked on August 24, 2021 by user38639

### What is the Turing test?

2  Asked on August 24, 2021