Practical guides to AI, computing, modelling, simulation, optimization and quantum computing, featuring hands-on tutorials, experiments and research.

The Trolley Problem for Self-Driving Cars: How Should AI Decide?

A self-driving car should not be programmed to solve a philosophical puzzle at the last second. Its safety system should reduce the chance of reaching an unavoidable crash, obey clear constraints, and choose the action expected to cause the least harm when no safe option remains. That sounds straightforward, but uncertainty about people, objects, road conditions and vehicle dynamics makes the real problem far harder than the classic trolley thought experiment.

What is the trolley problem?

The traditional trolley problem asks whether someone should divert a runaway trolley from a track where it will kill several people onto another track where it will kill one. It contrasts two uncomfortable choices: allowing harm through inaction or deliberately intervening and causing a smaller harm.

Applied to autonomous vehicles, the scenario is often framed as a car choosing between striking a pedestrian, endangering its passengers or swerving toward another road user. This framing is useful for discussing values, but it can also create the misleading impression that a vehicle neatly identifies every possible outcome and then makes a human-like moral judgement.

Why the real driving problem is different

Road emergencies do not arrive with labelled tracks and known consequences. An automated driving system has to infer what is happening from cameras, radar, maps and other sensors. A shape may be partly hidden. A pedestrian may stop or change direction. The road may be wet. Braking and steering outcomes depend on speed, tyre grip and the behaviour of nearby drivers.

  • Perception is uncertain: the system may not know exactly what an object is or how it will move.
  • Predictions are probabilistic: several futures may be possible rather than one guaranteed outcome.
  • Actions have physical limits: a car cannot stop instantly or change direction without creating new risks.
  • Decisions affect many people: passengers, pedestrians, cyclists and occupants of other vehicles may all be involved.

Consequently, engineers are dealing with risk management under uncertainty—not a clean choice between two predetermined casualties.

How should a self-driving car decide?

A defensible approach starts with prevention. The vehicle should maintain safe following distances, monitor hazards, respect an appropriate speed and preserve room to brake. If danger develops, it should respond early instead of waiting until only harmful choices remain.

During an emergency, the system should operate within tested safety constraints: brake hard when appropriate, remain stable, avoid deliberately targeting any person, and minimise the expected severity of harm using the information available. It should not assign a person’s life a different value based on age, occupation, wealth or social status.

This does not produce a perfect moral answer. It produces behaviour that engineers can specify, test and audit. That distinction matters because safety-critical software needs consistent rules and measurable performance, not an improvised philosophical judgement hidden inside an opaque model.

Who is responsible for the decision?

The vehicle is only the final actor in a much larger system. Manufacturers decide its safety objectives. Engineers implement and validate them. Regulators establish minimum requirements. Insurers and courts determine how responsibility is allocated after failures. Road authorities also shape risk through infrastructure, signs and traffic rules.

Ethical choices therefore should not be left to an individual programmer or silently embedded in an algorithm. They require public rules, transparent testing and clear accountability. Investigators also need reliable records of what the system detected, predicted and commanded before a collision.

The more useful question

The dramatic question is, “Whom should the car sacrifice?” The more useful question is, “How can the entire transport system prevent serious crashes, respond consistently when prevention fails, and demonstrate that its decisions were reasonable?”

The trolley problem remains valuable because it reveals that autonomous driving is not purely technical. Values enter through definitions of acceptable risk, priorities during emergencies and decisions about accountability. But safer roads will come less from finding one clever answer to the thought experiment and more from cautious driving policies, rigorous validation, transparent standards and continuous learning from real incidents.

Further reading

The original post pointed to Gizmodo’s discussion, “How Would a Self-Driving Car Handle the Trolley Problem?” It is a useful starting point for thinking about why robot ethics becomes difficult when abstract choices meet uncertain roads.

Comments

Leave a comment