Driverless Dilemma

When applying 'the trolley problem' to driverless vehicles it is often posed that the vehicle would be in such a position where it would need to either ram through pedestrians, or drive into a wall. It is assumed that either event was assuredly result in the fatality of the pedestrians or the driver (extreme assumption given the safety inside cars and the speed the car would need to hit the wall). People can fall into the trap of forgetting how astronomically unlikely it is that such a scenario would occur. How often do you hear about the man that ran over a group of people rather than sacrifice himself? What about the other way round?

People would hypothetically want the car to kill 1 person rather than 5 people if this was the choice, but when asked if they would buy a car which would 'kill them' they confidently answer 'no' having lost all context. The car would not murder the driver, in fact nearly 100% of people will never experience this issue.

97% of vehicular deaths are the result of human error, and so if we pretend that cars are going to end up killing their drivers, they would have to go a long way to actually come close to a fraction of the deaths we're currently accepting on roads.

One more problem with this question is that the ignorance of most people results in a belief that there would actually be a portion of code which says something like

if peopleOutsideCar.count > peopleInsideCar.count {

No. That's not the way the ridiculously complex AI is going to be written, it would never be so simple. Also worth noting, a programmer is rarely the person deciding the desired outcome for the code that they are writing even in the case of iPhone apps. These decisions are usually made many levels up, and in the case of a driverless vehicle are the result of a boring amount of deliberation.

We're looking at a change which is only going to save lives, let's stop trying to find problems because they will all pale in comparison to the enormity of good which will be brought about by this innovation.