AI-generated fan fiction, music videos, and film scripts are often so bad that they’re hilarious. Could an AI program get the same number of laughs if it attempted improv comedy in front of a live audience? As Inverse reports, artificial intelligence researcher Kory Mathewson created an algorithm to find out.

Mathewson, from Canada’s University of Alberta, teamed up with London-based researcher Piotr Mirowski to create a chatbot, A.L.Ex, which stands for Artificial Language Experiment. They fed subtitles from 100,000 films into a neural network in the hope that A.L.Ex would be able to come up with jokes and carry on a conversation with a live human performer. (They also applied a filter to the robot to stop it from saying “politically incorrect” things, and presumably to prevent a disaster akin to Tay, Microsoft’s Twitter bot.)

Once A.L.Ex was sufficiently prepared for the spotlight, a performer interacted with the chatbot (who was given a robot body) on stage in an improv scenario. Audiences were asked to participate in a Turing test: During some scenes, a human backstage was controlling the robot's responses, while in others, A.L.Ex was doing all the work. Audience members were later asked to guess whether the dialogue was coming from the bot or an actual human. The experiment was repeated in three locations: Stockholm, Sweden; London, England; and Edmonton, Canada.

The result? The bot failed to fool humans and pass the Turing test, but it still garnered a few laughs. For one thing, the system was unable to tell complete stories. “If you want to tell a story, humans tend to have to pick up the arc and carry it through, since the Cyborg rarely brings arguably important characters or plot items back,” one of the improv performers wrote, according to a paper that Mathewson and Mirowski uploaded to the preprint platform arXiv [PDF].

Mirowski told The New York Times that the bot is like a “completely drunk comedian” who is only “accidentally funny” on occasion. Fortunately for comedy lovers, machines probably won’t be taking over the stage anytime soon. “We do not think that machines will replace human actors or comedians,” Mathewson told Inverse. “We aim to build new tools and techniques for human storytellers to share their human experience. This work aims to test the development of a new form of medium.”

[h/t Inverse]