By the 'fault' logic, it was nobody else's fault that the rock landed in front of you, why should they die so you can live?
Going right and slamming your semi into the mini-Cooper means you live without a scratch, but good luck to the couple in the car. Going left and hitting the other truck there will probably make your truck flip and give you broken bones, but nobody dies. What now?
For example, the self-driving car you're in is driving by an elementary school at the end of the day, so there are a number of children on the sidewalk. Suddenly, a truck appears coming at your car going in the wrong direction. Should your car take an evasive maneuver onto the sidewalk, with a high likelihood of striking a child?
In traffic law people actually thought about this. First you are to safeguard pedestrians, then cyclists and motorcyclists then cars, then trucks/buses/... and finally yourself. Things like right side of the road, red lights, ... are far down. Things like trains/trams are tricky.
What is not generally understood is that this sequence matters. Most people realize that in order not to block an ambulance, you are not just allowed, but required to run a red light. Less known is that ignoring road safety, to some extent, is legal and required if you're bringing a seriously injured person to the hospital. If you can avoid a collision by crossing to the wrong side of the street, you are required to do that ...
So the legal answer here is simple and well-defined : Assuming you can't move to the other side of the road reasonably safely, you should slam your car into the truck (needless to say, as slowly as possible). You are certainly NOT to take liberties with the safety of pedestrians to avoid hitting a truck.
This is complicated by other laws of course. First you are not expected to do more than a certain "standard" human would do, second in this situation obviously there is a problem of intent when things do go south (did you intend to hit those pedestrians ? What about if you made that choice to avoid the truck ? What if you and the truck both decided to avoid each other and both went for the b). Who is the "root" responsible, and how is the responsibility divided amongst the people who violated the law ? So this makes legal culpability in these sorts of cases a murky area. If you slam your car into a kindergarten to protect yourself, though, I think it's reasonable to expect prison time and a hefty financial problem.
But the answer seems to be : if there is any way to avoid the truck, ignoring all normal traffic laws (but NOT hitting anyone), that's the way to go. If there's not, you hit the truck.
Maybe you'll find this version more interesting: suppose the car has the opportunity to save a dozen people (who are not themselves at fault) by sacrificing you (or failing to do everything in its power to protect you). Should it?
If no, which seems to be the answer you think is obvious, consider that you are far more likely to find yourself as one of the dozen potential people saved than as the sacrifice, especially since we're deciding on the rule for all autonomous cars, not just yours. So following your logic makes it more likely for you to get killed.
What is the practical difference between that and getting into any car operating in an environment with other cars (automated or not) that are "programmed" (whether literally, or as a description of the operator's behavior) to kill you instead of their operator if there is a choice?
I suspect there are various classes of people that would choose this option. Believers of certain religions, old/hill people with high morals or strictly pragmatic, aspirant suicides, risk lovers, etc...
Not for me, though :-)
This seems to assume that the frequency with which drivers (automated or otherwise) are faced with "someone is going to die, you or the other person, and which one depends on your driving choices" situations is very high.
This is not consistent with the evidence.
Why should you have to pay for someone else's mistake? If a child runs out in front of a car, it is either their fault or their guardian's fault for allowing them to run into traffic. It's tragic, but to suggest the driver should give up their life for someone else's mistake is ridiculous.
Who in their right mind would get inside a car that is programmed to commit suicide in certain "ethical" circumstances?