Researchers gave a computer program the outline of how a magic jigsaw puzzle and a mind-reading card trick work, as well the results of experiments into how humans understand magic tricks. With this information, the system created completely new variants on those tricks which can be delivered by a magician. The tricks the computer created were of the type that use mathematical techniques rather than theatrics, and are a core part of many magicians’ repertoires.
The new magic tricks proved popular with audiences, and the magic puzzle was actually put on sale in a London magic shop. The card trick is now available as an app called Phoney in the Google Play Store.
Co-creator of the project, Howard Williams, from the School of Electronic Engineering and Computer Science at Queen Mary University of London, explains how a computer can aid trick creation: “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. So, while a member of the audience might have seen a variation on this trick before, the AI can now use psychological and mathematical principles to create lots of different versions and keep audiences guessing.”
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
- size of the puzzle
- number of pieces involved
- number of shapes that appear and disappear
- ways in which the puzzle can be arranged.
Something this complex is ideal for an algorithm to process and to make decisions about which flexible factors are most important.
The mind-reading card trick involves arranging a deck of playing cards in a specific way and then, based on a few seemingly innocuous pieces of information from the audience, identifying a card that has been seen selected from the deck. An Android app is used 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. The app simply avoids the magician having to remember the order of the cards.
Professor Peter McOwan, part of the QMUL team who worked on the project, added: “Using AI 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.”
Videos
Further Information
- The ‘Phoney’ app can be downloaded from Google Play Store
- The jigsaw puzzle trick can be downloaded for you to recreate.
Read the paper “Magic in the machine: a computational magician’s assistant,” by Howard Williams and Peter McOwan, published in the journal Frontiers in Psychology.