Behold! These Magic Tricks Were Conjured By Artificial Intelligence

A machine invents its own magic tricks. But can it escape from a straitjacket?


Every so often, machines hit a new milestone in their quest to think more like us. Some of them–from the first automated chess player in 1914 and MIT’s 1964 precursor to modern chatbots to Watson’s infamous Jeopardy win just a few years ago–are obvious. Others are bit more subtle: like when computers invent magic tricks for the first time.


Yup, that just happened.

Artificial intelligence researchers at Queen Mary University of London recently trained computers to devise their own math-based magic tricks. The illusions–which take the form of a jigsaw puzzle and a “mind reading” card trick–were generated by AI systems that were fed information about known magic tricks.

Just as Watson can take mounds of food recipes and learn how to make delicious new ones, these magic trick variations are made possible by the AI system’s unique ability to crunch large data sets and sort through a vast array of possible outcomes more quickly than our measly flesh-based brains can.

A post on the university’s website breaks down how the jigsaw puzzle trick works:

The magic jigsaw involves assembling a jigsaw to show a series shapes, then taking it apart and reassembling it so that certain shapes have disappeared using a clever geometric principle. Creation of tricks of this kind involve several simultaneous factors such as the size of the puzzle, the number of pieces involved, the number of shapes that appear and disappear and the ways that the puzzle can be arranged. Something this complex is ideal for an algorithm to process, and make decisions about which flexible factors are most important.

And the card trick:

The mind reading card trick involves arranging a deck of playing cards in a specific way then, based on a few seemingly innocuous pieces of information from the audience, identifying a card that has been seen selected from the deck and using an Android app to reveal the card on a mobile phone screen. The computer was used to arrange the decks in such a way that a specific card could be identified with the least amount of information possible. The program identified arrangements for the deck that on average required one fewer question to be asked before the card was found than with the traditional method.

This approach simply relieves the human of the need to remember the order of the cards, allowing a computer to pick up the mental slack instead. It’s not as entertaining as watching Ricky Jay and his 52 assistants, but novelty has always been an important element in the illusionist’s bag of tricks.


What’s the practical application of all this computer magic? It’s as futuristic as you can imagine, and in fact there’s plenty of AI that is already doing much more groundbreaking work than this. Still, these AI tricks make for some fun mobile apps.

Phoney is an Android app that uses the very same technology developed at Queen Mary for this research. Other apps like Crystal Ball and Subliminal Card employ artificial intelligence as well.

Surely this is only the beginning of machines outsmarting us. Today, it’s card tricks. Tomorrow? Probably the full-fledged subjugation of the human race by soulless robot overlords. Pretty neat, though!

About the author

John Paul Titlow is a writer at Fast Company focused on music and technology, among other things. Find me here: Twitter: @johnpaul Instagram: @feralcatcolonist