Would you let your driverless car kill you, if it meant saving the lives of others?
It sounds like the premise of a Stephen King novel or an episode of Black Mirror, but it's actually a question lawmakers and engineers are grappling with on the dawn of the autonomous vehicle revolution.
Researchers at MIT have been asking people around the world what a driverless car should do when a crash is unavoidable - for example, the brakes have failed and the car is heading for a pedestrian crossing; should the car hit and kill a pregnant woman crossing the road, or swerve into a parked car, killing the driver and their family?
"Most people would say we'd kill the pregnant woman, but we'll save four lives - you don't want to kill four people instead of one person," Alex Sims, University of Auckland associate professor of commercial law, told The AM Show on Thursday.
But other scenarios posed by the researchers aren't so clear-cut. What if the pedestrian is an 80-year-old man, and you're the only person in the car? What if it's a choice between running over a doctor or three criminals? Four elderly people or two toddlers? Five cats or five dogs?
Prof Sims says those decisions cannot be left up to engineers at Google and Uber.
"We need rules. It would be unconscionable for people to drive cars that were programmed to ensure that the occupant's safety was put ahead of everyone else's. For example, a car cannot be programmed to run three people over to avoid the car's sole occupant crashing into a parked car."
- Porsche wants to make self-flying cars
- Uber unveils plans for flying taxis by 2020
- Self-driving Uber car kills pedestrian in Arizona
But would anyone want to be in a car that would knowingly kill them to save someone else?
"Would we buy a car that sacrificed our lives - or the lives of our loved ones - for the good of the many?" asks Colin Gavaghan, associate professor of law at the University of Otago.
"Maybe it just shouldn't be legal to buy a car that would discriminate on protected grounds, or that would sacrifice other people to preserve our own safety. But in that case, how many people would buy a driverless car at all?"
The research suggests most people would be happy to.
"They found out there were three things that were common amongst all the countries - saving young lives, saving fewer people and saving people over animals," said Prof Sims.
In some countries, particularly those with high inequality, running over a low-status person appears to be more acceptable than killing a high-status person. There also appears to be a preference for avoiding women, especially if they're pregnant.
But will the Government pass laws that essentially condemn the elderly and poor to death in the event of a crash?
"Some of the preferences expressed in this research would be hard to square with our approaches to discrimination and equality - favouring lives on the basis of sex or income, for instance, really wouldn't pass muster here," said Colin Gavaghan, associate professor of law at the University of Otago.
"Age is also a protected category, but the preference for saving young rather than old lives seems to be both fairly strong and almost universal. So should driverless ethics reflect this?"
- Is driverless transport the way of the future in New Zealand?
- Trial for New Zealand's first driverless shuttle
Prof Sims says there's also the problem that different countries will likely come up with different laws.
"It's not too bad in New Zealand, we don't suddenly drive our cars to Australia. But if you're going within Europe, are you going to stop at France and have an update, then go into Germany?"
AM Show co-host Mark Richardson suggested in future, we may all be microchipped so driverless cars know who we are and how valuable we are to society - making it easier for their computers to make a call on who to kill.
"That's Black Mirror… that's quite a way away," said Prof Sims. "But we may have that in the end."
And some people might try and cheat the system, she joked, by walking around "with pillows up their tops" so they appear pregnant. Prof Hossein Sarrafzadeh of Unitec, who specialises in high-tech research, says the easiest solution might be to have separate roads for cars and pedestrians.
"Future roads may not be the same roads we are using today. Even if we use similar roads they will be heavily sensored, intelligent roads. They will certainly be much safer, although these ethical dilemmas will remain if the same roads are used.
"Future roads, I believe, will be different to what we have now. There may be no humans walking across the roads that autonomous vehicles travel in."
Despite the moral dilemmas driverless cars pose, the experts all agree on one thing - they will save many more lives than they will take.
"Over a million people die on the roads every year - hundreds die in New Zealand alone," said Prof Gavaghan. "Driverless cars have the potential to reduce this dramatically. It's important to think about these rare 'dilemma' cases, but getting too caught up with them might see us lose sight of the real, everyday safety gains that this technology can offer."
"They're going to save over a million lives," said Prof Sims. "Sure, there will be the odd one - but overall, far more people [will live]… I don't see the big fuss, personally."