Reading time
1 min read
Excerpt from The Squire, an AI written short film

AI is contributing to paintings, music, and now a whimsical fantasy video.

What’s new: The Squire is an amateur romp through a snowy realm of knights in armor and damsels in distress. The script was composed by AI Dungeon 2, an interactive text-adventure game based on the GPT-2 language model.

How it works: Filmmakers Josh Johr and Dominick Todero began like any other AI Dungeon 2 player: By choosing a character (squire, mage, and so on) and setting (forest, dungeon). The program generated an internal context statement and fed it to the text engine, which responded: “You are Jake, a squire living in the kingdom of Larion…” It asked them periodically for input and generated text to advance the story. When the program declared, “GAME OVER!,” they set about planning the production.

  • Unlike earlier text-adventure games, AI Dungeon 2 has no rules for how players can respond to prompts and no pre-programmed outcomes — everything is generated on the fly. The game’s creator, Nick Walton, fine-tuned the 1.5 billion-parameter version of GPT-2 on 30 megabytes of text scraped from an online choose-your-own-adventure forum.
  • The game is prone to unexpected and occasionally nonsensical twists, such as when roadside bandits hand their sword to the befuddled Squire simply because he asks them to. But it anchors each session in its setting and narrative by feeding GPT-2 the previous 10 prompts, along with the original context statement, each time the player enters a new prompt, Walton told Towards Data Science.
  • Inspired by the model CTRL, he imposed a penalty whenever the system reused previously generated words. That keeps the text generator from repeating itself, which can be a problem with the latest language models.

We’re thinking: In the early days of generated music, some listeners enjoyed the jarring notes that computers often came up with. We’re still in the early days of generated narrative, but the results, for all their screwball turns, can be delightful.


Subscribe to The Batch

Stay updated with weekly AI News and Insights delivered to your inbox