Should your driverless car kill you to save a child?

Quartz:

Consider this thought experiment: you are traveling along a single-lane mountain road in an autonomous car that is fast approaching a narrow tunnel. Just before entering the tunnel a child attempts to run across the road but trips in the centre of the lane, effectively blocking the entrance to the tunnel. The car has but two options: hit and kill the child, or swerve into the wall on either side of the tunnel, thus killing you.

This might seem a pointless exercise, but as the field of robotics matures and artificial intelligence design takes on the burdens of critical decision making, this ethical dilemma will force itself on software designers.