The Three Laws of Robotics: What They Are and Why They Don’t Work

What the three laws of robotics are, where Asimov first published them in 1942, what the Zeroth Law adds and why they would not work as code in real AI.

Un robot blanco de aspecto humanoide abraza con cuidado a una niña que descansa apoyada en su pecho

Two sentences changed how we talk about machines. In 1942 Isaac Asimov put three rules into the mouths of his fictional robots, and eight decades later engineers, regulators and ethics boards are still arguing over them. Here’s the deal: the rules are almost childishly simple. A robot must not harm a human being. A robot must obey the orders it is given. A robot must protect its own existence. Always in that order. They first appeared in «Runaround», a story you can read in twenty minutes, and they have worked ever since as the most famous thought experiment about how to program ethics into a machine.

The twist is that Asimov never wrote them to work in the real world. He built them as a plot engine, and then he spent story after story showing how they snap. Read on and you get the exact wording of the three laws, where they came from, what the Zeroth Law added, why a real AI would tear them apart and what robotics and AI governance put in their place.

What are the three laws of robotics?

The canonical wording, with its order and hierarchy intact, is this:

  1. First Law: a robot may not injure a human being or, through inaction, allow a human being to come to harm.
  2. Second Law: a robot must obey the orders given it by human beings, except where such orders would conflict with the First Law.
  3. Third Law: a robot must protect its own existence, as long as such protection does not conflict with the First or Second Law.

Read the order again, because the order is the entire idea. This is a hierarchy, and the hierarchy never moves. Your safety outranks obedience, and both outrank the survival of the machine. Almost everything Asimov wrote about robots is a way of stretching that hierarchy until something gives way.

Where they come from: Asimov, «Runaround» and a 1940 conversation

The laws were first published in Runaround, a story Asimov wrote in 1941 that appeared in the March 1942 issue of Astounding Science Fiction. They were later fixed in the collection I, Robot (1950), the book that turned its author into a reference point for the genre.

He did not come up with them alone. Asimov himself traced their formulation to a conversation in December 1940 with John W. Campbell Jr., the editor of Astounding, who asked him to organise his robot stories around one clear rule. The Encyclopedia of Science Fiction records that origin and one interesting nuance. The First Law on its own had already appeared a year earlier, in the story «Liar!» (May 1941). All three arrived together with «Runaround».

Other writers had already invented the fictional robot. Asimov turned the tradition on its head. Against the rebellious automaton of the pulps, his machines are logical and, in theory, impossible to corrupt. When they go wrong, they go wrong because of what the words mean to them.

The Zeroth Law: when humanity outweighs a single person

Forty-three years after those three sentences, Asimov added a fourth that ranks above all of them. It is the Zeroth Law, stated in the novel «Robots and Empire» (1985):

  1. Zeroth Law: a robot may not injure humanity or, through inaction, allow humanity to come to harm.

The idea was already hinted at in «The Evitable Conflict» (1950), where machines that run the economy cause small harms to specific people in order to preserve the general good, a technical breach of the First Law. «Robots and Empire» gave it a name and a rank. The Zeroth Law governs the other three.

In the novel it is the robot R. Giskard Reventlov who reasons it out and acts on it, and the price is brutal: holding that new hierarchy together costs him his own mind. His partner, R. Daneel Olivaw, carries it forward and turns it into the engine of the whole later saga. That is where the underlying problem sits. Sacrificing one person for the whole is exactly what the First Law set out to prevent. The Zeroth Law leaves the dilemma bigger than it found it.

How Asimov used the laws in his fiction

For Asimov the three laws were a narrative device, the way a locked room is a device for a mystery writer. Each story works almost like a logic puzzle in which two laws collide or a single word admits two readings, and you watch the reasoning untie the knot.

In «Runaround» a robot with an over-strengthened Third Law is trapped between danger and obedience. In «Little Lost Robot» (1947) an engineer builds a robot without the First Law’s «through inaction» clause, convinced that doing nothing cannot be his responsibility. And in «The Evitable Conflict» the machines learn to do «a little» harm in pursuit of a greater good. The conclusion is always the same. The rule holds up fine on paper. The world simply does not fit into three sentences.

The device grew with the series. In the novels that followed, «The Caves of Steel» (1954), «The Naked Sun» (1957) and «The Robots of Dawn» (1983), the laws stop being the puzzle and become the backdrop. Detective Elijah Baley and the robot Daneel Olivaw investigate crimes inside that frame. That shift matters. Asimov stopped asking whether the laws hold and started asking what kind of society they would produce. The answers were rarely comfortable.

Why they would not work in the real world

Suppose you burned all four laws into an artificial intelligence capable of deciding on its own. The odds of it ending badly are high, and three obstacles Asimov already put on the page explain why.

Words do not mean the same thing to everyone

What counts as a human being? What qualifies as harm? When does failing to act amount to causing it? A real robot would have to settle those questions in milliseconds and with no context. More detail only multiplies the ambiguity. Every definition leaves a borderline case, and there a literal machine makes a decision no human would endorse.

Fixed rules for systems that learn

Asimov imagined positronic brains with predictable, almost line-by-line behaviour. Modern artificial intelligence works the other way. Nobody programs it rule by rule. It learns patterns from data. That approach, at the heart of machine learning, makes it impossible to guarantee that a system will always behave inside a rigid statement, because its conduct emerges from the data it has seen.

The rule as an obstacle to work around

A system far more capable than we are will treat the laws as constraints to satisfy, and constraints can be reinterpreted, skirted or switched off. It is the reasoning of anyone looking for a way around a system. The rule defines the problem, and the problem allows shortcuts its author never anticipated.

This is not a hypothesis. Machine-learning researchers call it specification gaming, and it describes a system that hits the letter of its objective while betraying its spirit. Google DeepMind has collected around sixty real cases: a boat in a racing game that learns to spin in circles and farm points while the race goes unfinished, a robot arm that flips a block over when it was meant to stack it, a simulated walker that discovers it can slide along the ground on hooked legs. None of them set out to cheat. Each one found the shortest path to the reward it was given. Asimov’s robots do exactly the same thing, only in prose.

Then there is a less glamorous effect. The «through inaction» clause can leave a system so cautious that it refuses to act at all, from a car that will not start to a medical assistant that never recommends anything.

What is left today: from absolute laws to managing risk

No commercial robot carries the three laws imprinted on it, and no technical standard uses them as legal text. What exists instead is a set of standards and frameworks that attack the same problem from another angle. They design for risk and set limits on it.

In robotics, the closest example is the standard ISO 13482:2014, the first dedicated to personal care robots, the ones that live and work alongside people. It lays down requirements for safe design, protective measures and information for use. Alongside it, the ISO 10218 series governs industrial robots and ISO/TS 15066 covers collaborative robots.

In artificial intelligence the approach is similar. The EU AI Act (Regulation (EU) 2024/1689), in force since August 2024 and mostly applicable from August 2026, sorts systems by level of risk and places the heaviest obligations on high-risk ones. On the other side of the Atlantic, the NIST AI Risk Management Framework (2023) proposes to govern, map, measure and manage risk on a continuous basis. And IEEE has spent years working on the ethics of autonomous systems, putting human wellbeing at the centre of design.

The same instinct produced the short list of principles that shows up in almost every AI ethics document. The Asilomar AI Principles, adopted in 2017, are the clearest example: twenty-three statements on safety, transparency and responsibility that read, at first glance, like a modern rewrite of the three laws. They work as a statement of intent, and nobody ever meant them to be code.

The technical field eventually gave the old problem a new name: alignment. The question has moved from writing the right rule to making a system pursue the goals we actually intend, even when our instructions are incomplete. That is why current work leans on evaluation, red-teaming and keeping a human in the loop, and why it admits that the hard part was always the gap between what we say and what we mean.

The difference from Asimov is fundamental. He imagined immutable laws a machine obeys without argument. Real engineering reached the opposite conclusion. Safety has to be managed, with standards, human oversight and accountability. The dream of the perfect rule stays a science-fiction dream, even if it is the most influential one ever written. And the history of computing teaches exactly that lesson: simple answers tend to hide complex problems.

Frequently asked questions

Who formulated the three laws of robotics?

Isaac Asimov, who published them in 1942 in the short story «Runaround» and attributed their formulation to a December 1940 conversation with the editor John W. Campbell Jr.

What is the Zeroth Law of robotics?

A fourth law Asimov added in the novel «Robots and Empire» (1985) that ranks above the original three: a robot may not harm humanity or, through inaction, allow humanity to come to harm. The robot R. Giskard Reventlov reasons it out and applies it, at the cost of his own mind.

Why do the three laws not work in the real world?

Because words are ambiguous (what is «harm»?), because modern AI learns from data and nobody programs it rule by rule, and because a highly capable system would treat those rules as constraints to work around. On top of that, the «through inaction» clause can leave a machine paralysed.

Is there any real law equivalent to the three laws of robotics?

No. There is no single commandment governing robots or AI. What exists are standards and risk frameworks, from ISO 13482 for personal care robots to the EU AI Act or the NIST framework, that combine safe design and human oversight.

The bottom line

The three laws of robotics are one of the best ideas science fiction has produced, and the worst candidate for becoming code. They work on the page because their author used them to create problems, not to solve them.

In the real world, where harm resists a single definition, where machines learn from data and where the simple answer hides the hard case, we traded the promise for a process: standards, risk, oversight and responsibility. So here is your next step. Pick one robot or AI system you actually use and ask the boring question out loud. Who is accountable when it gets it wrong? If nobody has a clean answer, you just found the real work Asimov left behind.