What's new

How AI Is Being Used to Create the Ultimate Choose Your Own Adventure Game

This feature is part of AI Week. For more stories, including How AI Could Doom Animation and comments from experts like Tim Sweeney, check out our hub.


"You are standing in an open field west of a white house, with a boarded front door. There is a small mailbox here."

Will you open the mailbox, or head for the house? The choice was yours in the opening scenario of Zork, a 1977 text-based adventure game that's one of the most famous examples of the genre.

Choices are at the foundation of the text-based games. However, there are usually only a few possible paths to take based on how the creator has written the scenario. But what if your choice was truly limitless, because the story hadn't been written yet?

That's the power of AI-generated text-based RPGs, a growing fad that's become even more popular in recent months thanks to the rise of ChatGPT and GPT-4.

I ran into this band of goblins. In a normal game you might need to fight and defeat them to get their loot, but instead I decided to befriend them and teach them how to play instruments.

"I ran into this band of goblins," recounts Nick Walton, the creator of the RPG generator called AI Dungeon. "In a normal game you might need to fight and defeat them to get their loot, but instead I decided to befriend them and teach them how to play instruments. We ended up forming a band and performed in festivals around the country promoting human-orc equality… It was such a fun example of the way that in normal games we have the illusion of choice, but in reality have very little choice in what kind of hero we want to be and where we want the story to go and AI has the power to let us do things in a new, really fun way."

Text adventures rose to prominence in the same decade that home console video games were just starting to spread their wings on Atari. Players read the scenario, make choices, and imagine they're going on the adventure that the story takes them on. The interactive fiction plays out in a similar manner to the Choose Your Own Adventure books, which were just starting out around the same time.

While strictly text-based games aren't really seen today, elements of the genre can still be seen throughout the games industry. There are visual novels, walking simulators, and choice-based games that maintain much of the core of these early pieces of video game history, but the simplicity of making choices based on nothing but text on a screen is not usually seen anymore.

But now, thanks to the recent explosion of more advanced, accessible AI tools, gamers are attempting to recapture the magic of the text adventure through artificial intelligence.

How AI Users Are Trying to Create New Text Adventures



AI text adventures have existed in some form for a few years now. IGN spoke with Walton about how ChatGPT and GPT-4 are leading to a text adventure renaissance. Walton references the classics when talking about his inspiration to start AI Dungeon.

"I’ve actually played the classics like Zork or Colossal Cave a ton, though I love RPGs in general," Walton says. "As a kid I really loved the old Choose Your Own Adventure books, where you got to make choices and turn to the page that reflected your choice."


Walton was inspired to start AI Dungeon during a college hackathon, and he eventually released it to the public at the end of 2019. AI Dungeon began on GPT-2, a much more primitive version of the software seen in the new GPT-4. Still, many people latched onto AI Dungeon due to the sheer amount of possibilities held within. Walton's story about the merry band of goblins demonstrates how AI-generated storylines can have more possibilities than hand-crafted ones.

Plenty of people were poking around with AI RPGs prior to last year, but it really took off once folks got their hands on ChatGPT. Walton says it's still too early to tell how much advanced AI will change the gaming space, but we've seen way more people talking about AI in games after ChatGPT "dramatically caught global attention."

If you go looking, it doesn't take long to stumble across a ChatGPT or GPT-4 user who is trying to make a game out of it for themselves. Knives Out, Glass Onion, and Poker Face creator Rian Johnson is even trying to teach GPT-4 to make a mystery for him to solve.

On Twitter, Johnson posted a screenshot of his tinkering with GPT-4, asking the model to create a text adventure game with the following parameters: "Describe a jail cell with no exits. There is a secret way to get out, it requires manipulating objects that would be in a jail cell in order to find the secret exit. The game is over and I win when I find the exit."

I know it can simulate human fragility and explore the depths of its own id, but tbh the fact that this even kinda worked was my first “whoa” moment with this thing pic.twitter.com/XuOu4s3slV

— Rian Johnson (@rianjohnson) April 1, 2023

While Johnson didn't post the exact way this game played out, he did say that "the fact that this even kinda worked was my first 'whoa' moment with this thing".

And Johnson's far from the only one seeing how he can stretch these new AI models to make the most interesting game possible.

Recreating Pokémon Emerald with GPT-4



Another AI tinkerer is Dan Dangond, who posted his adventures attempting to replicate the entirety of Pokémon Emerald within GPT-4. Dangond is a software engineer who says he's blown away by all the different things computers can do.

So it turns out, GPT-4 knows enough about Pokemon Emerald that you can ask it to pretend to be a text-based interface for it and it just... works? A thread. (Shoutout to @Bulbapedia for being my fact-checking source for this!) #gpt4 #ChatGPT

— Dan Dangond (@DanDangond) March 15, 2023

"It is even more impressive to me when something like GPT can do unexpected things it wasn't explicitly told how to do, since that is the opposite of how most software works," Dangond told IGN in a recent interview. "And obviously, GPT is still technically doing exactly what it was told to do, but the thing it was told to do, 'predict text one token at a time', turns out to be extremely powerful at doing other tasks as well."

To try and stretch the limits of OpenAI's GPT-4, Dangond decided to see how well it could handle trying to replicate Pokémon Emerald. He says he tried to experiment with similar ideas prior to GPT-4's launch, but memory limitations and lower accuracy led to an unstable environment for simulating a text adventure.

But GPT-4 has the capabilities to simulate a somewhat accurate representation of the Game Boy Advance RPG. The AI accurately had Dangond select a starter Pokémon, fight wild Pokémon, and make his way through the Hoenn region's eight gyms. The AI also kept track of Pokémon leveling and moves, while also allowing Dangond to skip past grinding by way of a "quick training montage".


There were some major limitations in GPT-4's version of Pokémon Emerald, such as the AI skipping past key trainer or gym battles, instead just telling Dangond the results without any player input.

"It's definitely playable, but without personal knowledge of how the game works, I doubt it would be as consistent and would likely diverge from staying accurate to the main game as the conversation continued," he noted.

Dangond even attempted to have the AI create an original Pokémon text adventure not based in any of the regions seen in the Pokémon games. He didn't take that experiment very far, but says it seemed very promising as well. The AI was able to generate descriptions of new Pokémon and towns on the fly, while hitting story beats like meeting the region's professor and rival.

Limitations of AI Text RPGs



GPT-4 was a big leap forward in terms of AI's capabilities to keep track of a text-based RPG. But there are still a number of issues to iron out, and Dangond is skeptical that anything AI generated can match the quality of a hand-crafted experience.

"A big downside that comes from these is that you don't get the same hand-crafted experience. A big part of these text-adventure games, as I understand them, is that playing them is akin to solving a complex puzzle, kind of like playing through a Sherlock Holmes murder mystery. AI models at the moment, including GPT-4, are terrible at planning ahead and putting in small clues that aren't relevant now but will be relevant later."

The people we spoke to also raised concerns over the cost of these AI-generated models, making them difficult to implement for consumers. Beyond that, there's no way to control the quality or length of an AI-generated adventure, which has led to some less-than-ideal experiences for Dangond.

"GPT specifically seems over-eager to wrap up stories whenever possible. I experimented with using them to create a Choose Your Own Adventure book, and it was a struggle to prevent it from ending the story on each page with something along the lines of, 'You jump over the pit and find the villain! You defeat him and save the day. You look back on your adventures and will never forget what you learned along the way'. It's definitely a big weakness of them when it comes to storytelling."

gg ez (wrong champion, should be Wallace, but close enough, Steven was the champion in Sapphire and Ruby) pic.twitter.com/tatZGbg0Fp

— Dan Dangond (@DanDangond) March 15, 2023

There are plenty of valid concerns surrounding how AI will factor into the games industry moving forward, such as if AI ghostwriters could eventually replace human games writers. But for folks who are nostalgic for old-school text RPGs, AI has the potential to bring the genre to prominence once again.

"As models get stronger and GPT-4 strength models get cheaper, I can definitely see a future for AI-generated text adventures," Dangond says. "The strength AI-generated adventures have is the ability to respond to any input. You are no longer restricted to the specified set of verbs and nouns created by the programmers of the game."


Logan Plant is a freelance writer for IGN covering video game and entertainment news. He has over seven years of experience in the gaming industry with bylines at IGN, Nintendo Wire, Switch Player Magazine, and Lifewire. Find him on Twitter @LoganJPlant.

Continue reading...
 
Top