The researchers provided a computer programme the outline of how a magic jigsaw puzzle and a mind reading card trick work.
The card trick is available as an app called Phoney in the Google Play store.
"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," said Peter McOwan, who worked on the project and is also a professor at the Queen Mary University in London.
The magic tricks that were created use mathematical techniques rather than sleight of hand or other theatrics, and are a core part of many magicians' repertoires, noted the study.
The tricks proved popular with the audience and the magic puzzle was put on sale in a London magic shop.
"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," added Howard Williams, co-creator of the project.
The AI can now use psychological and mathematical principles to create different versions and keep the audience guessing, said Williams.The details of the study were outlined in the journal Frontiers in Psychology.