Wyman Williams, development officer for the Texas A&M University-Commerce College of Business and long-time car dealership owner, says as we get very close to the day when self-driving cars will be on the road, the developers are programming into the cars how to react in life-and-death situations, when either pedestrians or the driver and the car's passengers may be killed depending on the car's actions.
Self-driving cars being programmed to react in life-and-death situations

Theoatmeal.com