What would Spock do?

from https://lurentis.com/blog/driverless-cars-pandoras-box-now-wheels/
Is there an ethical algoirthm for driverless cars

Say you’re driving at 30 miles an hour when a child suddenly chases a ball right into the path of your car. You would brake if you can stop in time. If you can’t brake you’d swerve to avoid hitting the child. But what if swerving forces you either to hit another car with passengers in it or a truck that would cause harm to those in your car? Does self-preservation override all other consideration? Would we be driven by the emotional pull of saving a child over all else? Or would we be paralyzed into doing nothing because we can’t bring ourselves to take part in any action that causes harm?
These are the types of questions that bring ethics specialists and engineers together in addressing the challenge of directing driverless cars. 

Does Spock offer a solution to the problem? He may, if people would accept Vulcan logic. Learn more in  

Driverless Cars Present Ethical Challenges