Making a text adventure game with GPT2

rwnspace | 116 points

There's definitely not enough training data being used here. In particular, the GPT2 output:

> YOU ARE IN THE PIT, SO TO SPEAK, BELOW THE RAMPARTS. THERE IS A NARROW PASSAGE FROM EAST TO WEST AND A STONE STAIRWAY LEADING DOWN. THE ROOM IS DEAFENINGLY LOUD WITH AN UNDETERMINED RUSHING SOUND. THE SOUND SEEMS TO REVERBERATE FROM ALL OF THE WALLS, MAKING IT DIFFICULT EVEN TO THINK.

is largely copied from the Loud Room in Zork 1:

> This is a large room with a ceiling which cannot be detected from the ground. There is a narrow passage from east to west and a stone stairway leading upward. The room is deafeningly loud with an undetermined rushing sound. The sound seems to reverberate from all of the walls, making it difficult even to think.

Similarly, the response to "kill the spirits":

> THE SPIRITS, SENSING A GREATER POWER, FLEE THROUGH THE WALLS

is a direct quote from a similar (and much more dramatic) scene in Zork 1:

> Each word of the prayer reverberates through the hall in a deafening confusion. As the last word fades, a voice, loud and commanding, speaks: "Begone, fiends!" A heart-stopping scream fills the cavern, and the spirits, sensing a greater power, flee through the walls.

And a lot of the more original output from GPT2 (like "ROAD NEAR BRIDGE" and "THE SHAPEK FAN") is simply incoherent. So this isn't really a very good showing, overall.

duskwuff | 4 years ago

GPT2 is fascinating. I like the idea of achieving a kind of immortality by training GPT2 on the sum total of your life's data: all your comments, all your tweets, all your text messages, everything. Presto, now you have an unkillable version of yourself that can answer questions about your life. Your loved ones might like it when you're gone, at least.

Maybe in the future we'll have "harry potter photos" that use GPT2 + speech synthesis to pretend to be you.

sillysaurusx | 4 years ago

I don’t think gpt2 is useful in the way described, its just spitting out nonsense.

Text adventures are hard because you have structured data (eg. a scene with N objects in it), but you want to generate a text fragment dynamically as the state of those objects changes.

It meaningless to just randomly generate text fragments; you have to parse the input of free text (hard, eg. turn off the light; yes it is hard when its free text), update the state of the scene (easy, eg. set light level to low)...

... and then return a new text snippet that describes the scene (extremely hard, unless you constrain the state transitions to a finite hardcoded set).

so, like, tldr, you could do something really cool here, to use a language model to describe a scene over a continuous range of states using a finite set of samples and that would be amazing!

...but, I dont really see seeding a text fragment from a set of words being a particularly interesting addition to the field.

wokwokwok | 4 years ago

Results apparently vary. I tried this and the result was, shall we say, less than interesting.

toxik | 4 years ago

Slightly off-topic: are there text-adventure games that can be played over siri / alexa / etc.? it would be awesome while driving or walking somewhere.

harperlee | 4 years ago

Love this! My take on this same idea was to train GPT-2 on a bunch of D&D adventures and then pipe the output to speech synthesis. I ended up just publishing the output as a podcast. The app also creates its own static site. You can read about the AWS workflow I used to create it.

AIDM: Artificially Intelligent Dungeon Master http://iws.mx/aidm/

stolenmerch | 4 years ago

Some of it sounds surprisingly creepy:

  look around
  YOU CAN'T SEE ANYTHING
  IT'S TOO WIDE TO CROSS
  YOU CAN'T HEAR THE SONGBIRD NOW
  IT CAN'T BE FOLLOWED
binalpatel | 4 years ago

It's funny how so many people are desperate to hang their hopes on a buzzword.

Someone tries to sell you on something, telling you it's artificial intelligence, and it so far off the mark, not even close to the spirit of the term.

They want it so bad, and use the term so much, that a new buzzword is invented to move the goal posts. Artificial General Intelligence.

Natural language text processing, image classification, photo manipulation, speech recognition. This stuff isn't AI.

When you look at it, it's just batch processing guided by bounded statistics. Button mashing with guardrails. Like tires on a locamotive in a parking lot, it just winds up hugging the curb, so the salesman claims it's good at parallel parking.

chunkySemen | 4 years ago