The first theatre play written by AI

30. 5. 2021 | News

The first theatre play written by AIKarel Čapek is a Czech writer known for his invention of the word ‘robot’. His famous play R.U.R. premiered in 1921 and now, a century later, comes a play written by the artificial intelligence. The project called AI: When a Robot Writes a Play was created as a unique experiment at the Faculty of Mathematics and Physics in cooperation with Švanda Theatre and DAMU.

“This project is fulfilment of my life aspiration because it connects several things I like: Karel Čapek, artificial intelligence, language research and theatre,” said dr. Rodolf Rosa who leads the project and works at the Institute of Formal and Applied Linguistics at Charles University. “In order to use artificial intelligence in future, we first have to understand it,” he comments.

Together with his colleagues from the Institute, he created a system for automatic generation of play scripts based on machine learning. He used the language model GPT-2 from OpenAI which processed 40 GB of text from eight million webpages. The play was written 90% by the AI and only 10% was adjusted by humans. The team gave the AI only an introductory scene and the rest was generated automatically.

The play consists of eight scenes narrating a robot’s journey in the human world and it’s a mixture of black comedy and existential drama. “I was surprised by what the play says about us humans. It shows that our most common topics are violence and sex,” said David Košťák, the dramaturgist. Daniel Hrbek, the director, adds: “I was astonished that the play also reflects the time when it was written—there’re motifs of isolation, fear, anxiety and uncertainty.”

The project was a huge success but dr. Rosa already sees things for future improvement: “We discovered that it’s relatively easy to generate a play script but the main challenge was to teach the AI that characters in a play are beings with their own goals and motivations. Also, the system isn’t trained for dialogues between more people but for general texts with only one speaker.”

The team’s work doesn’t end with the play’s premiere, though. The researchers want to keep improving the system and release another play in one year.

See more articles on the topic

Upcoming conferences in September 2023

The summer is slowly coming to its end which means that the academic year 2023/2024 is here! We hope that you’re excited to either return to school or start an exciting new journey as a first-year university student. There are many interesting conferences that you can attend this September so don’t miss out on those! […]

read more

Study Psychology and Social Sciences in the Czech Republic

With increasing awareness of mental health issues, there is a growing demand for experts in the psychology field. Modern life can sometimes be stressful. On the one hand, computers and modern technologies enable people to work more efficiently, but on the other hand, they also pose a challenge for many individuals due to everything getting […]

read more

Student Ambassadors: Diego Olivas from Mexico

My name is Diego Olivas, I am a student from Mexico currently enrolled in the bachelors Science programme in English at Charles University in Prague. This is the story of how I found out about Charles University and how my life has been while studying here the last 6 months. I knew since primary school […]

read more