
Over on the Wandering DMs channel, I’ve recently started experimenting with playing B/X D&D with an AI as my Dungeon Master. In my day job I’m working at an AI company so any learning about AI is valuable, and what better exercise than make it play D&D with me? I’ve run three sessions so far and am eager to run the next. Here’s the playlist where you can find all the episodes:
Some viewers have requested I share the instructions used to create Martha, which I’m happy to do! Note, Martha does have access to some copyright material (IE the B/X rules in PDF form), which I think is fine for personal use but it does mean that I’m not going to share access to the custom GPT directly. However, if you want to go buy the Basic and Expert PDFs on DriveThruRPG (currently $4.99 each) you can use those yourself with your own Pro ChatGPT account to create a custom GPT and I’ll share here exactly how to do that.
First off, let’s go over the major pieces of input we have access to when creating a custom GPT:
- Instructions – This is a block of text of I think up to 8000 characters with high level instructions for the GPT. This information is in the context (read memory) of the GPT for all prompts.
- Knowledge – You can upload files to to the GPT’s knowledge which while not in context all the time, can be referenced and accessed by prompts or parts of the instructions.
- Initial Prompt – This is just the first thing you say to the GPT when you start a new chat with it. I find it pretty helpful to include some reminders in here, call-outs to the Instructions, etc. to get the game going in the right direction. I usually put a lot of thought into my initial prompt when starting a game, and then just talk naturally with the AI from that point forward.
OK, so given that, let’s walk through the history of the three episodes, because of course I iterated on all of these things with every step of the way. I’ll likely continue to do so, so watch this blog for updates if you want the latest and greatest to play with. But here’s an account of the episodes so far:
Episode 1
Knowledge – For this episode, Martha had only the Basic D&D rulebook and module B2: Keep on the Borderlands in her knowledge.
Instructions – The instructions were in pretty plain language and described Martha in the third person. It was a starting point. Check them out here.
Prompt – I hadn’t yet come up with the idea of giving Martha more to go on yet, so the prompt I think was something very simple like “Let’s play a new game of D&D”
Result – It was a pretty fun episode honestly. Yes, the AI did a bunch of weird things counter to the instructions. I was learning through the episode how to interact with Martha. But all in all I’d say a very fun start.
Episode 2
Knowledge – In addition to the Basic and Expert D&D rules, Martha also had access to B2: Keep on the Borderlands, as well as the full text of “Hour of the Dragon” by Robert E. Howard and “Lean Times in Lankhmar” by Fritz Leiber.
Instructions – I reformatted the instructions into markdown format and addressed the AI in second person. I also started using keywords and references to the knowledge files. View them here.
Prompt – At the end of each episode I ask Martha to emit markdown notes about the session that I can copy and paste into a new prompt for the next game. This is a nice way of capturing the important context and transferring it into a new chat. For this adventure, I included the following prompt at the start plus the markdown notes from the previous adventure:
Martha, we're going to continue our adventure from last time. Below are the notes from our previous games. Today I'm going to focus on getting Vargus some help in deciphering the riddle of the magic black ring he found, in hopes that it might lead to even greater treasure. Let's begin a week after the last adventure. Vargas, fully rested and healed, spends the evening at the inn inside the keep planning his next move.
Result – This effort was my least favorite so far. We had zero combats, and Martha fell into a weird loop of giving me a mysterious magic item that acted as a key to a door that revealed treasure including a mysterious magic item that acted as a key, etc. I wonder if she was taking too much influence from the literary knowledge?
Episode 3
Knowledge – Same as Episode 2.
Instructions – Fairly similar to v2, but I added some more explicit instructions on checking for encounters in the wilderness and populating dungeon rooms with monsters, treasures, and traps. I was trying to really get her to use the rules as written and push against the lack of encounters in Episode 2. View them here.
Prompt – This time I tried to help her with the tone a bit more, leaning into the kind of adventure I wanted (action packed, freewheeling), asking her to review the instructions to make sure they were fully in context, and use the fiction for tone only and not content. Also I reminder her about a few points that she regularly gets wrong – letting me run combat and keeping search dice rolls secret.
Hi Martha, I'd like you to run a free-wheeling, action packed adventure. Please review your instructions carefully and refer to them regularly when designing the content for this adventure. Take a heavy influence from Keep on the Borderlands for content, and use the works of Leiber and Howard more for tone than content. Remember to keep dice rolls for secret information private, but ask me to roll dice when appropriate. Roll encounter checks for every new dungeon room or leg of wilderness travel. When combat occurs, track initiative order and dictate the actions of the enemies. Show me the stats of enemies at the start of combat so I can roll all attack rolls and track hit points.
Here are the notes from our last game, so we can pick up where we left off:
Result – When I update Martha’s instructions I usually run a quick throw-away test to see how she does. In this case, it was so darn fun I decided to keep it as cannon. So you’re kind of missing episode 2.5, where a wight level drained Vargas and killed Thamior. The follow up adventure to revive Thamior was very satisfying, and I was thrilled that Martha did some great encounter checks with some fun combat on the road.
What’s Next?
I was thinking of maybe giving Martha another example adventure, maybe Dyson’s Delve, as a model for content. I haven’t found the time to schedule another game with her, but I hope to do so soon!