And yes, some people sometimes have to make the difficult decision between hitting another smaller car, hitting a truck, and hitting a person. I suspect these days, most people react irrationally in split seconds. However, with self-driving cars, all the data would be available and a real decision could be made...but what would be the constraints and what would you maximize? that is the scary question.
1) decide that a critical error has occurred and shut down
2) apply full brakes on the remaining wheels, sending the car into a spin and killing a group of pedestrians on the pavement.
3) let the car continue, smashing into a minivan with a family inside it. The minivan is also auto-controlled but has no time to change course
4) try steering further left, hitting the barriers/trees, possibly killing its own occupants.
Now, situations 2-4 can be simulated before they happen with enough computational power. Therefore, the computer would have to take a conscious/programmed decision who to kill, and that is a huge deal morally, because at some point someone somewhere will have to write code that will literally be evaluating value of human life.
And before you say that humans would do no better in this situation - that is true, but no one will judge you for a decision you took in the split second you had, you would do what felt right at the time. The computer is programmed a certain way and you can always sue saying that if it did X then person Y would still be alive - and if there's one thing that companies fear it's litigation.
In your scenario, smashing into another vehicle will be preferable to mowing down pedestrians; that vehicle's program just might be able to save itself, or the two vehicles might even communicate to minimize the damage to each other, and in any case a vehicle will most certainly absorb more of the impact than an exposed pedestrian could.
People on foot, who have nothing to do with the traffic, should never have to deal with the vehicles and the consequences of their programs. Number 2 from your scenario should not even be an option to the program.
Otherwise, can you imagine the first incident in which some passengers died because the code prioritized the life of someone else? Would anyone want to buy an autocar after that? "YOUR CAR COULD CHOOSE TO KILL YOU", the headlines will say.
The second priority should be the safety of pedestrians who are off the road.
Until we have computational power at the level of divine prescience, I don't think you can do much else in scenarios like the one you described, other than have a chain of basic priorities that falls back on "stop everything."
Eventually though, powerful-enough AI may be able to simulate all outcomes down to a very granular level, such as the difference between outright killing someone or just injuring their limbs to the point of crippling them for life.
Many factors will need to be considered then; who appears to be the weakest individual among the unavoidable targets? Are there any acquaintances of the owners among them? Is there a hospital nearby that could tend to their injuries? Does it look like a suicide attempt?
I can imagine that after the first couple of accidents where the algorithm decides to kill N pedestrians to save 1 driver, the government could switch to a "utilitarian" point of view - minimize the number of lost lives - and will enforce this by law.
I made the argument that machine ethics aren't a real thing. Companies will do whatever they can to avoid litigation, then the government will step in with regulations as the closest approximation we'll get to ethical behavior.
There's nothing "utilitarian" about this, unless you assume that:
(a) All people value their own lives equally
(b) Nobody places any value on anyone's life but their own.
(Side note: we know that both of those don't even come close to being true.)
Without those assumptions, a utilitarian point of view will show some pretty obvious biases against just killing the fewest people -- among other things, it will try to kill older people rather than younger people, and to kill people with the smallest number of relatives (who would be sad about a death in their family).
More seriously, I don't understand why this is always brought up in the context of autonomous cars. How often do crashes happen where killing people is inevitable but you get to choose who dies? How often will such crashes happen when autonomous vehicles are common? How far from the theoretical optimum will it be to just say "in an emergency, brake to a stop and steer to avoid obstacles"?
I'm pretty sure this is an edge case on the edge cases. If autonomous vehicles deliver on even 10% of their promise, safety will go way up. It doesn't have to be perfect.
So what do you put in the "Run over the kid, or run into a wall (or oncoming traffic)?" decision point? Somebody has to die. Just braking until you hit the kid is a pretty crappy hack.
And when the kid gets hit, the software will be examined. And the comment that says "screw it, just hit the kid" will come to light.
This is already going to be vastly superior to human drivers, who often don't bother to brake, or flinch and steer into oncoming traffic for no particularly good reason.
After we've cut down the 30,000/year death rate from car accidents by a couple of orders of magnitude, if we get start to get desperate about improving safety and have trouble figuring out how, then maybe we can start looking at rare and bizarre occurrences like these, if they ever actually happen.
Trying to work out the precise requirements for ethics in autonomous car crash response, when we don't have more than the vaguest idea of what kind of crashes they'll get into or what kind of responses might be available, is awfully premature.
And the Google car can already identify a person in the road. That's critical, at least for lawsuit purposes. "You mean, it knew there was a kid in the road, and it did nothing?!"
And lawsuits will happen, the first year. Nobody cares about the vast improvement to humanity; they care that a Google car kit their kid. There's where it all fails.
Computers are poor at interpreting visual information, but can react essentially instantaneously and can pay full attention to all of their inputs indefinitely.
Nearly all crashes are due to those human failings of long reaction times and short attention spans. Even crashes due to equipment failure tend to be greatly exacerbated by those failings.
Autonomous car crashes are going to be due to unrecoverable equipment failures, software bugs, insufficient sensor data, and sudden unpredictable changes in the environment which can't be avoided even with instantaneous reactions.
I don't think it's strange to think that the nature of autonomous crashes will be quite different from the nature of human crashes. I'm certainly not stating that insincerely. I mean, fully a third of traffic fatalities currently happen because human drivers deliberately degrade their own senses and reactions before driving. Another big chunk are because of drivers deliberately not paying attention to driving.
The confluence of factors that need to come together to even create one of these ethically difficult scenarios is so unlikely that I wouldn't be surprised if it never comes up at all. If it does, it's going to be single digits per year. And what's the lawsuit going to look like? Alleging that some Google car should have killed a nun instead of the plaintiff's child? I don't think the law even supports this idea of "you should have taken action to kill someone else instead." Even if it did, it's not going to ruin the industry.
Cars do no just flip over and explode for no reason. Life is not a fast and furious movie.