Very good question. We do have precedent for responsibility and that is command. Autonomous vehicles or other AI agents will logically be dealt with as underlings i.e. under the command of the human master. The captain may not even be on deck but is still fully responsible his craft. I don’t think the moral decision on killing yourself and potential passengers or hitting the kids is the issue as much as it is responsibility for resulting action. The ensuing court battle will still be the same.