Skip to main content

You can try out this AI-created magic card trick at home

card trick
Dmytro Surkov/123RF
Writer Arthur C. Clarke famously said that, “Any sufficiently advanced technology is indistinguishable from magic.” With one of their latest research projects, researchers from Queen Mary University of London are carrying out a variation on this idea — by using technology (and, more specifically, artificial intelligence) to create a “mind-reading” card trick.

The trick involves a magician with two decks of cards. These get shuffled, and then the subject is asked to pick a total of eight, including both words and image cards. They must then choose a word and an image, without showing it to the magician. The magic bit? That the magician has already written down the pairing the person has chosen. It seems like spooky stuff, although its creator points out it is basic psychology.

“The AI system [that created the cards looked] for words and pictures that are closest in some type of meaning, a measure called semantic similarity,” Peter McOwan, professor of computer science, told Digital Trends. “The algorithm finds sets of themed target words and pictures that match — such as ‘hunger’ — and other sets of words and picture that don’t match as well, such as ‘fashion.’ We then produce printed cards with these sets of similar and different word and pictures, and use a bit of clever maths in the card shuffle and dealing that means each pile of cards dealt has only one target word or target picture in it. When a spectator picks a word packet and a picture packet, it’s most natural to make the word and picture association we want them to, so our prediction proves correct.”

Image used with permission by copyright holder

It’s neat because — at its root — it is a classic trick. There is no EEG brainwave reading, or fancy levitation. Instead, it is using pattern recognition and internet searches to discover how the  mind subconsciously matches words and pictures. It is based on an idea that a  magician could probably do but computers and big data make significantly easier. The researchers successfully tested the finished magic trick on attendees at science fairs — and used this to verify that it worked correctly.

A paper describing the work was recently published in the journal PLOS One. If you want to have a go for yourself, you can also download the assets here.

“It’s a new area of study, which is always exciting to start to explore,” McOwan said. “Magic has been a hobby for years, but it’s also an interesting way to explore areas like machine creativity and human perception and cognition.”

Next up, he wants to use AI to come up with magic tricks from scratch. Just so long as they do not all involve sawing us pesky humans in half, we’re happy!

Editors' Recommendations

Luke Dormehl
I'm a UK-based tech writer covering Cool Tech at Digital Trends. I've also written for Fast Company, Wired, the Guardian…
Microsoft says bizarre travel article was not created by ‘unsupervised AI’
Microsoft logo

According to a recent article posted by Microsoft Travel on microsoft.com, attractions worth checking out on a visit to the Canadian capital of Ottawa include the National War Memorial, Parliament Hill, Fairmont Château Laurier, Ottawa Food Bank ... hang on, Ottawa Food Bank?

Spotted in recent days by Canada-based tech writer Paris Marx, the article puts Ottawa Food Bank at number 3 in a list of 15 must-see places in the city. And as if that wasn't bad enough, the accompanying description even suggests visiting it “on an empty stomach.”

Read more
Hackers are using AI to create vicious malware, says FBI
A hacker typing on an Apple MacBook laptop while holding a phone. Both devices show code on their screens.

The FBI has warned that hackers are running wild with generative artificial intelligence (AI) tools like ChatGPT, quickly creating malicious code and launching cybercrime sprees that would have taken far more effort in the past.

The FBI detailed its concerns on a call with journalists and explained that AI chatbots have fuelled all kinds of illicit activity, from scammers and fraudsters perfecting their techniques to terrorists consulting the tools on how to launch more damaging chemical attacks.

Read more
Even OpenAI has given up trying to detect ChatGPT plagiarism
A laptop screen shows the home page for ChatGPT, OpenAI's artificial intelligence chatbot.

OpenAI, the creator of the wildly popular artificial intelligence (AI) chatbot ChatGPT, has shut down the tool it developed to detect content created by AI rather than humans. The tool, dubbed AI Classifier, has been shuttered just six months after it was launched due to its “low rate of accuracy,” OpenAI said.

Since ChatGPT and rival services have skyrocketed in popularity, there has been a concerted pushback from various groups concerned about the consequences of unchecked AI usage. For one thing, educators have been particularly troubled by the potential for students to use ChatGPT to write their essays and assignments, then pass them off as their own.

Read more