A Robot Walks Into a Bar. But Can It Do Comedy?

LONDON — One recent evening at a London pub, Piotr Mirowski, 39, stood in front of several dozen comedy fans to prove that an artificially intelligent computer program could perform improvised comedy.

Posted Updated

Alex Marshall
, New York Times

LONDON — One recent evening at a London pub, Piotr Mirowski, 39, stood in front of several dozen comedy fans to prove that an artificially intelligent computer program could perform improvised comedy.

In one hand, he held a bug-eyed toy robot, its lines voiced by the program. With the other, he pretended to grip a steering wheel. The robot was playing Mirowski’s partner; they were taking a scenic drive together.

“I am not trying to be angry,” the robot said, suddenly breaking the mood.

“I don’t want you to be angry — this is our quality time,” Mirowski replied.

“I’m sure that you will find love,” the robot said after an awkward pause, drawing a firm end to the couple’s relationship, and prompting laughter from the audience. “I’m so tired,” it added. Mirowski made a final attempt to save things, but the robot would not listen. “You are not me. You’re my friend,” it said, emotionless.

For someone who had just been dumped in front of a paying audience, Mirowski looked happy. Why? Because the AI he created had worked, and stuck to the topic at hand — a rare event, he said later in an interview.

For the past few years, AI has been generating attention — and alarm — in many areas of arts and culture. Startups and tech giants are developing AI systems that can write music, for example, while others are using the technology to generate art. Some fear these projects will put musicians and artists out of work.

Using computers to make comedy has received less attention, but it has a surprisingly long history. In the early 1990s, researchers at the University of Edinburgh wrote a program that could produce question-based puns such as “What do you call a good-looking taxi? A handsome cab.” (It “succeeds in generating pieces of text that are recognizably jokes, but some of them are not very good jokes,” the researchers said in a paper on the project.)

Today, around a dozen people in Europe and North America are working on similar projects, mainly in their spare time from AI-related jobs, Mirowski said. (He is a senior research scientist working on artificial intelligence at Google DeepMind, but said his work there was not related to comedy.)

Mirowski was born in Poland, but spent most of his childhood in France, playing role-playing and video games, he said. He fell in love with improv at college, both the challenge and playfulness of it, and kept doing it after he graduated and started working in AI.

He long thought of combining his passions, but said he had only realized it was possible in 2014, partly because of systems that could quickly analyze large volumes of text, spot patterns and then produce sentences in response. Mirowski decided to apply that to improv skits.

The system he built was remarkably simple. ALEx (which stands for Artificial Language Experiment) has been fed the subtitles from more than 100,000 films, from action movies like “Deep Impact” to the pornographic film “Deep Throat.” When someone talks to it, the system uses a tool called a neural network, vaguely modeled on the brain, to analyze similar exchanges in its database and compose its own response.

Mirowski made his stage debut with ALEx in July 2016. It did not go to plan. “There was a moment where it didn’t say anything as the speech recognition crashed,” Mirowski said, “so I had to say, ‘I see you want to stay silent.’ That is something you can only really do once.”

Around that time, Mirowski met Kory Mathewson, an AI researcher at the University of Alberta in Canada who had developed a comedy chatbot he was trying to use in live improv, and the two began collaborating. They have made numerous improvements to ALEx, including tweaks to its code to make it better at sticking to a topic. (If a sketch is set on a pirate ship, you don’t want it to suddenly talk about space.)

ALEx is now at the point where the pair are happy for other improvisers to work with it. In recent shows in London, Mirowski also used the system to feed a performer lines through a headset.

Despite all the improvements, Mirowski said working with an AI was still like having a “completely drunk comedian” on stage, who was only “accidentally funny,” by saying things that were totally inappropriate, overly emotional or plain odd.

“Robots are in a way the antithesis of theater and comedy,” he said. “Theatre is about the human expression on stage, and it’s about the communication and empathy between the actors and the audience. Robots do not have the sensors to perceive any of that.”

What AI is good at, Mirowski said, is saying unusual things that challenge the human improviser to work harder, which can increase satisfaction when they manage to make a scene work. “Improv is like intellectual and mental tightrope walking,” he said. “The robot is kind of making the tightrope longer.” In a Skype interview, Mathewson agreed that the joy of working with an AI system came when you managed to do a show that did not just rely on the randomness of the responses for humor, but which kept a story going.

His early shows were failures in that respect, he said. In one, he swore in exasperation, and the machine replied, “Swearing is often cathartic.” Now he has improvised with it publicly more than 50 times. When shows are a success, they are more celebrations of human creativity than anything to do with AI, he added.

During the show Wednesday, Mirowski performed several different scenes using the AI. None were anywhere near as successful as the one involving the couple going for a drive. The climax of the show involved four members of Mirowski’s improv troupe, Improbotics Ltd., performing a scene involving a fictional president, his chief of staff and an office cleaner.

The audience had to guess which actor was controlled by the AI. The answer became clear soon after the cleaner took to the stage. “I’m a communist!” she said, completely out of the blue. Later, she performed a U-turn. “I’m not a communist!” she said. Then, out of nowhere she asked another member of the troupe, “Look, do you want to buy a knife?”

Mirowski watched behind several laptops from the side of the stage. He was smiling. His AI was making no sense. But it was getting laughs.

Copyright 2023 New York Times News Service. All rights reserved.