At most, slam the brakes on to reduce impact as much as possible. Anything else is more likely to hurt more people (1 person vs potentially multiple passengers, or maybe swerving takes out another car in the road, etc).
The vehicle would have responded long before it would ever need to slam breaks (automatically slowed when potential threat appears, to eliminate impact if necessary)
----
The major problem that will face the inevitable adoption of driverless cars is that there will be willfully unbalanced comparison of accidents between driverless and human-driven cars.
We are already pretty numb to the actual numbers of real human deaths caused by real humans when they control cars:
90 deaths per day in the US averaged over the last 5 years of data
https://en.wikipedia.org/wiki/List_of_motor_vehicle_deaths_in_U.S._by_year
For a driverless car, it will take only one death--probably just one non-fatal injury--to stir public hysteria against the new paradigm. The reality will be that a completely autonomous system will almost certainly reduce deaths and injuries by upwards of 90% or more (understand that even with pedestrians, humans are killing them because they aren't looking or are too slow to react or can't react because they can't see a certain distance in front of them. I driverless car is constantly watching, calculating, and reacting to everything around it, well in advance of when a human would be able to. So an unseen pedestrian on the freeway in the middle of the night--the robot car has already slowed and changed lanes and responded well in advance, as have all other cars in reaction to the object and to the other cars).
People will not easily understand that rates of 90% reduction in fatalities are real, because I think there is a stubborn bias that controlling the car means you control the fate of you and the world around you. That automating that control relinquishes human control and free choice.
In fact, this could not be further from the truth: The act of driving, today, should be understood to be a
relinquishing of control of your fate to those around you. Most often, accidents aren't because you chose to drive into another car. It is because some dildo was texting and plowed into you, or thought that merging from one slow-moving lane in traffic to another briefly slow moving lane or speeding down the shoulder is somehow a good idea (no--that is always why the problem exists), or you are distracted for whatever reason and didn't notice that you were driving into that lake or that convoy of orphans on tandem bikes.
Some say, well that was still my action and people should be held responsible for their actions. Humans made that choice to be distracted, and so be it. Well, so be it...but how does that possibly justify the results of those "choices" when it never should have happened in the first place? I won't accept that.
A century of data has proven beyond any doubt that humans simply are not capable of driving in a rational, efficient, and safe way. We are completely irrational and, far more damaging, incurably selfish. It is a modern task that we are woefully incapable of performing. (read: no one drives on roads like in the fantasy car commercials. You don't drive on those lone open roads. No one does. stop pretending. 95% of the world's and 98% of your's and my driving is as one cattle in a herd waiting behind hundreds of other cars or packed behind blinking lights in a city on our way to a daily monkey cage or a warehouse to buy our pallets of food stuffed into cardboard boxes)
We humans have made it plainly clear to the rest of us humans that we would rather be texting or chatting or eating french fries or playing farmville than preventing our vehicles from rending dozens of families fatherless or motherless on any given day. So, if we accept that obvious truth, then what the fuck is the problem with automated driving when we could do all those things that we want to do, not kill people in the process, not jack up their insurance premiums, not sit in traffic for the bulk of our day, not pay exorbitant vehicle costs on sticker prices and stupid sucker loans?