Depending on whom you ask, magic may be the essential ingredient in a fantasy story—or the result of illusions created by highly skilled people. In this case, magic becomes the plaything of an artificial intelligence developed at Queen Mary University of London. Its tricks are grounded in mathematics, but that does not make them any less enchanting.

The Twelve Magicians of Osiris are arranged across eight pieces to form a puzzle. Eight pieces may not seem like much, and you might expect only a few possible arrangements. Yet with tiny adjustments, two of the magicians disappear. What happened? Where is the visual deception? The pieces have not been swapped, and neither their shape nor their number has changed. The trick is the work of an artificial intelligence applying algorithms. Once it has learned the mechanics behind puzzles and card tricks, it can generate all kinds of variations far faster than any magician could.

https://www.youtube.com/embed/PsBWBs1pIG0

The second trick comes as an Android app called Phoney. The participant provides basic information about six cards the magician cannot see directly—for example, their colors—and then chooses one of them. The effect makes it seem as though the app is reading the other person’s mind. In reality, it relies on precise manipulation of the deck, and Phoney can “guess” the selected card with around 80 percent accuracy in its first two attempts.

https://www.youtube.com/embed/xZiqkoaCaic

Phoney is available from the official Google store. The Twelve Magicians of Osiris is available as a PDF, so you can download the material and make your own variations. Mathematical tricks are nothing new, and they certainly will not be the last of their kind. Personally—and without trying to start a debate—I do wonder whether it is quite right to call this artificial intelligence. That is how the people behind the project describe it, but numbers, card orders, and piece shapes sound more like statistical information processing to me. Perhaps “advanced programming that generates magic tricks” would be more accurate. Still, I have no wish to argue the point: this is undoubtedly an interesting project.

Explore The Twelve Magicians of Osiris: Click here

Download Phoney: Click here