The solution is in developing effective Heuristics.
Once you can correctly assess whether people are better or worse off by certain actions you can define morality by what action has the greatest net positive effect on people and choose that course.
RE: Can AI be trained to assist with moral decision making?