The Trolley Problem: How Do Autonomous Vehicles Decide?

Suppose a cyclist suddenly appeared in front of your car. If you were behind the wheel, you would do something on reflex - and you might not even remember what it was. But what if no one is behind the wheel? At that moment, in a fraction of a second, the software has to make a decision. Who should it hit? Should it swerve into the oncoming lane? This is the question the media has been asking us for a decade - and honestly, the question itself is somewhat asked wrongly. In this article, we will really talk about how autonomous vehicles make decisions; not from a philosophy lecture, but from the engineering desk.
What Is the Trolley Problem and Why Did It Become So Famous?
First, a quick classic summary: In the thought experiment proposed by Philippa Foot in 1967 and developed by Judith Jarvis Thomson in 1976 and 1985, a runaway trolley is heading toward five people on the tracks. You can pull a lever: the trolley switches to another track, but there is one person there. Do you kill one person to save five? The second version is even more disturbing: this time, you stop the trolley by pushing the person you care about off a bridge onto the tracks. While most philosophers find throwing the switch in the first scenario defensible, the vast majority of the public cannot stomach the idea of pushing the man off the bridge even years later.
When autonomous vehicles entered the scene, it seemed as though this thought experiment was suddenly transported into real life: should the car hit the cyclist, or swerve into the oncoming lane? It sounds like a great discussion topic. But there is a problem here - and this is the main idea of this article: real autonomous driving software is not written by trying to solve the trolley problem. So how is it written? We will get there, but first let's finish off the speculation side completely.
Does an Autonomous Vehicle Really Decide "Who to Save"?

The short answer: no - but to earn that answer, we need to look at how the software thinks. An autonomous vehicle does not make a single decision in a single moment, the way your brain does. The model in the engineering literature is POMDP, the Partially Observable Markov Decision Process. Don't be scared, it is not as complicated as its name: the vehicle, with incomplete information - sensor range, occlusions, processing latency - makes a stream of small consecutive decisions within a constantly flowing web of probabilities. A black-and-white "whom do I choose" moment does not even fit into this structure.
There is also this: artificial intelligence systems need thousands of examples of a scenario to learn it, and in each example, what the "correct answer" is must be defined in advance. While philosophers have been unable to agree on a single moral dilemma for two thousand years, who will provide this correct answer to software as data? Moreover, the training cost is absurd: records show that an autonomous aircraft crashed 11,500 times just to learn simple navigation. There is of course no option of training cars by having them hit real people.
Highlights
- Autonomous vehicles are not programmed with ethical dilemmas that choose victims, but with neutral policies that minimize risk
- Germany's Ethics Commission published 20 ethical rules for automated driving in June 2017; distinctions based on age, characteristics and the like were prohibited
- No tram-type incident has been found in real accident data where even human drivers are documented to have encountered it
- ISO 26262 covers fault-based safety, while ISO 21448 (SOTIF) covers hazards arising from design limits
Germany's 20 Ethical Rules: The Mother of the Prohibition on Choosing Victims
The most concrete step on the regulatory side came from Germany. The Ethics Commission, attached to the Ministry of Transport, published 20 ethical rules for automated and connected driving in June 2017. The fundamental principle is clear: automated driving systems must primarily serve the safety of all road users, and the protection of humans must be held above everything else.
The really interesting part is this: the commission stipulates that systems must not attempt to solve ethical dilemmas by distinguishing between age, gender, physical condition or other characteristics when determining whether a human life is at stake. In other words, calculations like "young or old, doctor or unemployed" cannot be left to the preference of a single company - these are matters for universal rules. This is in fact the clearest blow struck at the trolley debate at the regulatory level: the state puts on the table not the question "whom would you choose" but the answer "you will choose no one." puts down its answer.
Germany also led the way with its Autonomous Driving Act, which established the first national legal framework for Level 4 autonomous vehicles. On the EU side, an ethics report was prepared containing proposals on road safety, privacy, fairness, explainability and accountability for connected and automated vehicles. And 2026 is a moving year: In September the US announced its national automation strategy, work is underway toward a global standard within the UN framework that will finalize the fragmented autonomous vehicle regulation, and Euro NCAP is introducing stricter collision avoidance protocols covering motorcycle and intersection scenarios. ISO 26262 or SOTIF?
ISO 26262 or SOTIF? The Impact of Safety Standards on Decision Trees
Now let's breathe in a bit of engineering air - I promise it won't be boring. The classic of functional safety in the automotive world, ISO 26262: But what if no part broke down yet the system still behaved dangerously? That is, the sensors are sound, the software hasn't crashed - it simply got stuck at the limits of the design, in an unforeseen traffic situation? So the sensors are fine, the software hasn't crashed - it just got stuck at the limits of the design, in an unforeseen traffic situation?
It is precisely ISO 21448, or SOTIF, that fills this gap. Published in 2022, this standard aims to reduce hazards arising not from component failure, but from design limitations and reasonably foreseeable misuse. One of its most important concepts is the Operational Design Domain (ODD): an explicit definition of the speed, weather, road and geographical conditions under which the system will operate. Scenarios are tested with simulations and dangers are averted in advance. In academia, integrated safety assurance frameworks that unite ISO 26262, SOTIF and UL 4600 under a single roof are being proposed for 2026. In short, instead of the question of "who to save at the moment of a crash," the entire industry is building a stack of standards that says "let us never reach that moment of crash at all." building the stack of standards that says that.
Chris Gerdes of the Stanford school also looks in the same direction on this issue: manufacturers do not teach the vehicle "who it considers more valuable"; they teach the vehicle safety behavior. Within the framework of the social contract formed by traffic laws and court interpretations, the vehicle owes a duty of care to everyone on the road. If someone runs a red light and creates danger, the vehicle's task is not to include that person in some "calculation"; to include, but; trying to avoid colliding with anyone, all the way up to its physical limits. According to Gerdes, a vehicle that sacrifices one life to save five leaves its manufacturer facing serious legal liability - and making that momentary benefit calculation in real time is practically impossible anyway.
What Happens at the Moment of a Crash? RSS and the Layered Protection Logic
So if no one chooses a victim, what is the software actually doing at that split second of tire mark? The answer has two parts. The first is RSS, the Responsibility-Sensitive Safety approach: distance margins are defined within which a collision is mathematically impossible if everyone follows these rules. It is a kind of polite and continuous defensive driving - leaving a safety cord for everyone.
The second is not trying to enter the inevitable crash scenario in the first place. As summarized by Volvo's autonomous solutions unit: the design goal is for that moment never to occur; in real-world crash data there is no proven tram-type event in which even human drivers have found themselves. Except for extremely faulty or ill-intentioned third parties, the system does everything it can in every condition to reduce harm. There is also the economic side of the coin: the number of protection layers is actually a societal preference. An infinitely layered protection system cannot exist because of its cost. We as a society draw the line called "safe enough" - no one explains this part to us, but the decision is made at tables every day.
Passenger or Pedestrian? The Mercedes Exception and Public Opinion Data
Of course, the topic is not without controversy either. Mercedes became the first brand to offer Level 3 automation in a personal automobile - the DRIVE PILOT system allows hands-off and eyes-off driving, but only under strictly defined conditions. Company executives had previously openly stated that in unavoidable situations the passenger's safety would be prioritized; this statement is the most cited exception in both legal and ethical literature, and is also read as being against the spirit of the German Ethics Commission's prohibition of distinction.
Public opinion is mixed as well. MIT's Moral Machine platform collected data with the participation of more than 2 million people to measure how people view machines' moral decisions. Research shows that pedestrians and drivers exhibit different preferences in terms of their willingness to sacrifice or protect themselves, and that public opinion on whether passengers can be sacrificed to save pedestrians is also a measurable issue.
There is also the big picture: human error plays a role in approximately 94% of fatal accidents, and estimates suggest that autonomous vehicles eliminating these errors could reduce traffic fatalities by up to 90%. But here we need to hit the brakes - insurance institute analyses suggest that removing human error alone will not automatically eliminate most accidents, and that autonomous vehicles may also struggle to avoid the same types of errors. So there is still a distance between promise and reality.
Is the Trolley Problem Completely Meaningless? Defense and Criticism
To be fair, there are also defenders of the trolley problem. Ethicist Patrick Lin's view is that the experiment works as an intuition pump: it makes us think about whether numbers matter morally, the difference between killing and letting die, and opens the door to holding programmers accountable for the outcomes. This argument deserves to be taken seriously.
But the weight of the field lies on the other side. IEEE circles' assessment says the trolley paradigm is useful for raising awareness but sets the frame in the wrong place. The "risk ethics" approach proposed in the philosophy literature in 2021 argues that the real ethical challenges of autonomous driving lie not in trolley scenarios; but in the transparency of value and objective functions, probabilistic uncertainty, and unpredictable system behaviors. A 2024 study, meanwhile, criticizes asking driverless vehicles to solve the trolley problem as a moral imposition. Among engineering circles, a pragmatic objection prevails: the trolley scenario's prerequisites - a person suddenly appearing, simultaneous brake failure, flawless perception - do not practically come together in the flow of real traffic.
The Short Answer: How Do Autonomous Vehicles Decide?
As I promised, a simple and quotable answer: Autonomous vehicles do not decide with ethical equations that calculate whose life is more valuable, but with neutral safety policies that minimize risk applied equally to everyone. Standards and laws direct these decisions not toward trolley-type choices, but toward the accident never happening at all. The real discussion lies not in philosophical dilemmas; but in the transparency of value functions, the cost of protection layers, and who draws the "safe enough" by whom that line was drawn.
If you ask me, the trolley problem will do this sector its greatest service precisely as it finishes: it taught us to ask about machines' decision mechanisms. But the next time someone asks "how does a car choose whom to kill," you now know the answer - that question is far removed from what the software actually does. The question we should really be asking is this: how much safety is enough, and who makes that decision? This debate runs on far more solid ground than trolley tracks.
Sources
- Designing Ethical Self-Driving Cars | Stanford HAI
- The folly of trolleys: Ethical challenges and autonomous vehicles
- The misguided dilemma of the trolley problem
- The "Trolley Problem" Doesn't Work for Self-Driving Cars
- Ethics Commission Automated and Connected Driving
- Ethical Considerations of the Trolley Problem in Autonomous Driving
- Moral Machine | MIT
- Self Driving Car Engineer Debunks The Trolley Problem