If a friendly AI is forced to deal with a trolley problem, it would be surprising if an AI could not come up with an alternative that is obviously best but was previously unseen or not achievable by humans.