Nonsense. The car should behave in a way the law requires a human driver to behave. That's it, end of moral dilemma.
The law distinguishes between deliberate actions and accidents in which there isn't time to decide. But a car will not have the luxury of a jury understanding that it panicked.
"I panicked" is not an excuse, you need to control your vehicle at all time. You should never be in a situation where there isn't time to decide, you need to adjust your speed and safety distance for that.