Interactive storytelling took a quantum leap forward this year, as a video game called AI Dungeon has served more than 18.5 million customized text-based adventures to more than one million monthly active users, according to its creator, Nick Walton. Powered by an artificial intelligence text generator, the video game can be played on smartphones or computers, offering players a choice of five genres: fantasy, mystery, apocalyptic, zombies, or cyberpunk.
At the beginning of each game, the AI generates the first lines of a unique and genre-specific adventure—prompting players to type in their next actions. Players can type whatever they want, and the AI storyteller responds and adapts the adventure. There’s even an audio function, in which an AI-generated voice narrates the story as it unfolds. Though AI Dungeon’s storytelling powers are still evolving, it has the potential to change the way video games and other kinds of intellectual property are developed.
“The fundamental problem with traditional games is that the developer has to handcraft every single piece,” Walton explained. “That really limits what kind of characters, quests, or worldbuilding you have. If you have to write a whole new version of the world for every different major decision a player can make, that just becomes too expensive. But when you have an AI that can fill in all these details, suddenly a whole new set of possibilities opens up.”
Book publishers face similar limitations with popular novels. Fans may love a particular setting, but they can only explore the corners of the imaginary world that the author has already described. Walton hopes that publishers will someday license his technology to build interactive text games where players can play endless series of adventures set inside their favorite novels’ settings. “We could make game worlds that are specific to a book,” he said. “You could explore Harry Potter, or even explore smaller genres, because we can do it at a much cheaper cost than most video games.”
A few writers have already taken notice of AI Dungeon. AI researcher Janelle Shane, author of You Look Like a Thing and I Love You, played the first iteration of the game back in December and has been impressed by the AI’s storytelling improvement over the past seven months. “The difference in coherence is striking,” Shane said. Eight months ago, she wrote about playing as a goose in AI Dungeon to test the limits of the AI’s abilities. When she repeated the same experiment in July 2020, the interface was much better at incorporating this fantastic detail. “Now it’s much better at remembering that I have wings and a beak and get around by flying,” she said.
“People should absolutely be taking advantage of this technology—especially hobbyist and amateur writers,” said Emily Bellavia, who wrote a fantasy adventure novel using the AI Dungeon interface. “I used to love writing as a kid, but I never properly reconnected with the childlike wonder I had while creating stories. This allows you to flex that creative muscle without needing to devote an excessive amount of time to it.”
Bellavia shared the project as a Google Doc. “As the story continues, the AI learns to adapt to your writing style and the general narrative flow, using incredibly advanced deep learning algorithms to describe what happens next,” she wrote in the introduction, describing how she passed storytelling duties back and forth with AI Dungeon to compose a novel titled Lady Emilia Stormbringer.
The novel expanded every time Bellavia played the game, as the AI added new twists to her adventure. The title page of this novel has a unique attribution: “Directed by Emily Bellavia, written by ‘Dragon,’ an Artificial Intelligence derived from the GPT-3 algorithm, developed by Latitude, creators of AI Dungeon.”
When asked about rights to these AI Dungeon–generated stories, Walton said, “People have the right to do anything they want with their stories. If you play an adventure that you think is really awesome and you want to publish it as a book, or make an animated video and put it on YouTube and make money off it, that’s totally fine. But you can’t do that with other people’s stories unless you get their permission.”
By that rule, Walton attributes ownership of the story to the player who guided the adventure on AI Dungeon. Anyone who publishes another player’s adventure without that player’s permission would be violating this rule. A Twitch streamer named Wayne Radio TV recently livestreamed his own AI Dungeon game to his more than 57,700 subscribers, dramatizing his long text-based adventure with his own simple graphics.
AI Dungeon harks back to some of the first video games created. In the mid-1970s, computer games like Colossal Cave Adventure and Zork were hits, allowing players to type simple commands such as “Go west” or “Drink rum” to steer the stories in new directions. The genre flourished throughout the home computing revolution in the 1980s, producing a literary adaptation of Douglas Adams’s The Hitchhiker’s Guide to the Galaxy from the gaming company Infocom in 1984 and a surreal New York City adventure from science fiction author Thomas M. Disch titled Amnesia from Electronic Arts in 1986. The genre quickly was eclipsed by more sophisticated graphics-based games.
AI Dungeon emerged in December 2019 as a text-based video game coded by Walton that used the GPT-2 language model as its storytelling engine. GPT-2 is an AI text generator developed by San Francisco’s OpenAI that has an uncanny ability to imitate human writing by predicting what comes next in a given writing sample. OpenAI did not respond to PW’s request for comment.
Walton shared his AI Dungeon code for free through Google Colab, a service that allows home computer users to run resource-intensive AI models through Google’s network of cloud servers. Despite the coding hurdles required to play the game, AI Dungeon immediately took off online. Walton said that 100,000 people played the game in its first week.
Walton quickly set up a Patreon page to fund an app-based version of AI Dungeon. At the same time, he cofounded a gaming company called Latitude in Utah with his brother, Alan Walton, to support the development of AI Dungeon. Before the pandemic hit, Latitude was able to raise $750,000 and hire its first employees.
In June, OpenAI announced the creation GPT-3, the third generation of its AI language model. The company said it trained GPT-3 with a massive selection of datasets, including the Common Crawl corpus (around one trillion words gathered through eight years of web searches), two “internet-based books corpora” (OpenAI did not specify which books this included), and the English-language version of Wikipedia.
“There’s noticeably more coherence now than in the previous iteration, including a much larger memory,” said Janelle Shane, who noted that users can now create longer prompts and generate more elaborate personality quizzes with GPT-3. Still, she doesn’t think that GPT-3 has the capacity to replace human writers. “The best applications are going to be the human-edited and human-supervised ones. Not every response is interesting or useful, and some are downright offensive.”
Walton and Latitude got early access to GPT-3, and the gaming company began testing the new model with AI Dungeon players. “We saw this huge increase in quality, and our users could tell very clearly when they got switched to GPT-3,” Walton said. “There were a lot of users who were telling us, ‘We would pay money just to be able to use that model.’ ” Players can now pay $10 per month to play AI Dungeon with the GPT-3 model, which Latitude calls the Dragon version of the game.
Walton’s vision for Latitude goes far beyond text. “Back in like the 1970s, we had our first text adventure games,” he said. “Then we slowly moved to 2-D games like King’s Quest, and then 3-D games like Skyrim.” He sees AI-generated text adventures as the start of a new era.
“Now video games are restarting from the beginning,” Walton said, predicting that AI-generated stories and visuals will spread to 2-D, 3-D, and virtual reality games. “I think we’ll go much faster than we did the first time.”
An example of a story created on the AI Dungeon platform
PW: You are a journalist working for Publishers Weekly magazine. Your editor is waiting for your new article about artificial intelligence that can compose stories.
PW: I interview the creator of the artificial intelligence.
AI: He says he’s not sure if it will be able to write stories, but he thinks you’ll find something interesting in his story. I also ask him what kind of AI he created and why he chose this one over others.
PW: The creator responds:
AI: “I experimented with many different AI techniques and found that this one generated the most interesting stories. It can take almost any combination of variables, apply probability, and produce a story that fits all of the constraints. The only problem is that it makes little sense.”
PW: You write the first sentence of your article for Publishers Weekly magazine.
AI: The room is dark and musty. A single candle rests on top of a dusty desk next to an old monitor. On the screen flashes the words, “All great writers need inspiration.”
PW: You send the article to your editor.
AI: You submit the story to your editor at Publishers Weekly. He prints it out, reads it, and decides to turn it into a book. The AI Project makes you famous, and you become a star in the AI world.