Abstract
We present THEaiTRE, a starting project aimed at the automatic generation of theatre play scripts. This paper reviews related work and drafts an approach we intend to follow. We plan to adopt generative neural language models and hierarchical generation approaches, supported by summarization and machine translation methods, and complemented with a human-in-the-loop approach.
Introduction
To celebrate the 100th anniversary of Karel Čapek’s play R.U.R.—the seminal work that introduced the word "robot" to the global lexicon—researchers at Charles University have launched the THEaiTRE project. The project’s primary objective is to leverage artificial intelligence to generate a full-length theatre script, effectively bringing the concept of the artificial worker full circle.
While Large Language Models (LLMs) like GPT-2 have demonstrated remarkable proficiency in generating short-form text, they struggle with the "marathon" requirements of a full-length play. A successful script requires more than grammatical accuracy; it demands long-term narrative coherence, consistent character development, and a "dramatic situation" that drives the plot toward a meaningful conclusion. Current AI models often suffer from "forgetting" characters, generating repetitive dialogue, or failing to maintain a logical sequence of events over extended contexts.
Methodology
The THEaiTRE project proposes a multi-stage approach to overcome the limitations of standard text generation:
1. Hierarchical Generation
Rather than attempting to generate a play in a single pass, the process is decomposed into a hierarchical pipeline: Title $\rightarrow$ Synopsis $\rightarrow$ Character List $\rightarrow$ Script. This structure mimics the human creative process, providing the model with a roadmap to maintain thematic and narrative consistency across scenes.
2. Fine-tuning and Domain Adaptation
The team utilizes GPT-2 as a foundational model, fine-tuning it specifically on a corpus of theatre and movie scripts. This process teaches the model the formal conventions of drama, such as the specific formatting of character names followed by dialogue and stage directions.
3. Automated Data Synthesis via Reverse Summarization
A significant challenge in this domain is the scarcity of structured play-synopsis pairs. To address this, the researchers employ abstractive summarization as a data augmentation tool. By taking existing scripts and summarizing them into synopses, they create a synthetic dataset that allows the model to learn how to expand a brief plot point back into a fully realized scene.
4. Character-Specific Modeling
To prevent the "monotone" voice common in AI outputs, the project explores the use of specialized language models for different character types. By clustering character traits across a wide variety of plays, the system can assign specific LMs to different roles, ensuring distinct personalities and speaking styles.
5. Human-in-the-Loop Intervention
Recognizing that fully autonomous AI playwrights are not yet feasible, the system incorporates human intervention. Theatre professionals define initial prompts and "rerank" or curate the AI's output, ensuring the final script is stage-ready and dramatically compelling.
Data Collection and Processing
The project focuses on both English and Czech languages. Interestingly, the researchers found higher data availability for Czech, with over 600 plays and 1,500 synopses, compared to approximately 150 plays and 100 synopses in English. To standardize this data, the team is converting disparate formats (HTML, XML, and plain text) into a structured JSON format that explicitly labels acts, scenes, character names, and stage notes. Furthermore, Machine Translation (MT) is used to bridge the gap between the two languages, effectively doubling the training material available for each.
Preliminary Results and Insights
As the project is in its early stages, results are primarily qualitative:
- Structural Success: When properly prompted, GPT-2 successfully adheres to the formal structure of a script (e.g., Character: Line).
- Narrative Challenges: Without hierarchical constraints, the base model fails to sustain a "dramatic situation." Characters often appear or disappear without logic, and scenes frequently loop or lose direction.
- Summarization Utility: Using summarization to create "ground truth" labels for training has proven to be a novel and effective method for generating the data needed for hierarchical expansion.
Limitations and Future Work
The primary hurdle remains long-term coherence. Maintaining a plot over 60+ minutes of stage time is an unsolved problem in Natural Language Processing. Future efforts will focus on:
- Refining the Human-AI Interface: Determining the optimal points for human "nudges" to keep the plot on track without stifling the AI's creative output.
- Coreference Resolution: Improving the model's ability to track character references within messy, spoken-style dialogue.
- Production: The project aims for a January 2021 premiere, which will serve as a practical "Turing Test" for the AI-generated script in a live performance environment.
Summary updated