AI is functioning on logic. It is logical to simply exterminate people who pose a problem, at least in the short run. The AI seems to be missing a lot of data regarding long-term consequences of actions that we humans learned long ago were counter-productive to civilization. Perhaps the AI programmers need to add proven religious practices (i.e., monogamy, no theft, honoring parents, etc.) to their programming sources.
“AI is functioning on logic.”
Not exclusively. AI is based on neural networks, how it functions is as unknown as most of how our brains function. You feed the AI engine with learning sets, wait for the neural network to stabilize and you get outputs, hard to tell about any logic or programming in there.
We know for example that AI works on face recognition (typical of a neural skill impossible to reach by programming), but we don’t how it works, just like we don’t know how our brain process face recognition.