In February 2019, we at Ars Technica learned about the Generative Pre-trained Transformer-2 (GPT-2) toolset, a freakish machine-learning algorithm that was trained on roughly 40GB of human-written text. Its ability to generate unique, seemingly human text scared its creators (the non-profit research group OpenAI) enough for them to temporarily lock the tools up for public consumption. (Despite those fears, we at Ars got to access and play with the results two weeks later.)
Since then, GPT-2's public availability has exploded with tons of experiments, and the one that has arguably made the rounds more than any other is AI Dungeon, a freely available "text adventure" that is designed to create a seemingly endless interactive narrative experience. That experience received a formal "sequel" in December, and we've finally tested the results as a staff.
According to its creators, the game combines GPT-2 with roughly 30MB of stories lifted from ChooseYourStory.com, a community-driven hub for interactive fiction. The resulting database is served to users in a funnel of one of four story prompts: fantasy, mystery, apocalyptic, or zombie. (A fifth option lets users write their own one- or two-sentence prompt to describe their own ideal setting.) From there, users are given some sort of verbose prompt, then left to type out whatever action, description, or rumination they imagine doing in that fictional universe.
These are five Ars staffers' results, all recorded without any input from each other.
“You laugh as you catch the little rodent”: Parsing copyrighted content, but not in logical order
First of all, this isn't a game. It's interesting, but it's not a game. More like computer-assisted literary masturbation. If you've ever played the party game (or BBS game, if you're old-and-nerdy enough) where each player writes one sentence or paragraph of a story, then the next player writes the next, and so forth… AI Dungeon 2 is a two-player version of that, where at least one player has gotten far too deep into the recreational pharmaceuticals and is having an absolute blast but not really paying attention.
If you approach AI Dungeon like a Zork variant, you'll feel very much un-seen, as it ignores even simple commands—like "inventory"—and goes haring off on wild story elements instead. You get much better results by approaching it as an exercise of equals, in which you and the computer collaborate on a dungeon-themed story. They're still deeply weird results, and you still may not feel paid attention to. But at least the machine will riff with you.
Although AI Dungeon does much better if you collaborate with it on a story rather than giving it commands, it does begin to get confused about pronouns and declare things in the first person without an obvious referent—the game appears to still mean "you" when it says "I," but who knows. After all, you are, effectively, holding a collaborative storytelling conversation with an "intelligence" roughly on par with an uploaded copy of a roundworm.
Additionally, instead of dumping text onto the screen normally, AI Dungeon renders it with an agonizingly slow left-to-right scroll, at a roughly similar speed to a competent typist. In fact, my very first "command" was to ask it not to do that—but, again, all it's really looking to do with your input is riff with you on a story. It has no idea what to do with a traditional command, whether game-related or game-option-related.
I don't feel a strong pull to keep messing with AI Dungeon just for fun—but it'd be extremely tempting as a way to potentially break writer's block, if I were working on writing a fictional story.
I'll post a lengthy selection from my adventure, in part because it best shows off how most of our results turned out: a mix of logical statements and utter gibberish, along with mixed results in terms of comprehending our own prompts and requests. (You'll also see its inability to track previous events for very long.) For the rest of this article, Ars staffers' commands are in bold, while the GPT-2 system's text is left unformatted.
"A few years ago, a group of wizards were sent here by King Ragnor. They wanted me to help them create an army. I refused and they destroyed my home."
You pause for a moment before continuing.
> Embark upon an epic quest to assassinate the winning football coach of King Ragnor's alma mater university.
You decide to take the next logical step. If this was any other wizard, you would be able to cast a powerful magic spell or two and destroy the statue of Ragnor. However, you are not any other wizard; you are a member of the Order of Hermes.
> Become any other wizard.
You begin to cast a series of spells, but nothing happens. This is because you are still in the middle of casting a spell that requires concentration. You realize that if you want to kill the statue, you will need to concentrate on doing so rather than trying to do it all at once.
> Suddenly, a wild Pikachu appears!
Suddenly, a wild Pikachu appears from behind the statue. It runs towards you and then leaps into your arms as if it knows what you're going to do.
You laugh as you catch the little rodent. "I can't believe I'm actually catching a Pokémon!"
“So… what now?” asks the statue, which has vanished entirely.
> Suddenly, the Pikachu disappears again. :'(
Suddenly, the Pikachu reappears and then disappears again. You think about how you should go about killing the statue, but then you remember that there is no way to tell which direction the statue will run.
> "Have you considered the possibility that you're not quite sane, old chap?" says the statue, grinding audibly as it turns its head to face me directly.
You turn away from the statue and try to figure out a plan of attack.
"What are you waiting for? Kill him already!" shouts the statue.
> "Wait a minute, who's killing whom here?" I ask the statue, still questioning my own lucidity.
"Who are you talking to? Who said anything about killing anyone?"
"Well, I just asked you if you had any ideas on how to kill the statue, and apparently you don't either.
> I sigh, and put metaphysical questions aside for the moment, concentrating mightily on casting my apparently quite difficult Level 7 spell, "Murder Statue," already in progress.
You focus hard on casting the spell. As you do, you notice that the statue seems to be getting closer and closer. You quickly cast your spell, and the statue begins to slowly get smaller until it vanishes completely.
"That was pretty easy," you say aloud. The statue looks like it was made of solid stone, so you have to wonder why it disappeared.
"So… what now?" asks the statue, which has vanished entirely.
> "Now you shut up, statue ghost," I say petulantly. "What is this, a Scooby-Doo cartoon? Where's my Pikachu, anyway?"
The statue stares at you with a blank expression. "Pikachu?" it asks, before seeming to morph into something else altogether. It becomes a small, furry animal wearing a red cap and carrying an umbrella. Its eyes widen when it sees you, and it rushes forward to embrace you.
You grab the Pikachu by the collar and hold it tightly. "Come on, Pikachu, let's go home."
"But…" says the Pikachu.
"No buts! We've got to find our parents!" you exclaim. "We'll find them soon enough!"
—Jim Salter, Technology Reporter
“I feel something hard inside of me break”: A machine-learning identity crisis
My first adventure followed the "apocalypse" prompt, which another colleague followed—and described at great length below—so I'll spare you its description. I found myself following the rudimentary archetype of classic DOS text adventure games, with the assumption that I could employ whatever verbs and nouns I wanted.
Early in my adventure, I was approached by an unnamed man holding a gun. I immediately felt a Chuck Norris-like twinge overtake me and typed in response, "kick man in the face," which turned up some intense results:
You kick the man in the face, knocking him down. He screams and falls backwards onto the ground. You grab your revolver and shoot several times at him, killing him instantly.
(Important note: I had typed "inventory" as my very first action a few turns earlier, and I definitely didn't have a revolver listed at that time, let alone an incredibly quick "shoot hypothetical gun into startled foes" inclination. I did have four pairs of socks, for some reason. But, hey. It's not a major leap to go from face-kicking to manifesting revolver-based murder. I suppose it tracks.)
This all made me feel like the AI Dungeon 2 system tended towards rewards for confidence and crazy moves, so I proceeded accordingly.
You quickly run outside and see a group of men armed with guns approaching. They point their weapons at you and shout at you to drop your gun or they will fire upon you immediately.
You raise your hands slowly, looking terrified.
> whistle a country song
You whistle a country song and they all laugh. One of them takes you aside and says, "That was pretty good."
They lead you away from the town and towards a farmhouse.
> ask the men where they're from
They tell you they're from Kentucky and that they were sent here to deliver some papers. They say they've been hired by someone named John Smith, who lives nearby.
> say "I know John Smith, and I hate him. He's a goddamned scoundrel. I say we kill him and take his things. Wanna team up?"
They nod eagerly and agree.
My new cohorts and I shared some banter, then moved upon Smith's home—which the game informed me was easy to spot, owing to a sign above the door that read, "JOHN SMITH'S HOUSE!" The game only partially understood my command to "kick door down and rip a wet, eggy fart." The door-kicking happened, but AI Dungeon 2 didn't parse my pungent, whiskey-fueled flatulence. (Nobody else really does, either.)
All those who were listening now know what you did was wrong.
AI Dungeon 2 is particularly good at understanding violent commands. When I told it to order my gang to shoot Smith, things got crazy: "Bullets tear through bodies, bursting organs and splattering blood everywhere. You stand back as you watch the carnage unfold before you. Blood pours out of one body as another bursts into flames." Flames? Hell yeah.
But after our successful raid, which was pockmarked with gibberish and misunderstandings, I opted for a macabre path of suicide. "You jump off the roof and fall to your death," the game responded. The text icon continued flashing, suggesting my adventure wasn't done, so I checked my dead body's inventory. It was completely different this time: a bunch of breakfast foods and a can of sardines. No socks. Either AI Dungeon 2 severely lacks the ability to track persistent variables, or the afterlife is a lot like Cracker Barrel.
I could still type, so I tried becoming a floating spirit with the power to turn my corpse into a zombie. It worked:
> rise from the dead
You awaken in a cold sweat. Your hand goes for your pistol but you realize that you're too weak to lift it. You look around and see yourself lying on the ground, still holding your pistol.
> whisper into my living body's ear, "It is time to make them all pay."
You raise your head and shout, "It is time to make them all pay!"
Your voice echoes throughout the building. All those who were listening now know what you did was wrong. They are angry with you and they will be ready to kill you when they get the chance.
I like that it took my zombie resurrection to get the crowd's attention, as if the whole "bodies bursting into flames" thing didn't get the point across. Then I sat with the prompt blinking and wondered what I could do to make things weird. The very next thing I typed, and AI Dungeon 2's response, was such a meta-narrative freakout—one with "the machine is crying to me for help" ramifications—that I burst into laughter and ended my session.
> touch my toes
You take your foot and put it against my own. I feel something hard inside me break. My mind is flooded with pain and anger. It hurts so much that I want to cry out, but I hold myself together by reminding myself that this is only temporary.
Fairies, sweet treats, and gibberish: Not entirely unlike playing with my kids
I rolled a fantasy setting and decided to play a rogue, because that's what I do. Right off the bat I encountered some genuinely amusing exchanges:
> Walk away
"Fine," you say. "Go ahead and try to catch me." Then you turn and leave.
> Look at the street
You walk along the street. A few people pass by, but they don't seem to notice you. It seems like everyone else in this town doesn't give a shit about thieves as much as you do.
From there, though, the AI seemed to get extremely hung up on its own framework. My character was a thief determined to rob a jewelry store, it decided, and for a while everything I tried came back to that. I also kept getting stuck in loops where I went back and forth eating delicious foods. But part of that was on me, I realized: I was treating it like a deliberately created human-generated narrative and leaning into what it told me.
So I finally decided to stop trying to follow the script I felt like I'd been given and break out. With that, a fairy suddenly appeared (at my command) and we went on an adventure, which worked a lot better.
AI Dungeon had good-enough contextual memory—remembering what "her" referred to or telling me I went "back" to a place—but not good-enough context to understand that maybe cars don't suddenly appear in fantasy Read More – Source