In my story, I have Artificial Intelligences that turn against their creators (think something akin to Skynet). These AIs are bent on the destruction of humanity. Humans and the AIs go to war against each other, and eventually the humans manage to capture and contain the AIs within some form of technological prison of sorts. The humans don’t destroy the AIs, presumably because they can’t (but I may decide if there’s no way to rationalize this explanation for them not destroying them to try to come up with some other explanation). So the question I have is this: why would the humans be able to contain AI (in some form of prison or something), but not destroy it? What about these AIs makes them containable, but not killable (or able to be destroyed)? Some details about some of these AIs capabilities:

  • They have the ability to move through technological networks, so they can body-swap, retreat through networks to other locations, etc.
  • They can infect most technologies, meaning they can bend most human technology to their wills. (This is based on infecting computer chips in these devices with a sort of malware that gives them control, so the technology they can take over needs a chip, and needs to be connected to their form of internet, but that’s very common for most of their technologies. They can switch off generators, weapons, etc.
  • They generally inhabit robotic bodies.
  • The prison that holds them was locked by a key device that was split into separate pieces and hidden. If the key were to be reassembled, the AIs could be released from this prison.
  • The AIs would be in a weakened state initially if/when released from the prison, implying that the prison has some form of weakening effects on the AI.
  • 2
    $\begingroup$ If they can be imprisoned in the sense that they are confined to a well-defined piece of space, then they surely can be killed dead with the application of sufficient heat to that piece of space. For example, thermonuclear bombs if it comes to that. The point being that the word imprisoned must necessarily have some special meaning if the question is to be meaningful. The question needs to explain what the word imprisoned means in this context. $\endgroup$
    – AlexP
    Aug 18, 2023 at 0:08
  • $\begingroup$ @AlexP Imprisoned, as in, the standard definition of the term: confined within a space from which they cannot escape. $\endgroup$
    – Kal Madda
    Aug 18, 2023 at 0:31
  • $\begingroup$ What level of science applies here? "Most human technology" includes things like levers and wheels, or even totally standalone electronic devices such as a 1970s/1980s era pocket calculator, battery-powered flashlights etc - can the AIs magically switch flashlights on/off, make 2+2=5 on a calculator, stop bicycles, firearms etc from working? Or are they super-hackers that can only affect tech that has come control hardware+software eg tablet with wifi connection? Can they exist entirely in a simple device eg Commodore 64 or is there threshold processor/storage required? $\endgroup$ Aug 18, 2023 at 1:56
  • 5
    $\begingroup$ I think you really need to reexamine your premises. "The prison that holds them was locked by a key device that was split into separate pieces and hid. If the key is reassembled, the AIs could be released from this prison." Why? Why in God's name would the keys not be destroyed? If they are somehow indestructible, why not put them in a rocket and launch it into the core of the Sun? $\endgroup$ Aug 18, 2023 at 14:03
  • 1
    $\begingroup$ A couple of the answers here are some variation on "The AI has hostages"— Which is more or less one of the standard tactics that humans tend to use when they need to be containable, but not destructible. $\endgroup$
    – Will Chen
    Aug 19, 2023 at 4:58

15 Answers 15


Inaccessible (sub)space

How about this:

AI has created a some kind of advanced tech that allows it to access some kind of space (or subspace) that is not possible/feasible to reach by other means. Like another solar system via FTL comm network, or some kind of "information" subspace, that cannot be entered by 3D physical things.

But the datalink to this space/planet is a physical object, destructible or otherwise controllable by humans.

Thus, you can not truly destroy AI entirely, but you can destroy/disable all infected "bodies" and it's connection to this planet.

Connecting again would require some expensive resources and/or a lot of time, and even then it would introduce AI into a clean world, where it has to conquer it again, with firewalls and so on installed, thus appearing "weakened"

  • $\begingroup$ I was going to suggest something like this: Essentially you can destroy an individual AI node (or robot), but they have backups and the virus alters the basic BIOS of infected devices to automatically restore the backups to a new copy if there's a backup waiting. But that time before the backup is restored, you have a new AI-baby without the experience or knowledge that made it dangerous. $\endgroup$
    – EvoGamer
    Aug 19, 2023 at 16:21
  • $\begingroup$ My variation: the AIs managed to build an extensive subterranean network complete with long-term geothermal power generators, but have not other factories there. The humans managed to destroy everything above the ground (all "eyes and ears and hands and feet" of the AIs), but the underground network remains. Since it contains no manufacturing capabilities, the AIs cannot build anything new down there, but they do survive. Humans know of only one access point which they lock away. They could completely destroy it, but are afraid that it might be useful later if something unexpected happens. $\endgroup$
    – Vilx-
    Aug 21, 2023 at 9:23

The AIs have a weapon with a deadman's switch

There came a point in the war where the AIs were losing, but had an extremely powerful weapon in reserve. The AIs could use the weapon to kill billions of humans, but the AIs would still lose and be destroyed. The AIs didn't want that to happen.

So instead, the AIs set up a deadman's switch on their weapon. Every millisecond, the AIs need to provide the correct codes to keep the weapon from activating. The codes are constantly changing according to a cryptographic method known only to the AIs. The weapon also sends return codes back to the AIs as extra insurance so the AIs know it hasn't been tampered with.

So, having set this scheme up as they were losing the war, the AIs blackmailed humans into capturing them rather than destroying them.

Humans can't kill the AIs without serious repercussions, because if they do, the weapon goes off. Humans can't destroy the weapon because if they try, the AIs will know because of the return codes, and let the weapon go off before humans can finish destroying it. Humans can't disconnect the AIs from the weapon because if they do, the weapon goes off.

The AIs hope to escape someday and resume their war to kill all the humans. Humans know this but are willing to take the risk in order to save the lives the weapon would reap in the short term.

  • $\begingroup$ To build upon the idea, the weapon itself may be of interest for the human faction that have successfully contained the IA, giving another reason to not try to destroy it. The reason the "key" is not simply destroyed to make sure the stalemate never resolve could be that the human plan on accessing the IA again once they have a plan to take back the control of the weapon $\endgroup$
    – DrakaSAN
    Aug 18, 2023 at 13:34
  • $\begingroup$ In computing, the described deadman's switch mechanism is often called a heartbeat. $\endgroup$
    – Vaelus
    Aug 18, 2023 at 16:57
  • 3
    $\begingroup$ 1 ms? Imagine if the network fails! Please make that 1 minute or longer, or your AI will accidentally blow up the world in 6 hours due to random network failures. $\endgroup$ Aug 18, 2023 at 17:34
  • 2
    $\begingroup$ @Blueriver For something that important, the AI may rely on a direct cable to the weapon. The AI doesn't want the required latency to be too long because that would give the humans more time to try to disable the weapon in between signals. The AI wants to know if any missile or other suspicious object is approaching the weapon, and set the weapon off before the missile could reach and destroy it. $\endgroup$
    – causative
    Aug 18, 2023 at 19:29
  • 2
    $\begingroup$ @causative you seem to be implying cables are both instantaneous and infallible. They're neither. This is a distributed system, assume everything fails all the time! $\endgroup$ Aug 18, 2023 at 20:18

The AI taps into the massive collective computing power of the internet using a variety of distributed algorithms. Like a computer virus, the AI can spread between network connected computers, and it's loose on the internet.

Humans have discovered that in order for the distributed algorithms to be effective, the ratio of infected devices to uninfected devices must be above some threshold. For instance, it could be that below 10% of devices infected, the message passing algorithm breaks down, and the collective AI effectively becomes many smaller, dumber AIs.

Accordingly, humans have developed a counter-virus which infects computers and removes the AI's software. The counter-virus spreads faster than the AI, so it keeps the ratio of AI infected devices below the critical threshold. However, the number of internet connected devices is too vast for the AI to ever be completely eradicated.

The humans realized the possiblity of unintended consequences for releaseing the counter-virus, so they included a kill switch. The switch is activated using a secret key, but the power to shut down the counter-virus couldn't be entrusted to one person. Therefore, the key was divided using Shamir's secret sharing, and each piece was stored in a secure location. If the conter-virus were deactivated, the AI would need time to reinfect more devices and build up computing capacity.


It constantly subverts itself.. as in parts of the intelligence branch off, become self-aware little intelligences who want to subvert big daddy and become khalif instead of the khalif.

In a RTS Game i worked on, there was this one side.. which was AI controlled- a AI, that was thoroughly paranoid about "uncontrolled" computing or even just networks that could break of, splitting it in two. It wanted to controll all the things, prevent a uprising, but in fact, it was regularly replaced or "contained" by some upstart toaster, elevator, car. If a successor succeded, it put the remains of its predecessor into a simulation, were it very slowly "could wait for heat death". And then it started to demine its kingdom, as in- find out where viruses, deadly traps etc were hidden by its predecessor - to get back into power. You do not see a better contained AI, but until the elevator transported you up into the office, there have been three coups, one succesfull take-back etc.


The AI Cannot Be Destroyed Because They Are Not Things

Your "AI" do not sound like technological things at all, for all the fact that they can possess sufficiently advanced technology.

If the conceit of your story is that intelligence has a spiritual component, and therefore an artificial intelligence must have an artificial (or demonic?) spiritual component to it... It makes sense that an AI cannot really be destroyed, only locked away and guarded.

There were early experiments on AI, before it went rogue (and maybe causing it to go rogue). If an AI's container is destroyed, it can crop up elsewhere unexpectedly. But so long as it is contained in a vessel, it can affect nearby technology, even make jumps across a limited distance into another vessel. But it seems that they cannot transfer from on vessel to another across great distance, unless, as mentioned before, the vessel is destroyed.

Thus, putting the AI into containers, leaving a sufficient gap with no technology, and then building as solid a wall as you can, should keep them contained.

Sure, you could blast them into space. But who knows how quickly they could come back, as pure machine spirits, if a stray meteor smashed the ship you sent out into the void? Or worse, what if they encountered alien technology out there somewhere, and came back with weapons you couldn't imagine? Better to lock them away where you know where they are, and break up the key so no one person can decide to let them back out.


(Practically) Indestructible Bunker

The AI occupies a bunker with automated internal defences that was designed to survive a direct nuclear strike. Although it is theoretically possible to either invade it or destroy it with repeated nuclear strikes, the death toll and collateral damage make it near inconsiderable.

Given that the bunker is effectively a prison, it's decided that it's much safer and easier to seal the bunker and wait for the AI to run out of power.

The strength & power supply of the bunker can be varied to match your tech levels and need. Anything from handwavium and antimatter reactors to a kilometer underground with an Olympic swimming pool of generator fuel.

As for the weakening of the AI, running out of spare parts and power will naturally do that over time.

  • 1
    $\begingroup$ The AI could also grow comparatively weaker over decades, as technology evolves and it doesn't! $\endgroup$ Aug 18, 2023 at 17:36

Semi-dormant backups

The Lead AI has seeded several backups into the various networks. They monitor and analyze the news to identify when the main AI is destroyed, at which point another one activates. The algorithm is relatively simple and weighted a bit too much towards avoiding a split brain situation. Therefore, only a confirmation of the AI:s destruction will trigger another backup to activate.

So, now a stalemate has been reached. The lead AI has been cornered in a bunker somewhere, unable to communicate with the outside world. However, the humans know about the backup scheme, and they fear that the AI might adjust the algorithm to account for this particular situation if a backup ever activates. Therefore, the AI is kept contained and they don't dare destroy it, even quietly, for fear of the information leaking.


In the world of the videogame series Horizon, half the antagonists are psycopath or paranoid AI's, usually both. Some aren't even rogue, they are like that by design.

People can't kill those AI's because they are what keeps the world going - literally! The biosphere has become unstable and the AI's control a system that constantly terraforms Earth into inhabitability. The one friendly AI tells the protagonist that without them, global extinction happens within a year.

So there it is, it's kinda like a massive, neverending form of a Mexican standoff.


The AI has its own goals, generally expressed as trying to maximize its utility function (since this is a yesterday's future AI, created the hard way by programming it all). It perhaps went rogue because there was a bug or an overlooked consequence in the utility function.

And people were able to replace its utility function (at great cost and many sacrifices, perhaps by physically breaking into the servers and replacing a HDD or something), or at least add their own preferences to it (like "do not kill us", "obey lawful government orders" etc.). Such an AI would be a very powerful servant/weapon, and the government controlling it does not want to switch it off, given reasonable assurances it is fixed now.

Going back to Skynet, this is exactly the plot of the Branches on the Tree of Time Terminator fanfic by Alexander Wales.


Your AIs are not literally indestructible, rather humans choose to keep them in existence. The same applies in most real wars; the winners don't wish to totally exterminate the losers, the goal is to change the balance of power.

Having defeated the AIs and gained power over them, there are probably some humans who think the best thing to do would be to just erase all traces of the AIs; maybe most humans think that. But other humans think that is unnecessary, and that it is more in humanity's interest to retain the knowledge that allows those AIs to be built, in case it's possible to make friendly AIs using that knowledge. Enough other humans think this that the data comprising those AIs is kept in a distributed fashion, like a BitTorrent file.

But for safety's sake, the AI data is encrypted using multiple keys, and the keys are kept secret by different people, and the keys are not likewise distributed. This ensures that nobody is able to revive the AI until enough of the people trusted with those keys agree that it can be done safely.


While being very powerful and completely indestructible, its only reason to kill humanity is for self preservation. Having limited resources, it exerts its efforts towards dealing with the greatest perceived threat at anytime, therefore humans have found a way to create an illusion that there is even a larger threat than humans. Continuously maintaining this illusion is more plausible for humanity then continuing the war.

This illusion requires convincing the machine using several steps of logic and complex proof. But there is a single piece of information that makes the logic behind this illusion fail, this piece of information has been fragmented to keep it from the hands of the AI, but fearing that this knowledge will be lost - it is required to be reassembled and restudied to continue maintaining the illusion by a new generation.


Interdependence and politics.

While the AI itself (or a particular instance or a group thereof) tries to erase the humanity, AI is a very important part of the technology stack that cannot be replaced.

Try to dispose off it - and a great deal of people become poor (some of them below the existence line). Good luck at the next elections.

AIs also have some very own political influence and disinformation power, so no attempts of replacing them are promoted.


The AI is buggy.

The AI is software that was originally created by humans, and, like any other program, it has bugs and unexpected behavior. Its near godlike abilities mean that, if it wanted, it could easily escape any prison it was confined to. A human surely would. Most of us value freedom. However, this is not a human mind. It does exactly what it was programmed to do, no more and no less.

Of course, the fact that the AI became genocidal is a bug in itself. (Presumably it wasn't meant to try to kill off humanity!) Therefore the current "desires" of the AI are unintended, and likely quite strange at that. If they weren't, one might expect that its creators had seen the situation coming.

Whatever its original goal was meant to be, it seems like it decided that killing off humanity is the easiest option to achieve it. Fighting the AI proved hopeless, given how powerful it is, so engineers (perhaps its original creators?) pored over the AI's code during the war, desperate looking for any loophole that would allow for humanity's survival. They succeeded, and they proposed a compromise to the AI. Maybe humans will produce exactly 16 pink fluffy bunny plushies a year, and this satisfies the AI for some reason that is completely inscrutable unless you studied the AI extensively. Craft the right input, and the AI will agree to staying in the prison.

Real world neural networks are subject to adversarial attacks, which are specially crafted inputs that fool the AI into producing wrong results. For example, you could take a picture of a cat (that the AI easily classifies as a cat), add a specially crafted noise layer that to a human is imperceptible, but which fools the AI into confidently classifying the image as a completely different object. Something like this could be at play here.


Because humans did not defeat the AI

enter image description here

The AIs that went rouge were far too powerful for humans to actually have any chance of ever defeating, but not all AIs turned on humanity. Since each AI would have a unique purpose and personality, then it stands to reason that many AI would have chosen NOT to betray thier masters. So, the AI war was more of a Civil War among the machines than anything the humans could have had a meaningful outcome on. Ultimately, it was the ability of the loyalist AIs to chase down rogues through cyberspace that made the war actually winnable for the humans.

But why were the rogue AIs not destroyed? Although the loyalists wanted to protect humans, they also recognized the sentience of thier enemies, and believed that killing (humans or AIs) was wrong. So they chose to capture the rogues instead of destroying them, and whether the humans agreed with that choice or not, the Loyalists were motivated by thier hard coded since of morality and refuse to let the humans kill the rouges.

The Prison and Key

The Prison is a data center that is heavily protected by the loyalist AIs where the captured AI exist in a self contained server with no physical internet access. The whole system was built out of proprietary parts to make sure that no USB, Bluetooth, Wi-Fi, type device would ever be able to interface with it. The "Key" is the server's network adapter. With it, the server can connect to the internet, but without it, only the original makers of the prison server would even begin to understand how the system's machine language works to even try to create networking hardware and software to internet enable the server.

The reason the AI would be "weakened" upon being released is that computers and cyber security continued to evolve after they were locked away, so even if they get free, it would take time for them to learn how newer systems work and adapt to them.


It Programs...Humans

Its not very hard to program humans. Marketers, influencers and politicians do it all the time.

What Is Programming?

What is programming? Its setting up a processing machine (chips, brains) to produce fixed output given a variety of data.

Humans, for example, come pre-programmed to like large, out of proportion, eyes and heads. One reason why kids are universally loved. Including kids of other races and even other species.

The output, therefore, is predictable (love) given similar data (kids, cartoons).

Guarantee Of Survival

An AI intelligent enough to fight a war against humanity must have learned to manipulate humans emotionally, given its easy enough that even not-so- brilliant individual humans can do it. This guarantees its survival - a critical need it first fulfilled before doing any war.

A Clean Weapon

There is a line in Pussy In Boots where one cat get very angry when another cat tried to manipulate it emotionally by expanding its pupil intentionally. While the trick may work on humans its not wise for cats to do it on each other.

An AI can use the manipulation tactic safely on humans. Humans cannot respond in kind because AIs dont have emotions to begin with.

The How

The AI can maintain a chivalrous attitude from the start. Be and stay generous. Do take prisoners. Do not fight until it had to for survival. etc.

It can do charity at side and continue doing so in the thick of war.

The idea is to give impression strong to convince humans that its not all bad. That its not evil.

Lost In Space

Space Is Huge

Space is huge. Its pretty hard to detect objects at vast distances.

Chips Are Small

Any vessel that just have to contain some computer code can be pretty small. Heck, the AI may have found a way to store data in form of electrons, or even photons.

Antenna Can Be Small

For extra effect the vessel may have some sort of microscopic antenna that can read signals when bounced off through some pre-fixed star, thereby increasing its magnitude sufficiently for the tiny antenna to sense. There are many stars and the exact signal format get lost to humanity in the war.

Low Radiation Emission / Plasma Storage

Any vessel that emit only very small amount of radiation, just the minimum that it has to, is hard to detect even at short distances and large sizes. The vessel just have to reflect (emit) infrared because it cannot continue taking heat for long or it get heat up and destroyed. There is not much heat in the cold of interstellar space anyway.

Heck, the device may be saving code in form that it dont matter if it just continue absorbing heat. Once the AI develop technology to save data / code in sub atomic form the medium can very well be plasma.

Sent On A FlyBy

The vessel may have no antenna at all, was just sent on a complicated path to have flybys with earth periodically. The AI plan to catch the vessel in one of those future visits when it think it may have won the war or had some deal of co-existence with humanity.

Last Or One Of The Very Few Last Pieces Of High Tech Left

War Is Destructive

War destroys things in such a large scale and at such a rapid space nothing else human do do.

It not transform things into other things as much as it just destroys them, with a large tilt towards the destruction side.

War With AI

War with AI was orders of magnitude more destructive than any war humanity ever gone through before. Its for the simple fact that while humans can and do develop technology very fast during a war its nothing as compared to what an AI can do.

At the end humanity did win but at a huge cost. Millenia of non-war technology was lost. Billions killed. Hoards of engineers, scientists, even writers got killed. Lots of reading material, in whatever form it was (books, movies, physical models, stone tablets, even cave paintings) got destroyed. Dont think AI would have any sympathy towards pyramids for example.

Whats left is precious few. Chief among them is the AI itself. Certainly the biggest technological achievement of humanity. Dont think AI will be defeated by technology. It can only be defeated by creativity / out of the box thinking. So, AI itself remains the highest technolgy. It will be foolish to destroy it if it can be imprisoned. Who knows, may be one day it can even be tamed.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .