Funny that you invoked "The Matrix" which is an enlightenment allegory.
The Golden Rule is a good guide to pursue enlightenment and the essence of the Golden Rule is to lovingly tailor our interactions with one another based upon what we observe and know about one another.
This skill happened to be exactly what I practiced in my time as a math and critical thinking teacher. One of my many hats I wear is the profiler's hat. My ability to effectively reach my students depended upon my ability to take upon myself their unique perspectives and then tailor my approach to each individual in suitable ways. It's one of those "always on" skills once it is developed. If you've ever seen Criminal Minds, I've been compared to Spencer before, although I would suggest that is a pixilated model despite having accuracy to it.
The Golden Rule isn't limited to understanding the kind or the sane. That's the low hanging fruit. The challenge is to find ways to understand and love the individuals who think in ways we do not, e.g. opportunistically about "benefits of attack". Being aware of self serving thought patterns and acknowledging their existence is not condonement or an indication of participation in or attachment to those self serving thought patterns.
“If you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know yourself but not the enemy, for every victory gained you will also suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle.”
Replace "enemy" in Sun Tzu's wisdom with "other self", replace "battle/s" with "engagement/s" or "encounter/s" or something like that and you have a non-violent corollary. Example: when walking through some parks, the park is likely to bound private, fenced, residential properties and some of those properties are likely to have a dog outside barking at people in the park. Understanding "the enemy" here, I can just hack the dog's brain and say "Good boy. Good girl. Good boy. Good girl." over and over knowing that the dog will recognize one of these phrases, it will realize that I am saying things that its owner says, its owner loves it and takes care of it, so maybe if this guy walking through the park says that same stuff, he is a friend rather than an enemy and so I don't need to bark incessantly at him because he's not a threat".
Likewise, slow, intentional, 2 eye blinks can tell animals that you trust them not to attack you while one of your best security senses is voluntarily disavailed in their immediate presence. They will often reciprocate this.
Take those animal examples and extrapolate to a human situation where a crazy person is acting in ways that are a danger to themself and at least one other innocent bystander. If you are familiar enough with how even a fucked up mind might think, you might be able to hack that person's mind and disarm the situation with words and no violence or, at the very least, less violence.
I tried a sales job 20 years ago and I hated treating people as sales leads. I felt like I was dehumanizing them. Not my thing to treat people as targets for self service. I'm interested in providing value and letting those who appreciate my work show me some love.