Tangent: The Automated Dungeon Master

This post is the first in a probable series of ‘tangents’, not part of a continuing series like The Switch or The Backbone. In fact, this particular tangent veers well off of this blog’s normal subject matter, as it deals primarily with fantasy role-playing games.

The Magic of Dungeons and Dragons

Since I was a young child in the 1980s, I have been fascinated by Dungeons and Dragons (D&D). My older brother at some point had an interest in the game but evidently lost it, and bequeathed to me a smattering of box sets and hardback manuals from Tactical Studies Rules (TSR), the company that produced the game. Most immediately accessible and captivating was the vivid scarlet D&D Basic Set, emblazoned with Larry Elmore’s painting of a warrior with a glowing sword confronting a fearsome dragon, crouched atop its horde of ill-gotten gains. It’s hard to explain how much excitement and wonder I derived from this little cardboard box and the saddle-stitched rules manuals that it contained. D&D gave structure and consistency to the kind of make-believe play that I, like so many other children, already instinctively engaged in.

D&D developed within the culture of competitive miniature wargaming, and can be played as something like a traditional game, with a goal against which victory or defeat is measured. In this style of play, much like in many of the wargames from which it derived, one player is assigned the role of referee (called the Dungeon Master), and given the responsibility for resolving the actions made by the other players. TSR regularly ran tournament scenarios at conventions in this mode. Whatever group of adventurers best survived the tricks, traps, and monsters found within the dungeon and accumulated the most treasure was declared the winner.

The truest magic of D&D, and other role-playing games (RPGs)1, however appears only when played in a second-order mode, where the same players and Dungeon Master (DM) meet up repeatedly (every week, for example), to play one continuous game over the course of many sessions. In keeping with the game’s wargaming roots, this iterated game is known as a campaign. Just as a military campaign consists of an extended series of movements and battles by a single army, so a role-playing campaign consists of repeated excursions into the same imaginary world. There might be a long-term goal by which the players “win” the game, but there can never be a loser. The main point is not pursuing a winning strategy, but experiencing adventures in a place that never was. The DM’s role as referee and adjudicator therefore becomes secondary to his role as world creator and simulator.

A portion of the map of the City-State of the Invincible Overlord (1976), one of the first published D&D settings, and already showing the desire to create a fully realized world for players to inhabit.

Secondary Worlds And Their Discontents

And now you must allow me a tangent within a tangent, to veer off into a discussion of imaginary worlds in literature. After all, the desire to recreate the kind of battles and adventures found in their favorite fantasy literature is what spurred Dave Arneson and Gary Gygax to invent D&D in the first place. The gold standard for imaginative expansiveness in such literature, is, of course, J.R.R. Tolkien’s Middle-Earth2. Tolkien spent decades refining the outlines and deepening the detail of the mythos he had created, intending to develop a wholly English equivalent to the Nordic eddas or Greek epics. He called the new world that he had brought forth from within his mind a sub-creation (within God’s primary creation) or secondary world.

When one reads The Lord of the Rings, one encounters not just a story, but a whole imaginary place in which that story unfolds. Middle-Earth is not, of course, the first imaginary world in fiction. But prior to Tolkien, such places were generally flat and tissue-thin. They existed as a means to the ends of allegory or satire, or as the backdrop to a children’s story with no pretense to realism, like Frank Baum’s Oz with its four symmetrical lands, each overseen by its resident witch and inhabited by a cutesy tribe with monochrome clothes and houses. In Tolkien, by contrast, one finds a land populated with richly developed kingdoms and peoples, each with its own history and culture, its own myths and songs. His stories feel like true tales from a place that never was.

tb J.R.R. Tolkien, “Bilbo woke up early with the sun in his eyes”

The creators of D&D immediately began creating their own secondary worlds as settings for the adventures of their players – Gary Gygax developing Greyhawk, and Dave Arneson Blackmoor. As the game’s popularity spread, other DMs followed by creating their own worlds (often drawing from literary inspiration), or based their campaigns on published settings. For example, the phenomenally popular Forgotten Realms, published by TSR in 1987, and based on an imaginary world developed by Ed Greenwood since his childhood. Immersion in a rich secondary world of this sort is what transforms a D&D campaign from a fun romp into a vicarious literary tale. Rather than simply reading about the adventures of Frodo, Legolas, Aragorn, and the rest, one can experience such an adventure, exploring first-hand the wonders of a place like Middle Earth.

When D&D is played in a tournament setting, it is understood implicitly by all parties that there is nothing beyond the pre-set scenario. One cannot leave the dungeon and decide to go do something else. The only choice players have is in how they will advance through it. A campaign, on the other hand, grants open-ended agency to the players within the DM’s secondary world. Each player can create their own persona, known as a character, to inhabit for the duration of the campaign, be it weeks or months or years. We will call this responsiveness to player agency openness.

Some traditional board games, such as Cluedo/Clue, have allowed players to assume the role of a particular character, but they have very little openness, providing only a relatively minuscule decision space in which to operate. In a D&D campaign, a player can choose to take any plausible action, within the context of the world that their character inhabits. Your character comes across a mysterious stranger in the village common? You can strike up an idle conversation, pilfer their purse, start a fight, or attempt to win their affection. Whatever you can think of you can do, and it is left to the DM to decide the results of your actions, with consequences that might ripple out across that village, its surrounding countryside, or even the entire world.

And that secondary world, swirling within the luminiferous ether that surrounds and penetrates the minds of players and DM, feels real to the players as their characters explore it, because it is self-consistent. The world persists, though gradually changing, even when the player characters are not around. They might leave that village after assaulting the mysterious stranger, and return to find that he has turned the villagers against them with scurrilous lies about their sordid deeds. Or they might find instead that a band of orcs has ransacked the village and killed their favorite barkeep. Over the course of the campaign, players could establish a mercantile empire, build a castle, or even found a kingdom, and the world will respond accordingly. Moreover, the world’s various parts form a harmonious whole across time and space. If the villagers follow a particular set of customs, it is likely that the castle just down the river does as well – or perhaps not, if the castle-dwellers are recent conquerors of the region, Norman seigneurs ruling over Saxon churls. A well-crafted and well-run game world, like Tolkien’s Middle Earth, has the feeling of a lived-in place, with natural contours of culture and politics carved out over the centuries, from the flow of the currents of history across the bedrock of geography.

Yes, well-run and well-crafted, there’s the rub. Tolkien had two decided advantages over the poor, put-upon dungeon master in realizing his masterpiece. First, he only had to paint in the details along one path through his creation. Despite his many decades of labor, at his death most regions of his world still consisted of little more than names on a map. While the reader of The Lord of the Rings gets to visit Rivendell, Edoras, and Minas Tirith, she learns nothing about Harlindon, Rhûn or Anfalas, and about those regions Tolkien was nearly as ignorant as his reader. His characters politely steered clear of these uncharted regions. Player characters are rarely so obliging. Secondly, Tolkien wrote and revised his work over the course of years, and was able to pause for many minutes, or even hours, to consult prior chapters, maps, or other reference materials before deciding what would happen next. Even then, he could later return to the same passage and revise his decision, months or years later. A dungeon master, however, must respond to character actions as they come, usually within seconds, or the game session very quickly becomes tedious for his players. Both differences come down to agency – player characters have got it, literary characters don’t.

To be able to simulate a self-consistent secondary world on the fly in this fashion is a rare feat of skill and effort. As circumstance demands, the DM must serve as a geographer, demographer, economist, physicist, and more. It strains the muscles of improvisation – how many different personalities and physiogonomies can one devise to define the innkeepers of each and every village through which the campaigners pass? To say nothing of the minstrels, mercenaries, miscreants, and so forth? And then, having established the facts of some place, the burden shifts to the memory – just what was the name of that tavern in Elkenburg, again? Meticulous note-taking is a great help, of course. Nonetheless, the effort required grows and grows as the players accumulate a history of people met and places visited.3

The fact is that few are the dungeon masters who can create such verisimilitude in the face of total, open-ended player agency. Instead, most fall back on what is known pejoratively as railroading – preparing events and sites, like Tolkien, along a predetermined right-of-way, and steering the players along it. The rest of the campaign world can serve as a feeble Potemkin village, a mere facade that will collapse at the first touch. Railroading gets its bad reputation from deplorable DM actions such as hurling ever more impossible monsters at the characters if they deviate from their intended path – or, as I experienced once as a player in my youth, throwing an invisible and impenetrable force field between them and the rest of the world. But, in practice, it manifests itself far more often as a soft social contract. The players know that the DM has invested hours of preparation into developing a particular scenario, and they go along for the good of everyone involved4. Whether hard or soft, railroading ameliorates the problem of on-the-fly world creation by constraining the players’ agency within a limited sphere of action.

But even a soft railroad is a huge investment of time for the DM to prepare and requires considerable skill to execute well. Some DMs opt instead for a “no prep” style of play with neither a world nor a scenario prepared in advance. But to do this successfully also requires its own set of skills – mainly improvisational – and usually a great deal of experience. D&D can indeed be a magical experience, but a would-be player may be hard-pressed to find a DM with the time and talent necessary to truly enchant. That is to say nothing of finding like-minded fellow players. Nothing can spoil a serious fantasy epic more quickly than a so-called friend who can’t help but crack “yo momma” jokes every five minutes. The reality of a D&D session thus often pales in comparison to what one imagines it could be, indeed, should be.

Paper Worlds

Given the difficulties of dungeon mastery, it did not take long after the invention of D&D for players and game publishers alike to begin looking for ways to capture the magic of that game without the need for a referee – or, in fact, for other players. That is to say, to automate the dungeon master. Wouldn’t it be something to become immersed into an open, self-consistent secondary world, any time, any place, all by yourself – as an active agent, not just a passive reader? For a long time, the most popular and readily accessible way to find such a “mechanical dungeon master” was through a kind of paper flow chart called a gamebook.

In 1975, Ken St. Andre, an Arizona State University (ASU) grad in his late twenties, had fallen in love with the idea of D&D, but was unhappy with the complexity of its rules. He therefore decided to publish one of the very first alternative fantasy role-playing games, Tunnels and Trolls. He distributed copies he printed himself at the ASU print shop before finding a publisher, a one-man operation in Scottsdale called Flying Buffalo. Flying Buffalo’s founder, Rick Loomis, founded the company to moderate play-by-mail multiplayer sessions of a game he had invented called Nuclear Destruction, collecting a fee from each participant. He entered the publishing business after he acquired the rights to a card game (unrelated except for its theme) called Nuclear War. Loomis was happy to sell St. Andre’s remaining copies of Tunnels & Trolls, and, when the initial copies sold out quickly, Loomis acquired the license to publish additional print runs himself, under the Flying Buffalo imprint.

In the spring of the following year, a player in St. Andre’s Tunnels & Trolls games named Steve McCallister suggested the idea of a solitaire dungeon adventure. He got the idea from the programmed instruction books that were popular at the time, which offered multiple choice questions, and then had the reader turn to the back for immediate feedback on the chosen answer. Loomis liked the idea and wrote the first solitaire role-playing adventure, Buffalo Castle, which he published in May 1976. 

Buffalo Castle consisted of about 150 paragraphs (each identified by a page number and a letter), each containing a few terse sentences of description and options for the player to continue to one of several other paragraphs5. For example, “You have entered Room Six. There is a large fountain in the middle of the room. You may drink from it if you wish.If you take a drink, go to 8C. If you wish to leave by the north door, go to 4C. If you wish to leave by the east door, go to 16D.” The player character starts off faced with the choice of three doors by which to enter the castle, and proceeds from there. The adventure uses elements of the Tunnels & Trolls rules, especially combat, but forbids the use of magic, and all the complexity that entails. The castle is unforgiving, and most characters will likely die, but a lucky hero might manage to escape with some valuable plunder. 

Buffalo Castle did not attract much attention, but later in the 1970s, a series of books called Choose Your Own Adventure (CYOA) did, selling hundreds of millions of copies over the ensuing decades. (Though the predecessors of Choose Your Own Adventure date back to the 1960s, the available evidence suggests that Buffalo Castle was developed entirely independently). While Flying Buffalo continued to produce solitaire Tunnels & Trolls adventures, not until 1982 did the D&D-style gamebook break out into a wider market. In that year, Steve Jackson and Ian Livingston decided to try their hand at fusing a role-playing adventure with the CYOA formula. Jackson and Livingston were D&D fans whose company Games Workshop, served for several years as the game’s European distributor. They did not try to publish their new series themselves, however. Aiming for a wider market than the hobby press, they sold the rights to Puffin Books. The series they created, Fighting Fantasy, blended narrative, exploration, and game in a similar fashion to Buffalo Castle, but in self-contained, mass-market paperbacks.

The series was a resounding success, selling three million copies by 1985.6 A whole sub-genre of gamebooks followed, all attempting to emulate the experience of role-playing games, primarily D&D. Successful series included Wizards, Warriors, & You, GrailQuestLone Wolf, and Sorcery!7. The CYOA books had lacked any elements of a game, or of a persistent world. You simply made choices that lead you deterministically through a garden of forking paths, to one final outcome or another. Fighting Fantasy and its derivatives, on the other hand, reintroduced some or all of the D&D-like elements from Buffalo Castle: player character statistics (such as health and strength); randomness, including dice-based combat; and an inventory of items, which could affect the player’s combat ability.


But the new wave of solitaire adventures devoted much more attention to creating a rich secondary world for the player to explore than Buffalo Castle had. Inventory items in Fighting Fantasy, for example, can have other in-game consequences outside combat (a locked door, for example, that can be opened – leading to a new paragraph – only if you possess the right key). Rather than brief pamphlets, the newer books were thick paperbacks, typically with 300-400 paragraphs (two or three times more than Buffalo Castle). Each paragraph also consisted of more text, deepening the sense of immersion in a real environment. Here, for example, is how a dungeon room is described in The Warlock of Firetop Mountain, the first of the Fighting Fantasy books:

The locked door bursts open and a nauseating stench hits your nostrils. Inside the room the floor is covered with bones, rotting vegetation and slime. A wild-haired old man, clothed in rags, rushes at you screaming. His beard is long and grey, and he is waving an old wooden chair-leg. Is he simply insane as he appears, or has this been some kind of trap? You may either shout at him to try to calm him down (turn to 263) or draw your sword and attack him (turn to 353).

(Spoiler: you should talk to the man, who is full of useful information).

The Lone Wolf series took the idea of an ongoing D&D campaign and ran with it, allowing players to take a single character through a continuous story over dozens of books, carrying over skills and items acquired from one book to the next. The entire saga was set in Magnamund, a world devised by the author, Joe Dever, for his D&D games. The apotheosis of the development of the gamebook into an immersive secondary world, however, was Dave Morris and Jamie Thomson’s Fabled Lands series, published in 1995 and 1996, just as the gamebook trade was in decline. The series thus terminated early, after only six of a planned twelve volumes.

Rather than a self-contained story arc, each published volume of Fabled Lands covers a region of the world, with its own towns, villages, castles, and wilderness areas to explore. The player can move between books by walking from region to region, by taking a ship, or even by teleportation via magical gates. There are many quests and adventures that one can discover, some of them contained within one book, others spanning the world. But the player is also free to ignore all that, and simply wander around and explore. A system of keywords also allows the world to change in response to the player’s actions. For example, in the first book, The War-Torn Kingdom, you can assassinate a pretender to the throne or help him ascend to the crown (assuming you don’t ignore him altogether). Whichever you choose, you will gain certain keywords which cement your alliances in future interactions with either faction. This is not to mention the sub-systems in the game that let players join a religion, buy houses, acquire ships, and engage in seaborne trade. No one has ever come closer than this to creating a secondary world on paper that grants the kind of full, open-ended agency that a refereed game of D&D can.

And yet, it is still well short of the mark. At any given point in a gamebook, the player typically has only two to three different options. Even the richest nexus points in Fabled Lands, such as major cities, rarely have more than a half-dozen choices on offer. These don’t come close to exhausting all the possibilities that an imaginary protagonist in the same situation would have. Consider the raving old man in his fetid room in Firetop Mountain. The player is given only two options – shout at him or run him through. It’s not hard to come up with many more directions that a D&D campaign could branch out to from this decision point. One could, for example, offer the old man a clean set of clothes, attempt to restrain him, or back quickly out of the room and shut the door. If you do choose to talk, Firetop Mountain gives you no ability to direct the conversation and potentially alter how he responds to you. The man provides the same predetermined information every time. And there are no lasting consequences of the encounter. In the hands of a DM, the man might end up as an ally who accompanies the player characters through the dungeon, or you might track down his family and return him to the bosom of hearth and home. If you slay the man, that same family might instead track you down; if you anger the man, he might follow you and attempt to steal your treasure. Within a gamebook, agency and openness are more severely curbed than all but the most infamous of railroads. 

Digital Worlds

Therefore, players began looking instead to computers for an automated dungeon master. Personal computers burst onto the marketplace in the late 1970s, and became a part of most middle class households in the U.S. by the middle of the 1990s. A computer program could obviously provide dynamic responses to player actions much more easily than a static printed work. It could, in theory truly simulate a secondary world, without all of the limitations of a paper flowchart, and without any cumbersome keywords or checkboxes.

A glimmer of this promise appeared in one of the very first D&D-inspired computer games, Adventure. Will Crowther, an engineer at Bolt, Beranek and Newman (BBN) and creator of some of the foundational software of the ARPANET, wrote the game for BBN’s PDP-10 minicomputer in the mid-1970s. The game had no graphics (very few computer terminals could support them at the time anyway), so all interaction happened in textual form, just like a gamebook. Crowther wrote a parser for the game that accepted two word commands in the form “verb noun”. You could thus tell the computer, in plain English, what you wanted to do, and it would tell you the consequences of your action. But this was not quite the dream of the digital DM come true. Yes, you could type anything. But most of the time the computer would refuse to understand you. For example, the game starts with the following description:


The game will accept “ENTER BUILDING”, “DRINK WATER” or “GO SOUTH”, but not “CLIMB TREE”, “SWIM”, “BUILD FIRE”, “HUNT”, “WAIT NIGHT”, etc.

Adventure is, in effect, a flowchart in disguise, one that hides its outgoing branches, forcing the player to guess at them instead. It spawned its own genre of computer games, the adventure game. Though some later games, notably Zork, which was co-authored by another member of Crowther’s D&D campaign, provided more sophisticated parsers, none provided a substantial leap in verisimilitude over the gamebook. By the 1980s, the genre was almost entirely divorced from its D&D roots, focusing mainly on puzzles (usually combining inventory objects with the environment in some non-obvious way), rather than exploration, character development, or heroic exploits.

The first computer RPGs to incorporate graphics appeared in the mid-1970s, on the PLATO IV system, a mainframe capable of supporting hundreds of graphical terminals developed at the University of Illinois. Shortly thereafter, similar titles reached a much wider on audience on the first personal computers. These games were typically pure dungeon crawlers – taking advantage of the gridded nature of dungeon corridors to simplify the problem of rendering graphics – and focused on combat, the easiest part of D&D to rigidly codify in algorithmic form.

Among the best of these early efforts was Wizardry: Proving Grounds of the Mad Overlord, written by two Cornell University students, Andrew Greenberg and Robert Woodhead. Greenberg and Woodhead had access to a PLATO terminal at Cornell, and borrowed heavily from PLATO precursors like Dungeon and Oubliette in developing their game. Released for the Apple II in 1981, Wizardry epitomized one model for the computer RPG – a series of battles in a nameless dungeon, with intermittent rests to recuperate. All of its interest derives from resource management, careful mapping, and combat tactics. There is no hint of a wider setting, and only the barest gesture towards giving meaning and motivation to the player’s actions beyond killing everything in sight. The state of the dungeon does not even persist when the players return to the surface to shop for equipment, refilling instantly with the same monsters and treasure that they contained on the first visit.

Another 1981 Apple II release, however, followed a different path, a path toward an immersive, digital secondary world. Ultima was written by a teenage D&D fan from the Houston suburbs named Richard Garriott. It is, in fact, a digital reproduction of the world he had created for his D&D campaign, which he called Sosaria. In the game, the player can receive quests from kings, delve into dungeons, visit towns to buy equipment, learn rumors while drinking in taverns, rescue princesses, acquire a vehicle, and even attempt to steal from the townsfolk. An overarching quest, to acquire four magic gems in order to travel back in time and defeat the evil wizard Mondain, ties the whole together.

Ultima is sketchy and weakly cohesive in many places, including a strange interlude where the player takes the controls of a spaceship and battles enemies that look suspiciously like TIE fighters. It is also highly structured and symmetric – each castle and town is identical in structure, and there are four continents, each with two castles, one dungeon, and one landmark. Yet for all that, it’s an incredible achievement, a tiny imaginary world crammed onto two floppy disks by a 19-year-old University of Texas student.


As the Ultima series evolved, and Garriott built a company around its success, Sosaria evolved into Britannia, and the games developed ever greater depth and sophistication in both the richness of their setting and the interactivity and openness of their gameplay. It  culminated in 1992 with Ultima VII, built by a large team of specialized writers, programmers, and artists at Origin Systems in Austin, Texas. Origin put a huge amount of effort into the game’s writing in order to give charm and character to every, well, character, in every corner of the world of Britannia. The landscape is littered with all sorts of side quests, little problems for the player character to solve independent of any progress toward the end of the game: a missing husband imprisoned for the theft of an apple, a thief disguised as a monk, two brothers in a dispute over religious belief.

Ultima VII, with its keyword-based dialog system.

As Garriott’s series mired itself in the morass of failure that was Ultima IX, the mantle of rich digital secondary worlds was taken up by two landmark games of the late 1990s – Fallout and Baldur’s Gate8. These games attempted to have it all, and largely succeeded – detailed and satisfying tactical combat; a wide open world to explore and discover, with friends and enemies to be made depending on the player’s choices; story beats seeded through the game to naturally lead the player toward the conclusion without the feeling of railroading; and, oh yeah, side quests. These are games in which one can immerse oneself like a warm bath, games in which one can wander for hours and hours and still find delightful new surprises: new nooks and crannies to explore, new choices to make, new people to meet.

All of this delight, unfortunately, cost the creators of these games a great deal of time and money. In a D&D campaign, all of the richness of the world and its denizens is conjured up gratis in the minds of the players by the spoken words of the DM. In Baldur’s Gate, however, every choice, every possibility offered to the player in the name of openness had to be put there by someone. The game is, in effect, a very elaborate, lovingly illustrated and sound-tracked, flowchart. Every temple, every dungeon, every line of dialogue, every character animation, every side quest, came from the toil of artists, writers, and programmers.

The cost to provide such things ballooned over the years as the expectations for the visual and auditory richness of games continued to ratchet up, from the simple tiles of Ultima to the hand-painted landscapes of Baldur’s Gate, and beyond. As the lead designer for the latter game said in a recent interview, explaining the cost of a writer’s simple flourish of imagination9:

What you write on a page takes ten seconds, but all the resources that have to go into that—modeling, texturing, voiceover, music, all the rest—suddenly that ten seconds of writing becomes tens of thousands of dollars of assets.

It is for this reason, combined with the niche appeal of RPGs, that the “Ultima” branch of computer RPGs was largely abandoned after the early 2000s in favor of more cost effective genres10. There was, however, one more possible approach to building a secondary world available. After all, a computer need not merely ingest data that was already provided to it. What if instead of paying all those writers, modelers, and artists, you got the computer to build the world for itself?

Digital Synthesis

It is a fairly easy task to get a computer to generate a dungeon maze.11 It’s not much harder to stock it with random monsters and loot, with escalating difficulty and value, respectively, as the player descends to deeper levels of the dungeon. A whole sub-genre was built on these facts, called “Rogue-likes,” after the 1980 game Rogue, which was freely distributed on Unix systems throughout the following decade. Later variations on the theme such as Hack, Moria, NetHack, and Angband also spread across the fringes of nerdom throughout the 1980s. Though sometimes graphics packs were available, by default these games rendered the dungeon in ASCII characters, with letters for monsters, carats for stairs, and an @ for the player character.

NetHack ASCII dungeon

The genre exploded into the wider popular culture with the release of Diablo in 1996, which took the basic idea of procedurally-generated dungeon environments, and loot and added sophisticated visuals and sound and a graphical user interface. But the basic appeal of all these games was one-dimensional dungeon-delving. They offered no agency to the player beyond the cycle of kill and loot, and no wider setting to explore.

What if the same basic concepts behind Rogue-like dungeon generation could be applied to an entire world? This was the the conceit of the Elder Scrolls series, which launched in 1994 with Arena, followed by the even-more-ambitious Daggerfall in 1996. Rather than generating new content on the fly as players explore, as most Rogue-likes do, the creators of Daggerfall pre-generated the major adventuring sites of the provinces of High Rock and Hammerfell on their own workstations, and then manually tweaked the results. In total, the game contains some four thousand dungeons and five thousands settlements (villages, towns, and cities) that the player can visit, across a total area of some sixty thousand square miles.

Despite these astonishing figures, however, most of this vast area is utterly stale and lifeless, from a gameplay point of view. In (roughly contemporary) games like Ultima VIIFallout, or Baldur’s Gate, exploring the world is a joy, because one never knows what characters, stories, adventures, or other surprises one will find around each corner. In Daggerfall, other than a smattering of random monsters to fight, there is nothing to do or see in the wilderness between dungeons and towns. And there is nothing particularly exciting about discovering a new dungeon or entering a new town either, since one is much like another, only with a different assortment of random monsters or shops. The direction in the game comes from quests (randomly generated against one of several hundred templates) which direct players to a particular house in a particular town to fetch a dingus, or to a particular dungeon to kill five snarks. Unlike the very constricted scope of Rouge-likes, Daggerfall gives the player a whole world in which to exercise their agency, but fails to provide many interesting things to do there.

The map of just one of forty-four regions in Daggerfall. Each dot is a dungeon, temple, home, or town.

Much more recently, the tremendous growth in the capabilities of machine learning has provided new hope for the dream of a procedurally-generated role-playing experience. A computer that can  generate natural language responses to natural language inputs, a pipe dream just a decade ago, now seems near reality. This past year, Nick Walton, a student at Brigham Young University and a D&D fan, saw that these new tools could be used to simulate a dungeon master. The result was AI Dungeon, based on Open AI’s GPT-2 machine learning model.

Trained on gigabytes of input, GPT-2 is uncannily good at producing sensible text by simply predicting the next word that should follow a given list of input words. Walton fine-tuned the model by feeding it transcripts from a variety of games from the Adventure family tree. By doing so he created a kind of meta-Adventure, that could branch off in (for all practical purposes) an infinite number of directions.  This is a parser that is not mere window dressing for a flow chart. Like a human dungeon master, it generates a novel response to each input from the player.

However, there is a painful sacrifice to be made for this gain in openness, for AI Dungeon has only the feeble self-consistency of a dream or hallucination. The game has no model of the world to test its responses against. It is a kind of prism, refracting the player’s words through a textual lens, and then bouncing the result back to the screen. The game will respond without blinking to absurd player actions that make no sense in the context of an adventure a fantasy realm, e.g. “fly to Tahiti” or “write an essay about Dungeons and Dragons.” And, like a river, it will not allow you to step into the same place twice. Here, for example, is my own attempt at an adventure as the wizard Iocounu. Notice how impressive it is until I try to retrace my steps12:

You are Iucounu, a wizard 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 look around and see that it’s indeed a ruined city. The walls are gone, but the buildings still stand tall as if they were built to last forever.

The ruins themselves aren’t anything special; there is nothing here except rubble and dust.

> enter nearest building

You walk towards one of the buildings, which looks like it might be a guild hall or something similar. You open up the door and find yourself inside a large room with several tables filled with people sitting at them. Most of them seem to be mages studying some sort of book.

> try a different building

You head into another building which doesn’t look too interesting. You go through the front doors and then down a set of stairs.

> go back to the guild hall

You decide to check out the guild hall since you saw it from afar earlier. It seems like it would be a good place to get information on what’s going on in the rest of the city.

> look around

As soon as you step inside, you immediately feel very uncomfortable. There are so many people here that it feels like an invasion. They all stare at you and make faces at you. Some even begin to speak loudly about how “we”

Hail to the Dungeon Master

Because of scaling limitations, models like GPT-2 can consider no more than a few hundred words of previous text in constructing its next output. Google, however, just announced a new type of machine learning mechanism they call “reformer” that can open a much larger window on the past13. Could this, or some other breakthrough, breathe consistency into the phantasmagoria of AI Dungeon? Time will tell.

Thus far, however, the effort to enfold the magic of D&D between the covers of a book, or to inscribe it into the electronic memory of a computer, has been a noble failure. Gamebooks and computer games are available at any time of day or night, ready to play. They will always give a consistent experience, and the better ones can provide hours and hours of enjoyment. They are never burned out, tired, or lazy. Their memory or imagination never falters. But without a human mind behind them, they cannot offer truly open-ended agency, at least without sacrificing all self-consistency. Economics plays a role, of course. There is no strict bound to the number of options that could be provided to the player of a computer RPG, given enough time and money – but in practical terms, the limit is quite sharp. Either your actions in the secondary world that the game invokes are strictly limited to the paths the creator has set out for you, or that world is nothing but a fever dream, a never-ending present without past or future.

So, for now, we are stuck with the dungeon masters, with all their human foibles. Long may they live.

Further Reading

Shannon Appelcline, Designers & Dragons: The ’70s (2014)

Jimmy Maher, The Digital Antiquarian (2011-present)

Jon Peterson, Playing at the World (2012)


  1. D&D is only one in an entire genre of similar games, of course (Now sometimes called table-top RPGs to distinguish them from their digital cousins.) However, since it is by far the most popular, and the one I am most familiar with, I will, in the tradition of synedoche, often allow it to stand in for the whole class in this essay. 
  2. Though Gygax later downplayed the importance of Tolkien to the creation of D&D, his influence is clearly evident. All of the game’s non-human racial options – dwarf, elf, half-orc, and hobbit (later renamed halflings to avoid a lawsuit from Tolkien’s estate) – come straight from Middle-Earth, as does the ranger class (clearly modeled on Aragorn) and many of the monsters described in the game. 
  3. This is true even of low-preparation methods of world creation, such as the “hex crawl”, where DMs roll randomly to determine what is in each area as the players navigate around a hexagonal world map. This still requires great creativity and improvisational skill, in order to fit the castle that appeared over there together with the cult site over there and the town over there, and then hold them all together in a self-consistent picture of a world over the course of the campaign. 
  4. Another form of railroading, though not usually considered as such, is the mega-dungeon. By giving players a vast, multi-level dungeon to explore and play around in, complete with monsters, treasure, tricks, traps, and political factions among its denizens, the DM can create a sense of agency for the players within a tightly bounded, well-mapped space. This was the approach taken by Gary Gygax himself, who focused his early campaigns around the dungeons under Castle Greyhawk. 
  5. You can find an implementation of the adventure in HTML here: http://www.flyingbuffalo.com/bcintro.htm. 
  6. The figure comes from Applecline, Designers & Dragons: The ’70s
  7. One can find a complete guide to the genre at gamebooks.org. 
  8. I’ve of course passed over many other games, in an attempt to maintain some semblance of brevity. The most regretful omission is Wasteland (1988). It offered a truly self-consistent world that the player characters’ actions could permanently change, and an open-ended approach to problem-solving: many conflicts in the game could be solved by stealth or negotiation instead of violence. It was also, incidentally, co-designed by Ken St. Andre, and based on a derivative of the Tunnels & Trolls rules system. 
  9. “Pause Screen: Green Team – How a Ragtag Band of Upstarts Created Baldur’s Gate,” Shack News (2018). According to the same source, it took ninety person-years of work to produce Baldur’s Gate, which takes a player perhaps sixty hours to fully explore. 
  10. It is for this same reason that Fallout, Baldur’s Gate, and their immediate sequels have not been truly surpassed, except in aesthetic terms, in the two decades since. The genre lay almost entirely moribund from 2001 until the highly successful Kickstarter for Wasteland 2 in 2012. Kickstarter has made it far easier for motivated creators to find people willing to support a years-long effort in a niche genre. 
  11. In fact there’s an entire book about a BASIC program that generates a random maze with two lines of code, 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (2012). 
  12. The strange trailing-off at the end is not a copy-paste error, but some kind of glitch in the text-generation engine. 
  13. https://ai.googleblog.com/2020/01/reformer-efficient-transformer.html 

4 thoughts on “Tangent: The Automated Dungeon Master”

  1. Very good read. I’ve been having a lot of fun in AI Dungeon. Most of the fun is just imagining what AI has made possible already and day dreaming of what will be possible when all the bugs get ironed out. Biggest thing for me is just to have a consistent inventory, it’s a little broken when the game will respond to: “Pull out broadsword”, “Pull out Machine gun”, “Pull out Nuke” half the time ignoring you and half the time letting you kill a dragon with a carefully placed hydrogen bomb.


  2. You should look at Appendix N in the back of the AD&D Dungeon Master’s Guide, as well as read Jeffro Johnson’s book on the subject.

    Yes, Tolkien was in fact a big inspiration for D&D, and Gygax did play it a bit close to the vest so as to avoid being sued by the Tolkien Estate, but Jack Vance, Robert E. Howard, Edgar Rice Burroughs, H.P. Lovecraft, A. Merritt, et. al. were also very influential.

    Also, you seem to’ve forgotten the hugely popular Infocom text-based adventure games, which came in boxes of physical ‘feelies’. Jason Scott’s excellent Get Lamp documentary (available on YouTube) is a good synopsis.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s