Great topic! I struggle with this myself.
This paper* describes these situations in detail in section 4.2.2 Self-Sacrifice, on page 75. The paper doesn't delve into the details of addressing self-sacrificial programming, but does have this to say:
You may also be interested the section on Ducking Harm, which mentions a semi-truck barreling towards you from the rear while you are stopped at an intersection waiting for children to cross in front of you. Note: They need to ask my advice, which is, "Lay on the horn, yell at the kids to get out of the way of the truck, and inch forward to turn right", That is, unless you have room to pull a reverse u-turn into the opposing traffic lanes. Thank goodness we'll have years to come up with all the scenarios and decide on the best strategies rather than the split seconds each of has now for these infrequent emergency situations.
These are interesting moral dilemmas for individuals as well as the people in industry designing autonomous driving algorithms.
The way I sometimes rationalize it is that it's like riding in a taxi or Uber/Lyft rideshare. The driver will make their own decision about these issues based on their moral compass. I'm hopeful that autonomous vehicle providers will be more transparent about their morality settings than my rideshare driver. For that matter, it is similar to putting your life into the hands of your Disney bus driver.
@Driver, I have complete confidence in you!
I also wonder if some amount of randomness could help, as it would:
1. Remove the ethical dilemma provided by absolute determinism.
2. To some, put the choice in "the hand of fate" or "the hand of God".
3. Provide more feedback to the AI to determine which choice saves more lives in the future.
Have you heard of the Trolley Problem? It is a thought experiment in ethics. Wikipedia has a decent write-up of it:
en.wikipedia.org
* In case the link becomes obsolete, it was
Autonomous Driving Technical, Legal and Social Aspects edited by Markus Maurer, J. Christian Gerdes, Barbara Lenz, and Hermann Winner