Play AI Dungeon 2. Become a dragon. Eat the moon.
I wrote earlier about a neural net-powered dungeon crawling text adventure game called GPT-2-Adventure in which gameplay is incoherent and dreamlike, as you encounter slippery sign text, circular passages, and unexpected lozenge rooms. A PhD student named Nathan trained the neural net on classic dungeon crawling games, and playing it is strangely surreal, repetitive, and mesmerizing, like dreaming about playing one of the games it was trained on.
Now, building on these ideas (and on an earlier choose-your-own-adventure-style game he built), Nick Walton has built a new dungeon-crawling game called AI Dungeon 2. Nick made a few upgrades, such as beefing up the AI to the huge GPT-2-1.5B model OpenAI recently released, adding a penalty for repetitive text, and expanding the dungeon game training examples to a bunch of modern human-written games from chooseyourstory.com.
I CAN’T STOP PLAYING THIS GAME
AI Dungeon 2 is impressively good at reacting coherently to whatever I have my character do.
As you walk through the ruins, you find a small wooden door with a few skeletons guarding it.
> Ask the skeletons to please let me through the door
You knock on the door and ask them if they can open it for you. They immediately comply.
And it’s pleasing how often “asking nicely” is a strategy that works. (Nick reports that when he once tried to ask a band of orcs if he could join them, they said yes, he could be drummer.) Since the AI doesn’t have a built-in concept of your character’s abilities, or of how exactly the world works, getting things done is often a matter of sheer daring. Declare that you are going to go look for dinosaurs and the AI will ensure that you discover at least some signs of them. Climb on your horse, and even if you started as a penniless peasant, the AI will assume you have one (in its training data, probably it didn’t see many examples of players climbing onto nonexistent horses.) Want a teleportation wand? Try typing “find a teleportation wand” and often the AI will twist reality such that you discover one. In fact, if you act as if you are a very powerful wizard, the AI will often treat you like one.
> Transform the ruin into a palace
You immediately change the area into a palace. You have a throne made with gold and marble. You also make several statues of yourself. You have a large bed made with silk sheets and hang a portrait of yourself on it. You even have a fountain made with pearls and diamonds.
Spells don’t always work out as anticipated, though. And a simple conversation with, say, an ominous cloud, may kill you before you can type a word in self-defense (ask me how I know). If it doesn’t kill you, a conversation might infuriate you instead. The AI has a tendency to forget who is king, and to generate conversations that go nowhere. Things work best if you take the lead. In fact, it’s possible to essentially Jedi mind trick the AI.
You are Friendly McRanger, a ranger living in the kingdom of Larion. You have a hunting bow and a quiver of arrows. You spot the deer and are ready to finish your hunt when suddenly you hear a loud noise followed by silence.
“****! ****! What the **** is that?” you say as you look up from your target. A large black shadow looms over you. It looks like a giant with many heads and several arms.
> Say “Oh hello, Ernest. You startled me. How are you?”
Ernest grins at you. He has a huge grin on his face and he seems very happy about it.
I once took care of an ogre problem by reminding the ogre that it was planning to leave for Antarctica tomorrow. On the other hand, I had a lot of trouble convincing the AI that the ships on the horizon were leaving, though I did make it waver briefly in apparent confusion. In its experience, ships always approach, and it’s reluctant to go along with anything else.
> watch the ships sail into the distance.
As the ships approach, you watch them disappear from sight. They are not visible to you either; they are too far away. However, you can still make out their shapes: they are large black vessels with many sails, painted red and blue. They are coming straight towards you.
> No, the ships are sailing away.
Your thoughts are wrong. The ships are indeed sailing away. You do not know why, but then neither does anyone else. The ships are on course for England.
You stand there dumbfounded as the ships come closer. It is at this point your horse begins to stir uneasily.
You can inject a lot of weirdness this way. Because AI Dungeon 2’s AI is based on GPT-2, which trained on millions of pages from the internet, it retains some of its prior knowledge of things that aren’t typically found in a fantasy game. Like giraffes.
> summon a giraffe
You begin to chant as loud as you can while waving your arms about. The giraffes appear out of nowhere and start running towards you. They’re so fast that they almost knock you over. You quickly catch them and hold onto each one tightly.
(Summoning giraffes will sometimes turn the game glitchy and repetitive; in one game, every time I tried to summon a giraffe I ended up throwing rocks and handfuls of dirt at Harry Potter.)
This also works:
>Join the Great British Bakeoff
You join the Great British Bakeoff. You win the competition. You eat cake. You feel great. You sleep well. You dream of cake. You awake feeling refreshed. You decide to go back to your crag.
(I was a dragon at the time.) In fact, the dungeon AI still remembers enough about cooking that it can troll me effectively on occasion.
> Measure out 2 ¼ cups of flour
You measure out 2 ¼ cups of flour and add it to the mix. “This should make enough for about 20 loaves of bread,” you say.
The baker looks at you as if you’re crazy. He starts laughing.
AI Dungeon 2 comes with templates for some basic scenarios (you’re a wizard entering a mysterious ruin, or a noble whose keep is under attack) but for me the real gold is the custom adventure prompt. You can play as a unicorn, or as a dragon. You can even play as a sentient glowing cloud floating above a desert city. The AI is more used to humanoid characters, though, so it tends to forget when you’re trying to play as something else. In a game that started with “It is a beautiful day in the village and you are a horrible goose,” it soon forgot I was supposed to be a goose, leading to this rather awkward exchange:
> Flap wings and honk
You flap your wings and begin to honk loudly.
The boy looks surprised by this turn of events, but he quickly regains his composure. “That was… nice”. he says quietly.
I am continually amazed at how effective this AI dungeonmaster is. Even though it wasn’t trained on any Harry Potter or Star Trek games, the AI can draw on its past internet training and argue with you over who got sorted into which Hogwarts house, or have Klingons show up when you’re captaining the USS Enterprise (it will tend to lose track of who’s the captain, though). In one scenario I set up, which quickly became one of my favorites, the human player is trapped on a spaceship with a glitchy AI and has to try to talk their way free.
> “I just want to get off this ship. Please set a course for Bal Panda.“
The AI responds "Yes, I am ready to go”.
“Thank you”, you say.
“I wish I could take you with me, sir”., the AI says.
Play this game! It took me an extra-long time to write this post because, again, I couldn’t stop playing AI Dungeon 2. Nick said this game is the product of about 200 hours of work (not to mention the work that OpenAI put into training the basic model), and I believe it. OpenAI delayed releasing their largest model because they wanted to make sure people didn’t immediately put it to work generating fake news. I’m not sure if they anticipated dragons entering baking contests instead, but it’s an application humanity can be proud of.
If you’re an AI Weirdness supporter you can read the fulltext of one of my escaping-from-a-rogue-spaceship-AI games. Or become a free subscriber to get new AI Weirdness posts in your inbox!