Kinky and absurd: The first AI-written play isn’t Shakespeare—but it has its moments

_SCIENCE

Kinky and absurd: The first AI-written play isn’t Shakespeare—but it has its moments

One hundred years ago, a play by the Czech author Karel Čapek introduced the word “robot,” telling the story of artificial factory workers designed to serve humans. Now, in a metanarrative twist, a robot itself has written a play. And it premieres online today.

“It’s a kind of futuristic Little Prince,” says dramatist David Košťák, who oversaw the script. Like the classical French children’s book, the 60-minute production—AI: When a robot writes a play—tells the journey of a character (this time a robot), who goes out into the world to learn about society, human emotions, and even death.

The script was created by a widely available artificial intelligence (AI) system called GPT-2. Created by Elon Musk’s company OpenAI, this “robot” is a computer model designed to generate text by drawing from the enormous repository of information available on the internet. (You can test it here.) So far, the technology has been used to write fake newsshort stories, and poems. The play is GPT-2’s first theater production, the team behind it claims.

Here’s how it works: First, a human feeds the program with a prompt. In this case, the researchers—at Charles University in Prague—began with two sentences of dialogue, where one or two characters chat about human feelings and experiences. The first input they gave to the AI, for example, was: “Hello, I am robot and it is a pleasure to invite you to see a play I wrote.” The software then takes things from there, generating up to 1000 words of additional text.

The result is far from William Shakespeare. After a few sentences, the program starts to write things that sometimes don’t follow a logical storyline, or statements that contradict other passages of the text. For example, the AI sometimes forgot the main character was a robot, not a human. “Sometimes it would change a male to female in the middle of a dialogue,” says Charles University computational linguist Rudolf Rosa, who started to work on the project 2 years ago.

That happens because the program doesn’t really know the meaning of the sentences, says Chad DeChant, an AI expert at Columbia University. “It just puts together words that are likely to be used together, one after the other,” says DeChant, who was not part of the play but is curious to watch it. As it keeps going, there is more room for nonsense.

Read the complete story on Science’s website

Leave a comment