I trust a highly trained algorithm to make better and faster decision than a human driver. The algorithm is even aware of all the cars around it and their speed and can decide to take evasive action with a way better chance of success than I ever could.
If the other cars on the road are self driving cars as well they could all communicate and take into account the one car moving to avoid the object in the road, thereby also reducing the chance of damage to the vehicle swerving to avoid the object
It should be a three tier decision. First, preserve the life in the vehicle. Second, preserve life outside of the vehicle. Third, minimize property damage.
Deer vs little girl does not really matter, that is just an emotional ploy.
I'd hope the algorithm was designed to crash the car instead of running over a pedestrian. A pedestrian has little chance to survive getting run over compared to a passenger in a car with a seatbelt, airbags, crumple zones, etc.. to protect him.
How do we take into account emotional harm from killing a little girl causes the driver to be harmed (they weren't driving at the time as they let the car to stake over, but they blame themself for it regardless). A parent would rather they die than hit their own kid.
I guess once these cars begin being sold people can start testing situations using dummies and such.
Trolley problem philosophical discussions notwithstanding, I still suspect that the default mode (as it is with humans under most circumstances) will be to lay on the brakes and hope for the best.
That said, there are certainly circumstances where swerving is the right decision and a vehicle with 360 degree sensors is potentially in a better position to make an optimal decision than a human making a snap judgement based on mostly what they see in front of them. Probably the closest I ever came to being in a really serious accident happened on a highway when someone slammed on their brakes to avoid rear-ending the car in front, ended up drifting into the next lane where another car had to swerve to avoid them. I ended up swerving into the breakdown lane. Amazingly with cars swerving and braking all over the road at 70 mph, no one collided but it was a very near thing.
I strongly suspect that, however many decades away true self-driving is, good assistive driving and collision avoidance systems especially on highways are going to be a pretty big near-term win.
It will better be able to make a decision than a human can. But what decision is optimal isn't well defined because never before have we had the need to define it. So far, only directly malicious behavior is known to be bad. But prioritizing your safety over the girls safety is something we have neither decided to be good or bad.