A Wizard, a Gamer, and a Robot Walk Into A Tavern

You’re WeirdBeard, a sorcerer living in the kingdom of Larion. You have a staff and a spellbook. You finish your long journey and finally arrive at the ruin you’ve been looking for. You’ve come here searching for a mystical spellbook of great power called the Book of Essence.
Do you:
A) Enter the ruin?
B) Search the grounds before entering?
C) Call out to see if anybody else is here?
D) Try something else?

It’s a typical setup for Dungeons & Dragons, or D&D, the role playing game spawned in the '70s and still going strong today. Whether you’re a fantasy fan or not, you’ve probably seen or read Harry Potter or The Lord of the Rings, full of wizards and ogres and fairies galavanting across enchanted lands in search of mystical artifacts. It takes an active imagination to create original material audiences can engage with. At least, it’s always required that in the past

However, the opening paragraph above wasn’t written by any avid gamer or fantasy author. It came from a sophisticated artificial intelligence, a program that can infinitely remix interactive stories for anyone who cares to play.

AI Dungeon brings together two straightforward ideas. It’s an app to play a D&D-style role-playing game. It’s also driven by AI, like a chat-bot. What makes it unique, and frankly what makes it groundbreaking, is how astonishingly capable and human-like the AI can be.

At a BYU Hackathon last year, computer science major Nick Walton wanted to see if he could write software to act as a Dungeon Master, or DM, the central moderator for any game of D&D. He saw it as a fun diversion during his final semester. “I’ll put out this fun little side project, then I’ll go work at a company after graduating,” he thought.

The work of a DM is more art than science. In essence, it's the job of a DM to imagine and convey all details of the fantastical world players put themselves into. The DM decides what quests players can pursue, what challenges they face, even their odds of survival. A committed DM prepares extensively, relies on multiple outside reference sources, and can weave gameplay into an ordered, imaginative, and believable narrative. They're part referee, part fireside storyteller, and part demigod, dictating the fate other players will face. It's not a trivial task, and for Walton, selecting the right AI brains would be critical.

There are several publicly available AI tools Walton could connect as the back-end of his game. IBM’s Watson already had some experience with games, made famous playing (and winning) Jeopardy on national television. More recently it was put to use analyzing medical data. Azure AI from Microsoft is commonly deployed for handwriting and text analysis. Google’s TensorFlow AI is very good at image recognition. But Walton chose to connect his code to an algorithm from OpenAI, an independent consortium of technologists trying to build a generalized AI for the whole world’s benefit (more on them later). 

Walton’s first results were interesting, if mostly incoherent. At least the pieces were there. Maybe the game would spout some nonsense about spells or goblins or magic amulets, though stories were often absurd and lacking a consistent narrative. Then OpenAI upgraded the training data on their algorithm, and things got interesting. Not only was Walton’s robo-DM making more sense, it was actually creating interesting, playable stories. Walton released his code for others to try. He uploaded just his Python script, something only other programmers could use. Even still, he got 100,000 downloads in the next week. It hit a million downloads in about a month. That’s when he knew this could be much more than a fun side project. 

That was less than 12 months ago. Walton didn’t go off to work at some larger company after graduating. He recruited his brother Alan, and together they formed Latitude.io to develop and commercialize the technology. AI Dungeon today has over 2 million monthly active users. Latitude has twelve full-time developers and offers the game through web browsers and mobile apps. The growth is impressive, but starts to look more modest when compared to the long-term potential of the technology they’re using.


It’s impossible to understand AI Dungeon (and the possibilities it presents), without understanding OpenAI. Put simply, it’s a research group with the goal of preventing the robot apocalypse.

Like wizarding fantasy tropes, almost everybody is familiar with Killer Robots in pop culture. Terminator, Robocop, Decepticons, and HAL 9000 may all seem like pure fiction, but real and notable technologists have expressed grave concern about AI going bad. In the wrong hands, it could spawn war, oppression, and even ecological disaster. Bill Gates, Stephen Hawking, and Elon Musk have all stated publicly that the potential of AI is comparable to atomic power; it could energize cities or blow them up. The concern was real enough for Musk to co-found OpenAI in 2015 in order to build AI responsibly before anybody else does it irresponsibly.

The lab has operated in quiet. It was only last year it started to make mainstream headlines, not with what they’d released, but what they were afraid to release. 

On Valentine’s Day 2019, OpenAI published an update on their blog about the second generation of their text generating algorithm, dubbed the “Generative Pre-trained Transformer 2”, or GPT-2. The post indicates GPT-2 was trained on more than ten times the data of the previous GPT version, which itself produced surprising results. It also showed that simply scaling up the training data could take the results further than anybody anticipated.

But the blog post turns ominous in just the second sentence; “Due to our concerns about malicious applications of the technology, we are not releasing the trained model.” The worry becomes palpable when considering the 2016 US Presidential election. Evidence of foreign agents influencing American politics became a mainstay of the news cycle. If those same malicious agents could deploy AI to convincingly pose as real people on social media, to instantly and infinitely fabricate, echo, and amplify divisive, inflammatory content, there would be no clear way to quell the chaos.

This is, of course, exactly what OpenAI was founded to prevent. So research continued. Private early testers were given access to GPT-2 in a controlled setting. Over time, OpenAI became more confident that malicious use was not happening, at least not on the scale they’d initially worried.

Then this year, OpenAI released the newest version to beta testers, dubbed GPT-3. The next generation algorithm is almost identical to the prior version, except for one thing. Most artificial intelligence operates through machine learning; by feeding the algorithm vast amounts of raw data to learn from, searching for patterns and order. GPT-2 was trained on 40 gigabytes of text from content linked on Reddit, the popular web forum covering virtually any topic imaginable. The results initially surprised and worried researchers with the model’s ability to produce very human-like text. For GPT-3, the researchers simply increased the data set massively. GPT-3 also increased the variables analyzed, 116 times more than GPT-2. In colloquial terms, the researchers told the algorithm to read and parse the entire public-facing Internet, producing the largest language model ever created, trained on the largest language dataset ever created. It’s an order of magnitude larger than the next publicly available competitor. The result is an AI that can, with the right prompting, reproduce any type of human-generated text with shocking clarity.

What kind of text? With the correct prompt and example set of data, it could conceivable write legal documents, long-form op-eds, instruction manuals, reference material, even journalism.

Even though the software is still in private beta, developers using GPT-3 still set Twitter ablaze with examples of the AI’s prowess. It could write emails for you. It could let you talk to a simulated version of anybody. It could carry on a nuanced conversation about human rights verses (eventual) self-aware machine rights. GPT-3 could even write a convincing article explaining what GPT-3 was.

Is this the Robo-pocalypse?

If your first thought is this is a recipe for mass unemployment, you’re not alone. Presidential candidate Andrew Yang made “technological unemployment” a staple of his campaign rhetoric, arguing that governments needs to take steps to ensure citizens have a more robust unemployment safety net. It’s what drives the public dialogue around Universal Basic Income, an idea that was almost unheard of not many years ago. It’s something Mark Zuckerberg, Elon Musk, and former Y Combinator President Sam Altman have all spoken on publicly. Notably, Altman is also a co-founder with Musk on Open AI. 

Latitude CTO Alan Walton says the short-term concerns about an AI-fueled robo-pocalypse might be understandable, but are probably overblown.

“In my view, it’s fundamentally augmenting humans,” Walton says. “For example, I’ve seen writers write just as they normally do, verses writing using GPT-3 as an augmenting tool. They find that they can produce similar quality at two to three times the regular pace. That doesn’t mean GPT-3 will replace all writers, but it will make people legitimately more productive in their field.”

It’s important to note that the model doesn’t have logic, reason, or any worldview. “It doesn’t have a physics model of the world,” says Alan Walton. “It doesn’t know that if a rock goes up, it has to come back down again. It just knows that people might have said that in the past. Because of that, it tends to make basic logic errors pretty frequently, which limits how useful it is for hard fields. You wouldn’t want GPT-3 as your doctor, for example. That would be terrible. But it works very well for things that are more forgiving, like entertainment.”

That kind of general ability is perfect for AI Dungeon, which can write fantastic interactive stories on the fly in any genre you’d like. The options are so wide that Latitude helps players by narrowing down the field. After opening the game, players are prompted with a menu of genres, including Fantasy (recommended), Mystery, Apocalypse, Cyberpunk, and more. They also offer seasonal options, like a Halloween game.

Without those guide rails, the options truly are wide open. GPT-3 could generate text in any genre that has source material to model from. "It's not generating choices within types," says Alan Walton. "It can generate the types themselves, based on the fundamental building blocks of human language." 

Likewise, players aren't confined to play as wizards or warriors or even human beings. They could just as easily choose to play as a nation (think of the board game RISK) or even inanimate objects.

The AI doesn’t need to understand the story or the genre it’s telling. It just needs to make sense to the player. With GPT-3 doing the heavy processing on the back end, the permutations are effectively limitless. 

The Next Evolution in Gaming

CEO Nick Walton and his team regularly get feedback from skeptical users saying this can’t be driven by AI. It’s just too good. And just as OpenAI’s GPT algorithm is nowhere near being tapped out, the Waltons see AI Dungeon as the very start of a revolution in gaming. 

“We really see this as the beginning. It’s not just about text,” says Nick Walton. “It’s a rebirth of gaming, but powered by AI. We went through the same cycles of gaming evolution thirty years ago, where you start with text adventures, then you have multiple users, then you add graphics, then you go into 3D and VR. I think we’ll see a similar evolution of AI powered games, but they’re fundamentally different. They’ll have so much more complexity and uniqueness each time you play, and characters that feel much more real. Right now we’re at text, because there’s still a lot we’re figuring out. But then I think we’ll go down that same path of 2D, then 3D. Our long-term vision is these rich 3D worlds that people explore and interact with and are different every time.”

The technical prowess necessary to fulfill that vision is staggering by today’s standards, but AI Dungeon is already venturing into unknown technical territory. 

“This game has the highest server requirements of any game, so far as we can tell,” says Alan Walton. “The very first version had a minimum requirement of a GTX-1080-Ti graphics card. It was one of the best graphics cards on the market at that time. Less than one percent of desktop users have one. Zero consoles and zero phones could run the game, at all. The newer versions with GPT-3 are so far beyond that, there’s no consumer hardware that can do it. You need a business-level data center cluster just to be able to support one person running this game.”

This is where the game stands today as a text-only adventure, no graphics. When asked how this compares to existing games like Skyrim, a graphics heavy fantasy game, or No Man’s Sky, which places players in the midst of a sprawling sci-fi universe with more virtual real estate than any one player could ever explore, the Waltons are quick to draw a distinction. 

“I like Skyrim, it’s one of my favorite games,” says Nick Walton. “But there’s only so many times you can go into the exact same start, and do the exact same quests. It would be exciting to play with entirely new worlds, doing new quests, new everything.” 

Alan Walton adds that with AI Dungeon, “this is a level of personalization that has never existed in gaming before. It’s almost like there’s an entire team of game developers just building your personal experience that no one else will ever have. And that’s true for every single user. It’s possible we’ve had more unique storylines played through AI Dungeon than all previous games combined.” 

With so much discussion of simulating complex and vast virtual worlds, the conversation naturally turns to another question Elon Musk is publicly vocal on; are we, all of us living in the “real world”, actually living in a simulation ourselves?

The Waltons laugh, but offer only cagey answers.

“I mean, what is a simulation, really?” says Nick.

Alan continues, “If we’re living in a simulation, it’s running on a computer the same size and complexity as our universe. At that point you have to ask whether ‘simulation’ is the right word.”

Whether we live in the “real world” or... something else, the door is open to play in simulated worlds today. AI Dungeon is available now through browser or mobile app at play.aidungeon.io.

Share this article
The link has been copied!