NaNoGenMo / 2020

National Novel Generation Month, 2020 edition.
76 stars 0 forks source link

Using "AI Dungeon" To Create A RPG Sourcebook [Complete!] #31

Open tra38 opened 3 years ago

tra38 commented 3 years ago

AI Dungeon is a free-to-play single-player and multiplayer text adventure game which uses artificial intelligence to generate unlimited content.---Wikipedia

The important thing about AI Dungeon is that it currently uses GPT-3 on the backend, which is a very powerful machine learning algorithm, able to generate human-readable text based on the "prompt" you provide it. The free version uses a fairly limited version of GPT-3 (Griffin), but the paid version (Dragon) is much better. I currently have the paid version.

I have used AI Dungeon to generate characters for tabletop RPGs, so having it generate fluff for a roleplaying game seems doable.

Here's a problem with this project though. AI Dungeon is a closed-source project. The only "source code" I can provide is the initial prompt I used to generate the text, and I can open-source that prompt. But AI Dungeon doesn't allow for reproducible output. In other words, it is based almost entirely on the honor system.

So, I may write my own script, along the lines of The Computer Crashes or The Track Method, and open-source that script, merely using AI Dungeon as a generator of corpus that will be remixed.

I don't know if I'll have time to work on this project, but I think it might be something for me to think about, at least. So I'm making this issue, just in case. If I get, say, only 10,000 words out of this, I'll just add a bunch of meows at the end and declare victory.

tra38 commented 3 years ago

Right now, I'm generating fluff for the Legends of the Five Rings RPG. My approach for generating corpus is as follows:

  1. Create a custom scenario for AI Dungeon using the following prompt from an L5R sourcebook:

“Like the Empire, the Kolat was born from the Kami’s fall to Rokugan. While others bow to the might of Heaven, the Kolat chafe at being ruled by those descended from gods. The ultimate goal of the Kolat is nothing less than the overthrow of the Hantei Dynasty, and a humankind that rules itself, free of the strictures and bloodlines of the order founded by the Kami. To this end, they long ago established a network of spies, secret cells, and deadly assassins, and they protect their communication by using ciphers.

Among the Kolat’s most terrible weapons are sleeper agents, who may operate under an assumed identity for years, even decades, collecting information and awaiting the call to more severe deeds. These consummate spies are conditioned to resist torture. Red Horn Village, despite its small and innocuous nature, could be the grand nerve center of a conspiracy that covers all Rokugan, but none know how far the Kolat’s reach truly extends.”—Emerald Empire

${Enter a topic.}

  1. Write a topic, and then let AI Dungeon take over from there. (Actually, sometimes if I leave that blank, the AI comes up with its own topic to write about. But allowing me to enter a topic gives me finer control over what AI Dungeon generates.)

  2. Curate the best output. Write and delete additional text as appropriate.

Step 3 is where a lot of the manual labor happens, and the ease of generating text is counterbalanced by the difficulty of editing said text. This is also where it gets confusing how much effort is done by the machine, and how much of it is done by the human curator. So in the interest of full disclosure, I'm pasting two Google Docs.

The "Final" Draft has 3671 human-readable words and has a lot of rather interesting ideas. However, I feel like it meanders in a lot of places, and I would try to summarize its content so that it's easy for someone to digest. Which, uh, probably isn't what you want to do in NaNoGenMo (or even NaNoWriMo - the goal is to produce words, and then you spend the other 11 months editing it). I'll also point out that the process of "generating & editing", while sometimes producing awesome output, is still a considerable time sink, something I will likely not have this month.

I'm going to have to think of a better (or perhaps more flexible) prompt to use for this project then.

tra38 commented 3 years ago

I manually summarized the "Final" Draft, by the way, and released it as a Google Doc. This Google Doc is only 1030 words. (I did not include the mission seeds of the "Final" Draft in the Google Doc, because I wanted to reduce word count as much as possible. The goal was to highlight the interesting ideas of the "Final Draft" without having readers dig through all that cruft.)

tra38 commented 3 years ago

AI Dungeon is planning to transition to an energy system, though you can opt-out of it via subscription (more details are given in these two blog posts: AI Energy, AI Energy Update). As a Premium user, I do not need to worry about "energy" until after December, so it won't interfere with this year's project, but it will certainly matter a lot for next year.

I have been able to figure out a good approach for generating adventure seeds for tabletop RPGs, which I will describe later once I begin to use it to churn out text. However, I'll probably only generate enough words to serve as a proof of concept, before switching on over to "adding the meows".

tra38 commented 3 years ago

We're getting close to the end of November, and I haven't really done much work on generating adventure seeds since the last comment I made in this thread, so I might as well stop generating text here and move onto creating a final document and adding the meows.

The way to generate an adventure seed is to simply give AI Dungeon an example adventure seed and let it complete it from there. This adventure seed comes from an L5R sourcebook ("Emerald Empire").

  1. Name: False Overtures

Hook: A PC finds a mysterious cipher in their belongings, enough to create an air of mystery, challenging but not impossible to decode. It belongs to the Kolat, and it con- tains an invitation for the PC to join them in their war against the Celestial Order. It's a test, but it's also a trap: the Kolat expect the PC to run to their daimyō and tell them about the Kolat and talk about some secretive society.

Rising Action: Should the PCs do so, the Kolat's spies in the daimyō's household take note of their lord's semipublic reaction and carefully scrutinize the lord's samurai for sympathies with the Kolat. By eliciting their lord's expression of disdain for a "secret sect," the PCs may have flushed out a half-dozen other samurai ripe for recruitment.

Climax: If one or more PCs actually respond to the invitation, they are given any- thing from a simple to a deadly mission to infiltrate Otosan Uchi. If they're particularly competent or well placed, however, the Kolat may simply induct them as sleeper agents who must wait for some signal to strike in the future. Do the PCs take the bait, and what is the sect's endgame?

  1. Name:

And then I keep generating new missions from there. Of course, I did rerun this prompt multiple times to get different missions (and to prevent "AI Dungeon" from getting too influenced by its previously generated text). And I had to curate the output and add/delete content as appropriate. But it "works", at least for now, and so it will serve as my "proof of concept". I'll have to improve on it in the future though.


I also revisited my approach to generating fluff, trying out a different technique. What I've did is hand-written some fluff (a second origin story for the Kolat) as an initial prompt, and then hit enter long enough for it to keep on generating more fluff, re-running the same prompt to get more content for me to use. Essentially, seeing how well AI Dungeon could auto-complete prompts. Ironically, after hitting enter a few too many times, AI Dungeon wound up generating a third origin story for the Kolat (and I liked that origin story enough to keep it too; more content about the Kolat is always a good thing).

This was the prompt that I used, based on discussions I had with people in the L5R discord chat:

The term "Kolat" is a Rokugani term meaning "to question". Today, it is a generic term for any anti-Imperial conspiracy who questions the divine rule of the Kami. Their methods differ across the ages, but their structure and ideology is consistent. Each Kolat conspiracy is organized in a hierarchical manner: autonomous cells send delegates to a ruling council that meets in private. And all Kolat conspiracies believe in the same goal: the overthrow of the Haneti dynasty and the establishment of the "Rule of Man". How they interpret that goal, though, can differ.

Though it is a very simple matter for an Emerald Magistrate to purge a single Kolat conspiracy, always another one appears elsewhere in the empire. It is impossible to truly destroy an idea, though you can limit its spread and prevent it from causing too much mischief.

Though a few Kolats are hardened rebels that engage violent terrorism and rabble-rousing, most Kolats are centralized around radical philosophers who are more likely to talk about destroying the Haneti than actually do anything about it. Even some of the more well-connected Kolats, those that actually could destroy the Haneti dynasty, don't want to actually destroy the Rokugani Empire..fearing that its collapse might cause disorder. Instead, these Kolats subtly seek to control the Empire from behind the scenes, for their own secretive purposes.

Disgruntled samurai can join a Kolat for many reasons. Some do so because they see it as a stepping stool for personal power. Some do it because they were blackmailed into it, or because their ancestors belonged to it - so they have to uphold tradition. Some do so because they see injustice in the status quo and want to change. And still some do so because they want to be part of the Rokugani counterculture and see subversion as "cool" or exciting.

...and then it's up to AI Dungeon to decide where to go from there.


Here's a Behind the Scenes Draft containing 5 adventure seeds, and two origin stories for the Kolat. Now I need to compile all this content into a single document, and then write up a quick script to append the necessary meows in order to get a "complete" label.

tra38 commented 3 years ago

And we're done!

hugovk commented 3 years ago

😆

image