There are 70 people in a bus driving down a two lane road covered in ice, the mountains on one side and a cliff with a 300 foot drop on the other.
A lone man suddenly appears in the path of the bus and you are the driver.
What do you do?
That sounds like a stretch of I40 in TN
RUN HIM OVER and SQUASH HIM LIKE A BUG!
Idiot shouldn’t have been Jay walking anyway.
While the answer should be obvious to any thinking (and for that matter, feeling) person, this is the very kind of question that I suspect, will tie the driverless car industry in knots. Any coder/programmer who (far removed from the scene by time and distance) instructs the bus/truck/car to run over the pedestrian will be directly culpable for his death. In as much as his programming was done in performance of his official capacity for the auto maker, or a contractor, they would likely be culpable as well.
The "right" answer to your question, which should be arrived at in a matter of a second or two, will tie up lawyers, litigators, legislators, the insurance industry and the auto industry for years. I do suspect that if the concept of the driverless car fails it will be because of this sort of thing rather than the technical challenges of actually making them.