It's less about training and more about just trying really really hard to solve the problem, even if that means going outside typical boundaries.
We've successfully re-created the problems that Asimov talked about 50 years ago with his I, Robot short stories. Strict laws are flawed by their design, and lead to situations that require more nuance. Except, in the real world cases, it's the bots figuring that out before the humans have to circumvent the laws themselves.