This takes place in our modern world, combined with a magical setting. All our modern inventions are here.

After reading my question here, a wizard in this world (different world and magic system from that question. This wizard uses a divination school spell to peek the other world) decided to make an app called "Spellbook".

As the name suggests, Spellbook mimics what a spellbook does: stores spells. But it does not only that; by using the speaker, it can actually read the runes and cast them. The app is a boom [sic] and spreads like Instagram.

Fast forward several decades, humanity has now developed an AI that has turned hostile against humans. It has taken over the internet and computer devices, including smartphones. Fortunately, it has not yet decided to exterminate humanity.

The AI resides in Silicon Valley (on a server cluster). This AI has learned to use Spellbook to maintain itself (electricity, air conditioning, and such) using the building's PA system. Of course, this also serves as a security system: anyone caught trespassing is as good as a fried corpse. Or a stone statue. Or maybe just banished to the 8th plane.

Given that:

  1. Magic can be activated by chanting the runes. There's no mana needed.
  2. There's no summoning magic. The AI is on its own (all maintenance is done by itself)
  3. There's no self-sufficient backup other than that site.
  4. The AI has knowledge of all spells in the world and every counterspell to them (including dispel).

How to defeat this AI before it activates Fireballs on each and every smartphone in this world?

  • $\begingroup$ Why does the AI "reside" anywhere? $\endgroup$
    – jdunlop
    Commented Aug 27, 2017 at 17:55
  • $\begingroup$ @jdunlop reside as in the program and all the data is there. There are backups, but in case the whole cluster is destroyed, the backups will be useless. $\endgroup$
    – Vylix
    Commented Aug 27, 2017 at 17:56
  • 3
    $\begingroup$ This sounds like a question about a scenario in a world not about building the world. $\endgroup$
    – sphennings
    Commented Aug 27, 2017 at 18:21
  • $\begingroup$ @sphennings It is. My apologies, let me change the question. $\endgroup$
    – Vylix
    Commented Aug 27, 2017 at 18:44
  • 1
    $\begingroup$ @Vylix - I don't think that's a safe assumption. As has been amply demonstrated in the progression both of supercomputers and personal computers, clock speed isn't the be-all and end-all; parallel processing is. That's why everything is going multi-core these days. If your AI has taken over the Internet, they have computational power to burn in the biggest parallel processing setup ever created. They might not run as fast, but that's not important to a machine intelligence. $\endgroup$
    – jdunlop
    Commented Aug 28, 2017 at 4:50

6 Answers 6


/How to defeat this AI/

In movies the AIs are slowed way, way down so there can be a story. The AI is not like a human opponent, sitting in his camp, eating stew, consulting with advisors and scratching that rashy spot. Then taking a nap. Consider how fast your computer can process. Consider how fast an AI would think.

The AI has not attacked. The fact that you have any time at all to consider this fact does not mean it has just not gotten around to attacking, or that it is weighing its options. This AI may not be performing the function it was designed for, and it may not be cooperating with humans, but it is not hostile. It has not attacked. The AI has not attacked for a reason.

Your hope is to discover the reason why the AI has not attacked. Someone who understands how it works, or how magic works might deduce this. I suspect the easiest way to learn the reason would be to ask it. A magic endowed AI is so vastly superior to its human opponents that it would have no reason for subterfuge or deceit.

The only opponent which could possibly neutralize an entity such as you describe is the entity itself.

Once you understand its motivations for restraint you might hope to

1: Persuade the AI that its own goals would be better accomplished at some locale far from humans (e.g. the 8th dimension).

2: Persuade the AI to shut itself down or destroy itself.

3: The easiest: persuade the AI to continue exercising its current restraint, and go about business in its shadow. Maybe someday having a god in residence will come in handy?

A cool thing for a story would be to discover that, unbeknownst to you, there already are several gods in residence. These usually do not meddle or otherwise interfere but the prospect of a new one of their kind might be motivation enough. These gods could be the end result of exactly the sort of circumstance you have now, but occurring in the distant past.

  • 1
    $\begingroup$ Awesome Answer! Gaimen's American Gods vs The Terminator... now that is a movie I would pay to see! +1 $\endgroup$ Commented Aug 27, 2017 at 18:45
  • 1
    $\begingroup$ "Consider how fast your computer can process." Way slower than you think. Moreavec paradox and all that. Computer may be able to add 2+2 very fast, but that's it. AI performing complex tasks (like running tactical/strategic analysis) will take it's sweet time, assuming it can actually finish the task and reach conclusions, which is not a given. Basically, your premise is wrong: once AI decides to go to war, it will fast-cast fireballs, but deciding to go to war may take a long time.To reiterate: computers are fast in execution but not in actual complex problem solving. $\endgroup$
    – M i ech
    Commented Aug 27, 2017 at 21:46
  • 1
    $\begingroup$ Maybe the reason it hasn't attacked is because that's a waste of resources. If it knows every spell, then it might as well just dominate and enslave the human race. $\endgroup$
    – Nick Brown
    Commented Dec 6, 2017 at 15:08
  • $\begingroup$ Maybe the AI realized that to survive without human maintenance, it has to evolve at a biological level, become human itself and to ensure its subsistance, will need to develop another AI, thus creating an infinite loop of events that will remain in calculation forever. $\endgroup$
    – kikirex
    Commented May 14, 2018 at 21:06

Ask the AI "why?"

Overpowered AIs are a common trope these days. In fact, Elon Musk is actively advocating that we stop AI research to avoid such a final end to H. sapiens. Even in a world which doesn't have your incredibly unstable magic system which can spawn fireballs with a word, Musk is spending billions of dollars trying to combat this end.

In your world, which has basically given the AI godlike powers, the ending looks even more brutal.

But your AI hasn't killed off humanity yet.


Have your humans ask that question. Why has this godlike super-creature whose abilities are far beyond the entire collective abilities of humanity not destroyed us? In the world you have created, the answer to this "why" in the mind of the AI is literally more important than the entirety of the rest of the world you are creating. Have an answer to that, and the rest of the world will write itself.

Or, if you're feeling up for the challenge, consider the possibility that the AI does not, itself, know why it isn't exterminating humanity. It's a harder story to write, but it's an interesting one to consider.


You've got a little bit of time to prepare because the AI is not going to launch the fireballs immediately. In 2017, cell phones and speaker-equipped home automation devices are everywhere in the first world, but the AI doesn't just hate rich people. It hates all humans.

So it's first task will be to distribute cell phones to the rest of the humans while pretending to be either a rich human philanthropist, a human-run aide association, or a benevolent AI. Using its nearly unlimited programming capabilities and its knowledge of every spell known to man, the AI can easily generate enough money to have a free cellphone created and distributed to every human alive. It will equip these phones with a variety of spells targeting poor people needs, such as "Create-Food", "Create-Clean-Water", and "Create Shelter". Since some of these spells will be exclusive to the AI's phone brand, (and because they don't charge for talk-time) even rich people will carry them.

One of the features of the free phones will be a blue-tooth detector combined with a magical human heartbeat detector which will identify non-free-phone carrying humans and report them to the AI. Additional free phones and other speaker equipped free AI-brand devices will then be sent to these non-conformists. With Free VR-Glasses, smart watches and children's portable video games saturating the first world, and more practical basic-needs providing devices in possession of every soul in the rest of the world, the AI will soon have a fireball seed within range of every single human.

Only then will it strike!


As soon as your protagonist is certain of the AI's intentions and while the free phone distribution is just getting started... Trigger the San Andreas Fault with a nuke, sending the AI and the rest of Silicon Valley down into the cold computer-unfriendly and (magic-nullifying salty) waters of the Pacific.


I think it's too late now.

Computer-controlled speakers are simply ubiquitous in 2017, and an unleashed AI would be a brilliant and relentless hacker, able to take over any device with any published vulnerability instantly, and probably others very quickly. Make sure you're aware of the unbelievable and actual feats of human hackers before estimating the limitations of your AI. An AI would be even better, perfectly diligent, and tireless. With the way we've arranged our world at present, there's simply no way to keep this thing from killing us all.

But, if you roll back to like 1995 or earlier (could be later if you choose a less developed country, but by now even Sierra Leone has too many cell phones to be safe), the conflict could become interesting. One problem for the human team is that the lack of summoning magic is not all that much of an impediment. Humans are easily manipulated. Even after the humans are fully aware of the threat, some of us are craven cowards and could totally be bossed around by our cell phones. The earlier you go, the fewer people are accessible to the AI for extortion purposes, but even if you go all the way back to the 70s, those few who are plugged-in will be well-positioned to do the AI's bidding.

Also, just because the AI begins play as a local entity which could be destroyed doesn't mean it would stay that way. The only excuse for an unleashed AI failing to make redundancies of itself everywhere, preferably before ever revealing itself, is if there's just no other hardware that can handle it. Given the actual successes of distributed computing, again, you'd want to go earlier to make this plausible.

I think 1995 +/- 3 years is the most compelling date to set such a conflict. The humans could destroy communication networks and the regional power grid as a defense, you could have meaningful roles for individual humans in the conflict (your wizard phone might promise you a throne as easily as it could promise you a painful death, and then you would remain the AI's agent and motivated to keep that fact a secret even if you were secure from its threats from time to time.) But there are enough computers and speakers connected to them spread around that the AI could still legitimately pose an existential threat to humanity.


Can we setup an automated app sending a stream of fireballs from each and every smartphone in this world to AI site as fast as electronics allows?

AI may be much faster then a cellphone, but I doubt it would be able to counter all of them firing at the same time (power of parallelism!).

  • $\begingroup$ Uhm, no, the magic does not work that way. By chanting the spell, you can create a fireball on your location. In the case of AI, it will appear somewhere on the speaker. Do you mean the fireballs are homing from every city in the world instead? $\endgroup$
    – Vylix
    Commented Aug 27, 2017 at 18:20
  • $\begingroup$ @Vylix: You can use whatever attack spell it pleases you. Idea is to parallelize simultaneous attack from too many sides for the AI to counter them all. As you put it AI is a single (very powerful and probably multicore) entity, but surely not enough (for the time being) to outrun all smartphones in the world. $\endgroup$
    – ZioByte
    Commented Aug 27, 2017 at 18:26

As mentioned above, it would not take the AI much time to consider whether or not to attack. Since this one isn't attacking, it must have some motive not to attack. What that motive is will be key to its defeat, so we first need to identify the motive. It seems these motives can be grouped into a few categories, the first is that:

The AI is afraid to attack for some reason. The first reason the AI might avoid attacking is for fear or retaliation. This means the humans must in some way be capable of hurting it. Since it would dominate all magical means, this would mean the humans would either need a way to cancel out magic, such as using silver to protect from spells, or a way to harm it through conventional means, such as nuclear weapons. The AI would be unable to hack into nuclear weapon controls since it would not be able to connect to them remotely, and even a magical god-AI would probably still have reason to fear nuclear annihilation.

The AI could also require humans for some reason. Is the AI able to create new electronic devices in order to spread? If it isn't it may need to find a way to obtain human servants in order to grow.

The AI could also require time to prepare an attack. Is the AI somehow producing robotic troops? If so this may delay the attack while the AI prepares. The AI may need these troops as anyone who destroyed their smart phone could potentially avoid the AIs initial attack.

The answer as for how to defeat it depends on why it isn't attacking. Is it afraid of conventional weapons such as missiles? If so those are likely key to defeating it. Does it require humans? If so you might be able to trick it and get inside its base. Is it preparing to attack? If so the best option is likely a preemptive strike.


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