# Can quantum computer fixes the trolley problem?

Set in the immediate future.

Trolley problem happens when the decision we are making turns into a nightmare situation, we are forced into considering the lesser of the evils but should we justify how much each human live is worth...

Imagine a man is ferrying his 2 children on a bridge and a truck suddenly turns turle in front of his car, he can only turn left or right to avoid a head on collision and stopping in time isn't possible. If he choose turning left he will surely crash onto a motorcyclist along with his pinion and turning right will force his car to hit the railing and endanger the pedestrian who is leisurely enjoying the scenery on the footpath.

Either way his lawyer could make claims that the defendant can't see the motorbike which was in the blind spot or he has lost control of his car while hitting the poor bystander, as long as he can prove that the brain motor function can't react fast enough to the overwhelming information while the tragic is in the making. Thus all the faults point to the truck that turns turtle!

Now picture a robot in his shoe, damn it next day news article headline says robot is uprising. Since it can process vast information quickly and reliably we assume it has chosen to crash into the motorbike instead of the 2 children or the pedestrian. It understands this society is more empathic towards the vulnerable and if it had crashed onto the pedestrian it is a murder case which is much more severe than homicide.

Now then if we can apply quantum mechanics particularly the uncertainty principle to produce true randomness instead of relying on super elaborated calculations to generate a pseudo random number at least to our feeble mind understanding.

I am wondering can this true randomness solved the trolley problem at least it mitigate the severity of the offence from out right murder to culpable homicide or even negligence? I think that modifying the modus operandi to save lives by invoking true randomness at least should have resolved the legal liability of the trolley problem right?

• What is the worldbuilding problem here? It is a well known and unsolved problem in artificial intelligence
– L.Dutch
Jan 8 at 7:57
• Related: moral machine - click "Start Judging" to make a whole test made up of trolley problems from the perspective of a self-driving car. Interesting if a little morbid exercise.
– VLAZ
Jan 8 at 8:10
• Anyway, I am not sure one can really claim that a robot has enough processing capacity to choose a collision and the subsequent victims. The company lawyer can very well claim that the machine didn't have possibility to do anything due to extreme circumstances. Very similar to how a human cannot react to the situation adequately. Yes, a robot might have the capability to handle the crash better but it's certainly not foolproof - AI might also be unable to cope.
– VLAZ
Jan 8 at 8:15
• We can generate sufficiently good pseudorandom numbers without any "complex calculations"; on a laptop, that would be hundreds of millions of such number per second. We also know how to generate exceptionally good, cryptographic quality random numbers; of course, at lower speed. On the other hand, I don't see why random numbers would be needed in the given scenario; the automatic driver will do what it was taught to do. What it is taught to do will have of course been thoroughly vetted with the legal department. No quantum computers needed. Jan 8 at 8:17
• The "trolley problem" isn't an actual problem, it's just a thought experiment designed to probe someone's ethics. There is no "right" or "wrong" answer to the trolley "problem", just potential answers. Jan 8 at 11:18

Before I answer this I'm going to point something out.

Humans suck at randomness. If I put some of my friends on the spot and ask them for a random number 1-10 I can predict with 95% certainty what number they're going to choose. They're subconsciously biased. Even humans trying their hardest to not be biased fall foul of the mathematics of randomness (see Benfords Law, for example. The distribution of first digits in lists of random numbers is not as simple as you might first assume). If put on the spot and asked to solve the trolley problem a human being will likely choose one option over the other every time. This comes from a complex confluence of their memories, biases, training, emotional state, physical state, etc etc etc... Machines on the other hand are really good at randomness. Even Psuedorandom number generators are good enough that you could use a single stream of numbers generated from a single seed for a lifetime and never start repeating or see a pattern.

The point being: Randomness does not help humans in court. Being able to justify their actions (one way or another) does. Even if it's provable that the driver had time to make a conscious choice a jury would still accept 'I had to pick one or the other' as a defence regardless of why they chose one or the other. If the driver distinctly says something like 'I hate those damn motorcyclists and wish they would all die', that might colour things a bit, but for the most part a group of humans will be able to understand why another human would choose one over the other in the heat of the moment, and they can easily be convinced (even without hard numbers) that it was actually a trolley problem. They don't expect true randomness. They expect reasonable actions.

Now: On to the machine.

Random numbers are already used extensively in machine learning. The reasons why vary from method to method, but randomness is something that comes up a lot. It's easy to think of machine learning as a decision tree (if X>Y, do A. else if Y>Z, do B, else if ...). Often this is the result of a machine learning algorithm (for example the xgboost algorithm produces a decision tree), but for something as complex as driving a car it is guaranteed to Not Be That Simple. The trouble with this is that the more complex the algorithm the less transparent it becomes. Transparency (The ability to inspect the machine learning and understand it's choices) is a difficult thing to achieve. There are many papers on how to manage it in a variety of cases, but sometimes it's just impossible to produce a chain of reasoning a human would find compelling. If the machine learning can produce all the telemetry leading up to the accident it should be (relatively) simple for a human accident investigator to confirm that it was a trolley problem and no non-fatal solution existed. From there it's just a question of why the machine chose one or the other.

We might accept 'There was a 10.9% chance of reduced property damage if the pedestrian was hit'. It's a dispassionate line of reasoning, but at least it's there. What we wouldn't necessarily be able to accept is 'Tree 1 split 3,4,6,7 supports option A, Tree 2 split 1,2,4 supports ... Tree 19785 split 7,2 supports option B. 18567 trees support option A. Option A chosen.' (Pseudo output from a Random Forest decision algorithm). Interpreting such outputs is a job best left to the experts, who can use statistics and machine learning expertise to boil what might be an incredibly complex (and often partially randomly created) line of reasoning down to something humans can understand.

Of course, there's every chance that the actual choice was purely down to the state of the machine learning and no strong chain of logic. The machine has learned from whatever training problems it was given, and that's that. In that case the testimony of an expert saying 'This is just the way the machine learned, but there was no option that saved lives' should be sufficient. There may already be randomness in the machine learning steps. Neural nets (for example) are initialised in random states to allow the optimisation algorithms to work properly, so one Neural net might make a subtly different choice to another. Adding an extra layer of randomness to this choice doesn't help.

Now: As for who would be liable and for what crime: That's a very active area of discussion at the moment. Tesla currently get around it by saying that the human driver should always be attentive and able to prevent accidents. As things get more automated this may change.

But whatever happens with that adding more randomness isn't a solution to the trolley problem. It was an accident. Someone died. No amount of dice rolling will change that.

• You can predict their number with 95% confidence? I know that humans have a bias towards 7 but as far as I know it is not nearly that strong. Jan 8 at 11:39
• "If I put some of my friends on the spot and ask them for a random number 1-10 I can predict with 95% certainty what number they're going to choose." you can also do it with a random person, not even a friend. Although with much less certainty. Apparently, the number 7 shows up a lot when asking for a random number. Disproportionately more than any other ones, for example 30+% of responses. This might be cultural to some extent, though but responses are definitely not uniformly distributed: 1 and 10 get chosen a lot less - each might have about 5% of the responses.
– VLAZ
Jan 8 at 11:43
• @MartinvanIJcken I think the point there was for friends. I can also probably get a better prediction rating on friends than strangers.
– VLAZ
Jan 8 at 11:45
• @VLAZ 3 and 7. Guess which numbers often appear in religious texts? That said, 95% chance seems way too high even for a 50/50 chance that its 3 or 7. Jan 8 at 12:55
• @VLAZ my point is your way. It is a small indicator that no matter if you believe the texts to be from god or not, in the end humans wrote them down and the "regular" numbers of 3 and 7 pop up a lot in them because of that. Jan 8 at 13:10

### "Heads Alice is killed. Tails Bob is killed" is still murder regardless of the fairness of the coin toss, or any other properties of the randomness.

The trolley problem as I understand it is: "Do nothing - large death toll but no culpability. Do an action, smaller death toll, but your action makes you culpable." Big negligent death toll, or small murder death toll.

The choice between the two is ideally one of morals and values. (My answer from the comfort of home is "don't intentionally kill anyone, even if I believe that turns out worse, who am I to play god", but who knows what will happen in the heat of the moment).

If that moral choice is replaced by a random number generator you don't save any culpability. I actually believe you make it worse, as you've basically written kill code for both choices.

Eg, your smart car will have code that could be simplified down to

if (random()): kill(person1)
else: kill(person2)


By writing that code, you have created a way to conditionally murder someone. I see no way this is different from "I have 2 guns, one is loaded, one isn't. I pick one up randomly and try to shoot you - see random, not murder".

I doubt a jury would buy that.

As you're charged with "murder one" you'll be screaming about how good your random number generator was and how that's "actually negligent manslaughter" to deaf ears.

### Realisticly, this will not be a perfect guarenteed-death or guarenteed-death choice

What should your car use instead for this choice? Ideally, the one with the lowest chance of death. If my smart car knows all the information and actually has to make this choice for some reason, choose the path with the longest breaking distance, or choose the path with the lowest impact force, or the impact vector that delivers the injuries with the least chance of death, or towards the person who has the greatest likelihood to see it coming and brace or otherwise prepare, or towards the other car with the best safety rating in such a way that takes maximum advantage of its features.

A truly smart car with perfect knowledge should be able to find a solution with minimum likelyhood of death, and choose that path. I've heard about a car which just before a crash into a sedan or similar car drops the rear air suspension, releases the front breaks, and dumps air into the front air suspension cylinder, the result is the front of the car lifts just before impact, turning kinetic energy of the crash into vertical movement up the other cars boot, halving the G-load. Including crazy things like this in your decision tree, you're unlikely to be left in a state in which all potential choices have a guaranteed fatality.

• "towards the other car with the best safety rating in such a way that takes maximum advantage of its features" - is the day I start driving in my ancient rusty can that isn't even allowed to drive. Every robot will know from the outset it's a death trap for me and wouldn't dare bounce a LIDAR signal off it lest it may kill me and they don't want that to happen. Jan 8 at 12:12
• This mostly seems an American legal problem and less a moral dillema. If you choose to do nothing and you have that choice you are just as guilty where I am from. It is in America you find stupid stuff like "do nothing with a heart-attack and let him die=no guilt but save their life and injure them in the process (broken ribs is practically mandatory for good resussitation) and you can be sued for not doing a better job". Jan 8 at 13:05
• @Demigan, actually, Good Samaritan laws are supposed to prevent that sort of thing. OTOH, you are correct that some jurisdictions have a limited duty to rescue. However, in this example, it's illegal to fail to take action to avoid an accident. In any case, if an accident is unavoidable, I suspect a solid case could be made defending any outcome. Jan 8 at 14:07
• @Matthew thanks, negative rulings tend to reach other countries more readily as news. Jan 8 at 14:39

Machine calculates survival chances of each option, chooses the one with least chance of death, likely hitting the truck as car passengers have in-build protections, unless the pedestrian can be under-ridden at a favorable angle and speed.

If all else equal, age and economics tied to it factor in, likely preserving child protection. Moral impacts are subjective and would only be counted if the driver/manufacturer filled in questionairs to determine the likeliest moral choice they would make. "My children protected first" is probably high on most people's list.

A quantum computer can calculate all variables, but is no more morally capable than how we program it. An AI on the other hand we would never know the full extend of it's morality.

• "Machine calculates survival chances of each option, chooses the one with least chance of death, likely hitting the truck as car passengers have in-build protections" this creates a bit of a paradox. It's an actual problem IRL - if the autonomous car prioritises causing harm to passengers, then the passengers would be less likely to ride it, as people generally don't want to be the ones exposed to danger. So, the car has to be made to prioritise preserving the passengers and the vehicle.
– VLAZ
Jan 8 at 13:43
• @VLAZ its about presentation as much as law. You dont say "my seatbelt fails to save you X% of the time", you present it as positive higher chances of survival. The fact that they even started a discussion on "will it prioritize passengers" is moronic. Safety of everyone involved should have been the topic. If a 100% chance to kill passengers exists despite safety measures in the car then a 100% chance of killing a pedestrian instead means the car wont be guaranteed whole enough to safely stop after the hit. And law should simply prevent passenger prioritization above all else. Jan 8 at 14:56