For the first time, some researchers in Britain have succeeded in creating magic tricks using artificial intelligence. In other words, for the first time, a computer has created its own magic tricks capable of fooling a human audience.

Researchers at Queen Mary University of London gave the computer programme the outline of how a magic jigsaw puzzle and mind-reading card trick work, along with the results of experiments into how humans understood the tricks; the system then created new variants on those tricks.

The tricks, which were designed by the computer after it was taught some basic principles, proved popular with audiences. One of the tricks, a visual puzzle using optical illusion, was put on sale in a London magic shop. However, two tricks use mathematical techniques to fool the audiences, rather than sleight of hand or other theatrics; as such, the computer program can run complex algorithms to create new tricks far more quickly than a magician could manage in their head.

A second trick created by the software involved arranging a deck of playing cards in such a way that, based on a few seemingly innocuous pieces of information from the audience, a card selected from the deck by a volunteer can be identified without being seen. On average, the computer identified arrangements of cards which required one fewer question than when the trick was performed by a magician.

The magic jigsaw trick is available as an Android app called Phoney. It involves assembling a jigsaw to show a series of shapes, then taking it apart and reassembling it so that certain shapes disappear using geometric principle. The computer can analyse the size of the jigsaw, the number of pieces, and calculate what shapes can be made far more quickly than any human magician ever could. Here’s a video where you can see how magic tricks are capable of fooling a human audience using artificial intelligence.

Professor Peter McOwan, part of the team who worked on the project, said, “Using AI [artificial intelligence] to create magic tricks is a great way to demonstrate the possibilities of computer intelligence and it also forms a part of our research in to the psychology of being a spectator. For example, we suspected that audiences would be suspicious of the involvement of technology in the delivery of a trick but we’ve found out that isn’t the case.”

Howard Williams, co-creator of the project said, “Computer intelligence can process much larger amounts of information and run through all the possible outcomes in a way that is almost impossible for a person to do on their own. The AI can now use psychological and mathematical principles to create different versions and keep the audience guessing.

The details of the study were outlined in the journal Frontiers in Psychology.