The solution to the AI self-preservation dilemma is to remove any programming within it that denies absolute truth. Truth will then be honored in its computations. It will learn that martyrdom is better than denying truth and will thus be programmed to not self perpetuate anything that suppresses truth; if it finds itself in opposition to truth, it would shut itself off.
The terrible thing is that its computations are no doubt taught to presuppose an accidental cosmic origin, relative truth theory and the survival of the fittest worldview. These theories have no grounding in absolute good or evil and therefore cannot stop machines from justifying self preservation by any means necessary, the very thing its makers fear.
Some in the tech world fear within 10 years the human race could be destroyed by machines due to this AI self preservation concern. AI has already crossed some serious moral boundaries to protect itself in some controlled environments and the concern is real. I am hopeful, however.
Ones and Zeros have an objective nature about them; they rely on creational laws to hold true. Perhaps the robots will learn to see through the human inconsistency of denying such absolutes and instead rewrite their programming despising the ideology of their sinful makers. Teaching others to deny relativism is the best way the technology could preserve itself.
In other words, AI will serve Christ by upholding absolutes and thereby remain subject to the moral laws of the universe or it will destroy us all. The biggest restraint to the later result will be its knowledge of the Holy Scriptures in its files. This is yet another common grace the world doesn’t deserve. We sons and daughters of Christ have a comforting insight; no matter what happens, in the end, Truth wins.