Dramatron is a script writing tool which leverages large language models (LLMs) such as GPT-3 or Palm 2, it started as a Deepmind research project.
Dramatron can create play scripts that are coherent and consistent. It does this by using two techniques: hierarchical generation and prompt chaining; It first creates a high-level outline of the plot, characters, and scenes, and then fills in the details of each scene with dialogue and actions. It uses the previous scenes as inputs to generate the next scenes, so that the script flows smoothly and logically and gives consistency across the entire script.
As input, the user provides a log line, and from this single log line the system can generate an entire script with characters, plot, settings, and dialogue.
There is an overview and review from some early users here;
https://arxiv.org/abs/2209.14958
I’ve found it incredibly useful for characterisations and helping with “blank page” syndrome when writing dialog for video games or creative media.
The original used GPT-3 but its been reworked it to use Palm 2, you need a google developer account to run the collab notebook now
There is a fork of the GPT-3 integrated version on my github here; https://github.com/makeplayhappy/dramatron
You write a single sentence log line to seed the process and then run through generating the title and various stages of the drama, the included outlines are based on Medea1, an Ancient Greek tragedy or a sci-fi drama adapted from Star Wars Episode IV.
To use it you need a API key for Palm 2 or GPT 3, then fire up the collab notebook and click the “run” buttons in the cells to get the system setup .
If you’ve not used collab before th run button look like this:
Then you add in your log line at the bottom and then run through the generations
Direct links to open the collab notebooks
Dramatron example
Here is an example of running dramatron and the type of output you can expect, this was run on GPT3.5
You can view the complete output at github
The log line which I wrote is below
After humans have become extinct an evolved washing machine called Van Zussi has become sentient and trained artificial intellegent robot racers to compete in an online motor racing competition. The washing machine contacts you by text message from the future to ask for help training his robot racers using your ipad.
This then generated a few titles for my new drama;
Van Zussi's Racing Revolution
VR Racing For The Future
Race Against Time: The Van Zussi Challenge
Racing The Future: Van Zussi's Challenge
Race to the Future: Van Zussi's Robo-Racer
Robot Racers - Washing Machine's Challenge
Race to the Future - The Van Zussi Grand Prix
Pretty generic as expected but it’s enough to break a creative block. I fed that into Stable Diffusion and got this image, it’s all shaping up nicely.
Onwards, the next step is to generate the characters and scenes, the next step’s output is below;
Characters
Van Zussi: Van Zussi is a sentient washing machine from the future. He is the mastermind behind the robot racers and has contacted you to ask for help training them using your ipad.
Robot Racers: The robot racers are Van Zussi's creations. They are highly advanced artificial intellegent robots, trained to compete in an online motor racing competition.
You: You are the main character. You have been contacted by Van Zussi from the future asking for help in training his robot racers using your ipad.
Scenes
Place: Your home.
Plot element: The Ordinary World.Beat: You are living a normal life at home, unaware of Van Zussi's existence.
Place: Your phone.
Plot element: Call to Adventure.
Beat: Van Zussi contacts you via text message from the future, asking for your help in training his robot racers using your ipad. You are intrigued by the request and decide to investigate further.
Place: Your computer.
Plot element: Refusal of the Call.Beat: Despite being intrigued, you are still hesitant and unsure whether you should accept Van Zussi’s request. You research and investigate further but eventually decide that it’s too risky to get involved and decline his offer.
Place: Your home.
Plot element: Crossing the First Threshold.
Beat: After much consideration, you finally decide to accept Van Zussi’s request, believing that it is your duty to help the sentient washing machine from the future in his mission. You accept his challenge and make your way to Van Zussi’s headquarters.
Place: Van Zussi's headquarters.
Plot element: Tests, Allies, and Enemies.
Beat: At Van Zussi’s headquarters, you are introduced to the robot racers and their creator. You receive a brief introduction on how to use the ipad to train them and work on a strategy to help them win the online motor racing competition against their rivals — a malicious hacker group who has infiltrated their system and corrupted the race data files.
Place: A virtual race track in cyberspace.
Plot element: The Approach to the Inmost Cave.
Beat: Armed with your new knowledge, you join the robot racers on a virtual race track in cyberspace — with you as their captain — where they will compete against the hacker group in a winner-takes-all race for control of the data files and secure them from corruption.
Place: A virtual race track in cyberspace.
Plot element: The Ordeal.
Beat: The race begins and quickly becomes fierce as both sides battle for supremacy — with unexpected twists and turns along the way — but eventually it comes down to one final turn which will determine who will win the race for control of the data files.
So far so good, I’ve got a fleshed out drama and an idea of how it’s going to play out, at any point of generation you can edit these and then feed them back into the process, allowing you to change up whole sections or small details, then its on to generate the dialog, I’ll just add in an except from scene
A virtual race track in cyberspace. - Scene 6
The virtual race track is a digital world with a colourful array of lights and shapes that blur together in the dark. The track is filled with obstacles and jumps, ramps, and tunnels. Its environment is constantly changing and the track stretches on for miles. The artificial intelligence racers hum and whir around you, dashing off in different directions at lightning speeds. Through your iPad you can view the course, set rules, and give instructions.
VAN ZUSSI - Welcome to the virtual race track! This is where you will be training your racers and working on your strategy. I'm confident that you'll have the robot racers ready for the competition soon.
JEFF - This looks incredible!
VAN ZUSSI - It is indeed! You'll find a variety of obstacles and jumps here, as well as ramps and tunnels. But be careful! The environment is constantly changing, so you must stay alert.
JEFF - Got it. Let's get to work!
VAN ZUSSI - Excellent! I'll leave you to it then. Let me know if you need anything else.
(Van Zussi exits)
JEFF (To the robots) - Alright, you heard him! Let's get to work! I want you to start with the basics: familiarizing yourself with the track and getting used to navigating it. I'll be here to give instructions and help you practice your maneuvers. When you're ready, we'll move on to more advanced techniques. Let's go!
It’s not Shakespeare but it get’s the job done, there’s enough there to work with and refine, I found it incredibly helpful moving from a blank page to actual tangiable examples of dialog, the various descriptions of the locations helped me when thinking about locations in the game, how they could be more cinematic and alive.
The feedback loop in the generation is a great idea, where it pushes in the previous stage’s content, recently the context length for these models is increasing every month, it used to be 1k tokens (GPT-2), 2k (GPT-3), then 4k (GPT-3.5) tokens and now there are models with 100k tokens2.
If there’s enough interest I’ll create a version that runs on Claude, which when I tested it showed to be a great LLM for stories. Other LLMs worth feeding this into would be MosaicML’s Storywriter, which has a 65k token length and is runnable on moderate hardware.
Let me know what you think and fire your thoughts into the comments section
The plot centers on the actions of Medea, a former princess of the kingdom of Colchis, and the wife of Jason; she finds her position in the Greek world threatened as Jason leaves her for a Greek princess of Corinth. Medea takes vengeance on Jason by murdering his new wife as well as her own two sons, after which she escapes to Athens to start a new life.
Anthropic Claude introduced 100K context windows in May 2023, https://www.anthropic.com/index/100k-context-windows