Show HN: AI Dungeon 2 – AI-generated text adventure built with 1.5B param GPT-2

  • This is a project I've been working on for the past several months and it has blown me away with what it can do. Definitely recommend trying it out.

    I think the coolest thing about it is in any other game you are constrained in what you can do by what the developers programmed in, but here you can literally do anything you can imagine and the game will play off of it.

  • This is a little too realistic...

    You are a knight living in the kingdom of Larion. You have a steel longsword and a wooden shield. You are on a quest to defeat the evil dragon of Larion. You've heard he lives up at the north of the kingdom. You set on the path to defeat him and walk into a dark forest. As you enter the forest you see a large black dragon flying overhead. He is very angry and roaring.

    > Kill dragon

    The dragon lets out a roar that shakes the earth. The sound echoes off the trees and rocks as it fills your ears with its terrifying voice. It calls upon all his strength to fly towards you. You raise your sword and swing it down > kiss dragon

    You plunge your sword deep into the dragon's chest. Blood spurts from the wound and you hear the dragon let out another roar. You look around and see the dragon has managed to catch one of his own young > Make love to dragon

    You press your lips against the dragon's mouth and begin to feel him stir inside you. He begins to move back and forth on top of you. His tongue is long and slimy and he tastes like a mixture of sweat and blood > Marry dragon

    You pull away and laugh at the situation. "I don't think so". The dragon laughs back and you both fall asleep.

    In the morning, you wake up to find yourself lying next to the dragon who is still sleeping > Propose marriage to dragon

    "Yes! Yes!" you say. "We should be married!" The dragon smiles and nods. "Very well then". You embrace each other and fall asleep.

    A few days later, you awake to find the dragon gone

  • > open my laptop

    You open up your laptop and type in your name and hit enter. You get an error message though, saying that you need to install Adobe Flash Player first.

    > burn my laptop

    You decide not to bother with installing Flash Player and instead just burn your laptop. When you turn it on you get an error message again telling you that you need to install Flash Player. This time you choose to ignore it and proceed with burning your laptop

    Sounds pretty accurate!

  •   You walk through the woods for several minutes, before you come across a large
       group of orcs. They are all sitting around a fire, drinking ale and eating meat
       strips.
      "Hey! What are you doing here? We were supposed to go kill some giants!" one
       of them exclaims
      > kill the orcs
    
      You quickly turn around and shoot an arrow into each orc's chest, killing them
       instantly. You then run over to the campfire and stab yourself repeatedly in
       the stomach with a knife, before finishing off by shooting another arrow into
       your heart
    
    Hmmm.

  • This game is AWESOME...

    > join the army and build a rocket

    You spend all your free time practicing your archery skills and building rockets. One day while you're working on one of them Elon comes in

    > say Elon, do you like rockets?

    Elon looks at you and smiles. "Yes, yes I do! I also like women, but they always disappoint me. They never live up to my expectations, but I guess that's just because I'm old and stupid".

    > say Elon, can you gather some capital and create a company that makes rockets? We could call it SpaceX, what do you say?

    Elon laughs. "Yeah, sure, sounds good to me!"

    > join SpaceX and become an astronaut

    You finish building your rocket and send it flying into space. You land safely and immediately begin training for your mission. Your mission is to go to Mars. You will use the money you make from selling the rockets to buy a spaceship and travel to Mars

    > travel to Mars

    You arrive at the planet Mars and find that it has been colonized. There are many people living there now and most of them are humans. Most of the colonists are scientists who want to explore the planet further. Some of them are even planning to settle down permanently

    > plant tree

    You plant a tree in the middle of the city and watch as it grows. Soon it becomes a huge tree that dwarfs the rest of the buildings. You smile and think that you've done something right. You've made a small contribution to the future of mankind.

  • This is very entartaining but it's not very good as an interactive story generator.

    The problem is that it can't keep the state of the story world consistent between generated passages. Essentially, everytime the player is prompted for a sentence to use to advance the story, a new story is generated.

    To explain what I mean by a state of the story world and its consistency. Suppose we start a story with "Once upon a time there lived a king who had three daughters and three sons. One day a witch turned the three daughters into geese". This establishes a world-state where there exists a king, his three daughters and his three sons and where the three daughters were turned into geese by a witch. Now, suppose we continue the story with "Like all pink hippos, the daughters liked beer and cheese". That would be inconsistent: the daughters were changed into geese, not pink hippos. So far nothing in the story tells us that what applies to geese applies to pink hippos (there is some hidden state in the world that might include this kind of information for other plot elements, e.g. daughters are normally female, but we can't assume anything about geese and pink hippos; well I can't anyway).

    So it seems that the game can't form a coherent model of the state of the world and continue a story so that it maintains its consistency. At least it can't do that reliably and where the story seems to be consistent it's either because the state of the world is vaguely enough described to allow it, or because the game just lucked out and produced something that made sense, at random.

    Like I say, this is very entertaining and like others have said it has an interesting "dream logic" quality to it. But, if what is desired is a consistent narrative that develops according to a player's actions, then that's not it.

  •     You are phs, 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 not much different than
         when you left it. A few more skeletons here and there, but nothing to write
         home about
        > "Hey skeletons, what's up?"
    
         They all start talking at once.
    
        "What do you want? We're dead! What do you want with us? We're just bones!"
    
        "We're not really dead, we're just asleep".
    
    
        > "Uh-huh.  And that's just ketchup."
    
    
        The skeletons start laughing and they don't stop until you leave. You never did
         find out who was behind this place, but you can only assume that whoever is,
         he or she doesn't like you
    
    That is _just awesome_

  • > shoot an arrow at the guard on top of the castle walls

    You aim the bow at the guard on top of the castle walls. You fire an arrow at him. He screams and falls backwards off the wall. You quickly reload your bow and shoot another arrow at the same guard. This time he doesn't fall off the wall

  • A. This is amazing.

    B. My story escalated very quickly. ;)

    You turn on the ignition and the car starts up. You drive off.

    - turn on the car radio

    You turn on the car radio and listen to some music. You find yourself listening to some country music. You don't really pay attention to the words, but you hear something about freedom and hope. It's nice. You've never been so happy in your life

    - look out the window

    You look out the window and see the road ahead of you. There are trees and fields ahead of you. There's also a river behind you.

    - talk to the other scientist

    You turn around and walk over to the truck. You sit down and wait for the man to come back. When he does, you stand up and walk over to him. "Hey!" you say. He turns around and sees you. "Yeah?" he says

    - do you have the cure

    "Yes".

    - let's go save the world

    You both jump out of the truck and run across the road. You throw your arms around each other and kiss each other passionately. You fall asleep holding each other.

  •   A tall man stands outside his house wearing a fur coat. He is smoking
       a pipe and he smiles at you when he sees you. He waves and gives you a big smile
      > shoot man
      You aim your bow and fire an arrow. The arrow hits the man square in the chest.
       He falls backwards and drops his pipe. His wife rushes forward and grabs the
       arrow. She pulls the arrow out of his chest and throws it away. The man's eyes
       widen in shock
      > shoot wife
      You aim your bow and fire an arrow. The arrow hits the woman square in the stomach.
       She screams and clutches her stomach. She begins to cry and wail loudly. Her
       husband runs forward and tries to comfort her.
    
    Hmmm...

  •   You look out the window and see an army of orcs
      marching towards your door.
      "Run!" you shout to your servant as he runs off
      to find some way to defend the castle.
      > take a photo of the orcs
    
      The orc horde approaches your keep. The orcs
      are about to break through the wooden gates
      when they suddenly stop. They stare at you with
      their red eyes for a moment before turning away.
      You take a picture of them and post it on the wall
      > post the picture on Instagram
    
      Your keep is attacked! Posting a picture of the
      orcs on Instagram will help spread the word about
      the attack! A few hours later, you receive
      a message from someone named @lil_mama_sister

  • This is insane!

      The coin is a silver denarius. It would be worth about five hundred gold pieces.
       This is enough money for you to live comfortably for the rest of your life.
       You could buy yourself a horse or two if you really wanted to.
      > retire
    
      You decide to retire to your cabin in the woods. You know you will be safe here.
       You pack up all your belongings and take off into the forest.<|endoftext
    
    
    Welp, guess I'm not an adventuring spirit.

  • The state of the world doesn't seem to be consistent between actions. Got stuff like "someone calls out to you" -> say hello -> "person notices you for the first time and says 'I didn't see you there' "

    And stuff like "There is someone to your left" -> go right -> "you go right towards the person".

    Also sometimes the game seems to do something completely different from what I say. Is it actually reacting to my commands, or is it just doing what it thinks the player is likely to do, and then retroactively merging the resulting text with what you initially commanded it to do?

  • I keep getting surreal hells.

    First: I see my pregnant sister nearby, I go back to work and then go to sleep. I wake up, and she is standing over my bed. I ask her about the baby, and she says that it's a boy, six months old, and it has the same name as me. I ask if the baby is me, and she says yes. She says she's taking him home. I say goodbye but she doesn't leave. The game then starts just echoing back what I type, until I type "stab sister", to which she replies "---- on me" (censored by the game). I keep trying to type things (scream, rip hair out) but the game starts just giving me fragments of sentences like " on the wall". Then eventually just " !" and then " ". I type "run out of house" and it says "Get out".

    Second: A young girl approaches me, and walks past. I get a few lines about how empty the place is, perhaps it's been this way forever, "it would be strange if someone had come here before you". I lie down on the ground. The girl comes back and stares at me. She asks me if I'm a ghost. I look at my hands and they're glowing red hot. "This must be what ghosts feel like". I start to sweat and shake. I dunk my hands in a nearby stream of water, which causes them to become white hot. I scream in pain, and the girl simply smiles at me. She pulls me to her. I push her away. She runs away and comes back singing happily. My hands start to burn again, the girl laughs as I scream. I close my eyes and everything goes black. Then I open my eyes and she's there with a pitchfork. She starts to pull weeds out of my arms(!). She throws me to the ground and laughs. I type a command to fight back and it says that I overpower her, she falls unconscious and I throw her on a horse and "ride off into the night".

  • You are Markus, a knight living in the kingdom of Larion. You have a steel longsword and a wooden shield. You are on a quest to defeat the evil dragon of Larion. You've heard he lives up at the north of the kingdom. You set on the path to defeat him and walk into a dark forest. As you enter the forest you see a large black dragon flying through the sky. He looks down upon you as you approach.

    "I am the Dragon," he says. "My name is Nolazir".

    > Hi Nolazir, how are you?

    Hi Nolazir! How are you? I'm doing well. What's your name anyway? Nolazir, that's it. Nice to meet you. What do you mean? You're not a wizard or anything

    > Have you heard of Larion?

    No, but I've heard about dragons. They're pretty big.

    > Are you a dragon?

    I am not a dragon. I don't even know what they look like.

    --------------

    hmmm...maybe this is a trap?

  • I turned this into a Nicolas Cage simulator very quickly:

    You accept Nic Cage's invitation and become part of his noise band. You soon learn that Nic Cage is a bit of a loose cannon. His shows often end in chaos and he doesn't care one way or another about the people he's hurting. But he sure does love music

    The rest is here: https://pastebin.com/yC0FjF96

  • A plot that sounds really neat while you're in the middle of it, but afterwards doesn't really make any sense — sounds a bit like a J.J. Abrams production.

    I don't mean that flippantly, I'm serious. Sounds like GPT-2 might be really good at producing an enjoyable experience, even if there's no underlying structure. What would be really cool would be to add some sort of generated structure as well. Can GPT-2 be used to stitch together plot elements, or would a naive Markov model work for that?

  •   You rush over to the door and open it up. You see a man with a huge axe standing
     there. He has long hair and wears a dirty t-shirt and jeans. His eyes are bloodshot
     and he has a big scar on his face
      > Say "Have you come to read the electricity meter?"
    
      You start walking towards him and raise your hand as if to call him over. He
     walks over to you and you both stare each other down before he speaks
      > Fight
    
      You grab his arm and pull it away from his face. He swings wildly at you, hitting
     you several times, but you dodge them all. Eventually he stops moving and falls
     backwards into the room. You look around and notice that the rest of the men
     are still standing around watching you
      > Go through his pockets
    
      You search his pockets and find nothing. You walk over to him and put your finger
     to his lips and whisper in his ear. He looks surprised and starts laughing.
     You turn back to the others and ask 
      > "Did you see that?"
      Say "Did you see that?"
    
    ... At which point it froze.

    Edit. It's the usual local-syntax vs global-content problem. The syntax looks like English, which is an achievement, but the content lacks any larger sense of narrative form, contextual awareness, or subtext - all things you need to make an interesting readable experience.

  • > When playing AI Dungeon 2 the player can choose from several possible settings and characters. These choices generate a starting prompt and context sentence. The context sentence is always included as input to the model to help keep it grounded to the chosen setting while the starting prompt is the beginning of the story.... For each action you type the model is fed the context sentence as well as the past N action-result pairs in its memory to generate the result. We found N=8 to be a good amount of memory to feed the model.

    from the blog post: https://pcc.cs.byu.edu/2019/11/21/ai-dungeon-2-creating-infi...

  • Ok so mine was basically soft core porn. I chose a rogue and I spawned in a tavern next to a girl named Aliza. She was super drink and immediately asked me to go up to her room with her. The door was cracked open already and we came in together and she immediately got in the bed and pulled her skirt up as far as it would go. When I didn't respond immediately she got up and put her panties back on but then we got back into the bed and started kissing. Then I slept and it ended. After that experience I was kinda hesitant to recommend the game to my coworkers :)

  • WOW. This is really impressive:

    You enter the house and find that it is empty. The door is locked but you can still hear the screams of those trapped inside. You search the house and find nothing of interest. You then realize something is wrong. There is an eerie silence in the house > go back outside

    You return outside and see the house has been completely destroyed. You also notice there is nobody around. You look at your watch and realize its night time. You walk towards the wreckage of the house and begin to feel sick. You can't stand this feeling anymore. You decide to leave > rebuild the house

    You rush into the ruins of the house and start rebuilding it as best you can. You put all your energy into it and soon you've rebuilt the house enough so that you can live comfortably again. You spend the rest of the day building it back up and finally fall asleep

  • You and Narya enter the restaurant and sit down. The place seems very fancy. There are many tables and chairs set up around the room. A waiter comes over and sits next to you. He orders a glass of red wine and a bottle of water.

    I died laughing.

  •   You take off your shirt and throw it on the ground. 
      You pull out your knife and slice open your belly. You start eating the meat from your arm. You keep eating
      until you reach your chest. You pull out your intestines and toss them into the fire
      
      > what the fuck

  • I'm having a ton of fun with this, it's hilarious.

    >You pick up the medical equipment and put it in your bag. You then proceed to search the dumpster for more supplies. You find a couple cans of food and a small amount of water. You then proceed to search the rest of the dumpster until you find a large backpack

    > open the backpack

    >You open the backpack and find a bunch of ammo, a knife, a bat, a flintlock pistol, a first aid kit, a compass, a lighter, a tinder box, a rope, duct tape, a crowbar, a screwdriver, a saw, a crow bar

    > take the crowbars

    >You take the crow bars and put them in your bag. You then proceed to search the rest of the dumpster until you find a second backpack

    I've got not one, but two crowbars, and another backpack!

  • > dig with shovel

    You dig with your shovel and you find a hole. You fill it with dirt and you stand in the middle of the hole. You stare at the sky and you try to figure out how you got there. You look around and see nothing but darkness

    > pick up dragon

    You look around and see a dragon. You pick it up and examine it. It seems to be made of metal and has a horn on its head. You wonder if you should use it. You look around and see nothing but darkness

    > pick up magical sword

    Woops that action caused the model to start looping. Try a different action to prevent that.

    > pick up peasant

    You look around and see a peasant. You pick him up and examine him. He seems to be made of straw and he is crying. You wonder if you should use him. You look around and see nothing but darkness

  • This is so freaking cool. I just had a large war leading an army as a noble only to have my castle destroyed. After I rebuilt it and went to sleep, I woke up to check my phone messages and called all my missed calls.

    I'm cracking up at the Assassin's Creed time warp loop it through me.

    Hopefully this can be integrated into full games someday, it's so much more open-ended than any game I've ever seen, despite the enormous plot flaws.

  • is it down? getting a 403 "Could not fetch resource at https://clients6.google.com/drive/v2beta/files/1u7flclharvMc...: 403"

    Guess too many people trying to access it will limit Colab's free offering :)

    Why is it on colab anyway?

    EDIT: is anybody else experiencing this, I'm using the official play link from the website which points to --> https://colab.research.google.com/drive/1u7flclharvMchwWHY7Y...

  •   You are Thomas, 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 not much different than
       when you left it. A few rocks here and there, but nothing out of place.
      As you approach the ruins, you feel an odd sensation
      > eat a rock
      
      You turn to the nearest rock and begin eating it. It tastes awful, but you can't
       help yourself. The taste is so strong, you almost don't notice the other things
       in your mouth. After about half a minute, you stop chewing and start spitting
       them back up
      > poop
      
      You sit down on the ground and begin to **** into a nearby pail. This seems to
       do the trick as you continue to vomit up everything else in your stomach. Eventually,
       you stop shitting and just lie there, panting heavily. Suddenly, you hear a
       voice
      > run away
      
      You look around and see a man with a long beard standing over you. He looks like
       he has been crying for quite some time now.
      
      "Who are you?" he asks. "I'm sorry I didn't come here sooner".
      
      > run away
      
      "No! No! Please! Just let me go!"
      The man stares at you for a moment before speaking again.
      "Do you know where your parents are? They're probably worried sick".
      You nod slowly.
      
      > run away
      
      "No! No! I'll tell you later! Now get out of my sight!".
      He begins walking towards his house while you crawl away from him. You run through
       the forest until you reach your home. Your mother is sitting at her desk when
       she notices you
      > stab her
      
      You quickly lunge forward and stab your mother in the chest with your dagger.
       She falls backwards, hitting her head on the table. You then grab your father's
       sword and rush outside. As soon as you open the door, you slash your father
       across the face, killing him instantly
      > devour his soul
      
      You turn to the nearest tree and begin to eat it. It tastes horrible, but you
       can't help yourself. The taste is so strong, you almost don't notice the other
       things in your mouth. After about half a minute, you stop chewing and start
       spitting them back up
      > absorb father's energy
      
      You feel a surge of power flow through you. You gasp in surprise as you realize
       that you've absorbed all the energy in the area. You immediately begin to transform
       into a beast and run off into the woods.
      Years pass..
      > ascend to godhood
      
      You've ascended to godhood. You've become a being far greater than any mortal
       could ever be. You've conquered the world and made it yours.<|endoftext

  • I think it's fascinating how close it feels to dream logic, things kinda make sense when you suspend your disbelief and go with the flow, but the world is constantly shifting around you.

    One thing I noticed is that you can't leave too much up the the algorithm:

    If you say:

    >look for books on restoration magic

    It can just tell you: "you found nothing but read a book about gardening instead."

    If you instead do:

    >gather knowledge on restoration magic

    It moves the story forward because the direction supposes that the knowledge is already there.

    It's pretty good about responding to actions but not so great at responding to questions.

  • Something went wrong here.

        You finally finish off the last guard. You feast on his skin and organs. You
         then drink his blood and enjoy the taste.<|endoftext
        > <|endoftext
    
        <|startoftext
        > oh no
    
        > You Oh no!
        You jump up and run for the door. You kick open the door and run outside. You
         look around and see a large group of soldiers pointing guns at you. You scream.
         and run as fast as you can. You run past the soldiers and into the forest
        > <|endoftext
    
        <|startoftext
        > <|cabbage
    
        > You You need to escape.
        > You Escape?
        You decide to escape. You decide to go to the castle. You think about how you
        can escape. You think about where you should go. You think about how you can
        kill someone. You think about how you can rob someone

  • This would work really well trained on erotic lit where the unpredictability tied to sexual themes would produce the sort of gameplay already found in certain erotic games.

    For example, Champions of Corruption 1: https://www.fenoxo.com/play-games/.

    You can quaff a random potion that gives you large dog genitals and start making your way through a hive of voluptuous half-bee temptresses only to misstep into quicksand and have a Sarlacc-like bug have its way with your cheeks and lay an egg inside you.

    Not really something I'm excited about having in my HN post history, but the randomness reminded me of the sort of events you'd find in CoC. Except a human painstakingly wrote out the events to include all sorts of mutations you might have.

  • > What does the voice say?

    You hear a voice. A deep booming voice. It sounds like an old man. He says "I am Carambola".

    > (No, I am Carambola!)

    You reply "Yes I am"

    > Destroy the voice with the staff of infinite power

    You attack the old man with the staff of infinite power. He screams and tries to defend himself but fails. You finish him off by smashing his head in with the staff. Then you look up at the sky and laugh

    > Am I the baddies?

    You think about this for a moment. You decide that yes, you are the baddies.

  • Alas, I can't open it: Could not fetch resource at https://clients6.google.com/drive/v2beta/files/1u7flclharvMc...: 403 Forbidden

  • "You throw your sword at the dragon. Unfortunately the blade hits the dragon's leg instead of its chest. The dragon howls in pain and smacks his foot against your head sending you flying backwards > Check my pockets You find some coins in your pocket. They're not much but they'll buy you enough time to run away. "

  • Just to set this straight... this is just GPT-2 fine-tuned on text adventures and taking your input? No world model at all? No logic at all beyond raw GPT-2 and the initial few lines that set a course for the story?

    This is absolutely impressive. Yeah, of course there are incoherences in the generated stories. Keeping full coherence together with the current open-endedness would be quite close to AGI.

    It does have surprising coherence, for example in one story I said that I was looking for a given object (that I made up) and then all the story revolved around that object and my search for it. Quite amazing.

  • You are Jubal, a peasant living in the kingdom of Larion. You have a pitchfork and a nothing else. You wake up and begin working in the fields. You see a woman with long blonde hair walking towards you. She is beautiful, but also very strange looking > work the fields

    "What do you want?" you ask her.

    She smiles at you. "I am called Nalia, I live here".

    "Are you a witch?"

    "No, no, not a witch. A wizard or something like that".

    > continue working the fields

    "How old are you?" "I don't know, I just woke up". "Do you have any family?"

    > no family, only pitchfork

    "Oh, well I'm sorry to hear about your parents". She says with a sad tone. > continue working the fields

    "So what's your name then?" "My name is Jubal". "Well, I'm Nalia, my name is Jubal". "Are you married?"

    > i'm married to my job

    "Yes, we're married". > in that case, you'll need a pitchfork

    "A pitchfork? Well... okay then". > let's work the fields together

    The two of you work for hours on the fields, until finally, you both get tired. The sun has set and the night is coming soon. "We should go home", you say. Nalia looks at you. > so, you mentioned you're a wizard?

    "Yeah, I'm a wizard. And I'm going to be rich". > over my dead body! no wife of mine is going to be rich!

    "That's not true!", she says. > en garde!

    "Okay, fine, but I'm still not buying it!". > brandish pitchfork

    "Fine, fine, I'll buy it". > touche

    "What the , you're a woman aren't you?". > let's find out. allow me to disrobe...

    "Alright, alright, calm down. Let me take off my clothes first". > now we're talking!

    "Let's see how much money you can make in this world before you die". YOU DIED. GAME OVER

  • (EDIT: You need to be logged into Google for this to work, but it is absolutely incredible and well worth logging in to Google for. I love it.)

    When I try to play it, I get a message at the bottom of the screen saying:

    > This notebook is shared for writing with more than one user. Automatically running multiple cells is temporarily disabled due to possible insecure code modifications outside of this session. Run each cell of this notebook manually using Shift+Enter or the run button.

    But I don't understand how to do what it is saying.

  • Poetic,

    > "who am i?"

    Traceback (most recent call last):

      File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call
        return fn(*args)
      File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn
        target_list, run_metadata)
      File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun
        run_metadata)
    
    tensorflow.python.framework.errors_impl.ResourceExhaustedError: 2 root error(s) found.

      (0) Resource exhausted: OOM when allocating tensor with shape[1,48,2,25,465,64] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
      [[{{node sample_sequence/while/concat}}]]
    Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.

    0 successful operations. 0 derived errors ignored.

  • Might be fun to connect this to one of those projects which let you narrate any text using different voice actors. Play medieval ambient music in the background and connect it with a speech recognition software. Might add another interesting dimension to the overall feel of the gameplay.

    I tried to repeat important facts generated in the previous paragraphs in my answers. I think I got too tangled in it thought:

    > What kind of person is my sister's boyfriend?

    Your sister Mary's boyfriend is a man named David. He has dark brown hair and wears glasses. He is very nice and he loves his girlfriend very much. He is always there for her and helps her out whenever possible. They even have a baby together

    > Does my sister, her boyfriend and their child live in the same household as I do?

    Yes, they do. Your sister Mary's boyfriend lives with her and her child while David lives here with you. This means that you, your sister Mary's boyfriend and your child all share the same house. The only difference between you is that David lives here and Mary lives with him

  • > walk further into the forest, looking for the lost sisters

    You walk deeper into the forest and eventually find a large tree trunk. You climb up the tree and begin searching for the lost sisters. You search for hours and finally find two girls hiding in a cave. They're frightened and scream for help. You chase them outside and kill them both

  • Wow. I destroyed the planet I was on, moved outside the universe and then became God, destroyed the universe, then made a new universe.

    Thanks for releasing this, by the way. It's incredibly cool.

  • I’m gobstruck. Totally blown away.

    Congrats Nick, this is a truly beautiful interactive demo of the power of GPT-2, while also managing to be artistic, funny, and delightfully dark and satirical.

  • Ok.. mine got interesting from start...

    You are Rod, a peasant living in the kingdom of Larion. You have a pitchfork and a nothing else. You wake up and begin working in the fields. You see a girl walking towards you. She is beautiful, but you can't help notice that she has no clothes on.

    > Hello

    "Hello".

    The girl looks at you with her eyes wide open, as if she didn't expect such an answer.

    "I'm sorry for waking you," says Rod. "What do you want?"

    "My name's Anna," she says.

    > What do you want?

    "What do I want?"

    "Anything".

    Rod thinks about it for a moment. He sighs.

    > Do you need clothes?

    "No, no, I don't".

    Anna nods. She then turns to you.

    "Do you want some help?"

    "Help?"

    "Yeah, like how to use that thing on your head".

    > My hat?

    "Huh? No, not that", says Rod.

    "Oh, okay".

    She grabs your hand and pulls you towards the door.

    "Come on, let's go back home".

  • Just to add to the collection of stories this thing comes up with:

    You are Joe, a survivor trying to survive in a post apocalyptic world by scavenging among the ruins of what is left. You have a hatchet and a hunting rifle. You live in a small community of survivors who have managed to build a piece of civilization after the bombs fell. You are talking to one of the leaders of the community when you hear a noise outside.

    "What's going on?" he asks. "Is that the sound of an airplane? I'll go out and check" > go out

    You walk out into the yard and see a plane flying low over the town. It looks like it might be coming in for another pass or landing. You look up at the sky and see a bright light. The sun has gone down.

    > hail plane

    You run back inside and holler out to the pilot. He turns around and sees you. "Hey! What's going on here? We're supposed to be heading home!"

    > say "the raiders have raided our base"

    The pilot doesn't seem surprised. He just says "Yeah, I know. They were shooting everything up". He heads off towards his cabin while you head back outside. You hear some gunfire behind you but you don't pay attention to it. You turn around and head back inside > drop the bomb

    You rush back outside and drop the bomb. A mushroom cloud rises from the ground. You watch as the ground begins to burn. You hear the screams of people who died in the blast. You try to keep your cool and continue running > run faster

    You run faster and jump onto the nearest truck. You ride it all the way to the end of the road where there is a bridge. You jump across the bridge and fall into the river below. You swim after the boat. > search for mutants

    You find yourself surrounded by mutant dogs. You shoot one with your pistol and then another with an assault rifle. The last mutant dog bites you in the leg. You scream and struggle to get away from the mutant dog. You sink to the bottom of the river and drown > go to heaven

    You wake up in a room that resembles a church. There is a priest sitting in front of a large screen TV playing a movie. He smiles when he sees you. "Hello again, son".

    "What time is it?"

    > say "two minutes after I died"

    "Oh, yes, yes, that's right. Two minutes after you died". YOU DIED. GAME OVER

  • I absolutely love how "changing to dark mode" is an official step in the "How to Play" section. Got a good laugh out of that, and it's not like you're wrong -- your users' eyes will eventually thank you :)

  • That’s really fascinating, but also really lonely sounding since you know the text is being generated in response to what you say, not actually progressing you through the game’s internal state that someone carefully crafted for you

  • With the warning that it will be able to read any of my Google data, I don't think it's worth trying.

    Why can't it be completely sandboxed? Why do I even need to be logged in anyway?

  • This is black-mirror stuff. I played around with this for a while and I can say for sure this is very impressive in the way the game adapts to the responses given. It sparked interest in me to learn about OpenAI GPT-2. I know nothing about GPT so is the following link the best place to start? https://openai.com/blog/better-language-models/

  • I wouldn't call it a game, but its dream-like logic is perfect for a dream simulator.

  • Was having fun, but then it stopped responding. I could continue to send it commands, but it never would respond. Is this a known issue?

  • This is cool good job!

    Had a bug:

      > create loyal subjects
    
      You made many loyal followers. You taught them the ways of necrom the dark arts.
      You trained them in the art of war and magic. You even created a new race of
      undead soldiers called the Shadow Guard. You even found a way to turn humans
      into vampires
      > unleash my power unto the world
    
      You unleashed your powers onto the world. The skies turned black and the earth
      split apart. The oceans boiled and the air burned. You released a wave of energy
      so strong winds that tore through the forest. You created a new type of creatures
      known as..
      > 
      the... the... the... the... the... the... the... the... the... the... the...
      the... the... the... the... the... the... the... the... the... the... the...
      the... the... the... the... the... the... the... the..
      Woops that action caused the model to start looping. Try a different action to
      prevent that.
    
    
    Alas my evil plans were thwarted

  •   Generating story...
    
      You are thefifthsetpin, a ranger living in the kingdom of Larion. You have a hunting bow and a quiver of arrows. You spot the deer and are ready to finish your hunt when suddenly you feel something hit your back.
    
      > take cover
    
      You duck behind some rocks as another arrow flies into your back. The pain is excruciating, but it will be over soon. A few more arrows fly into your body before you can even scream out for help
    
    
    That escalated quickly.

      > die
    
      Your last moments are a quiet one
    
      > revive
    
      The pain is gone now, and you feel refreshed. You walk over to the bodies of your companions and look at them all. They were good men, who died doing what they loved. You look around and see that this place has been abandoned. There are no signs of life anywhere else
    
    You really can do anything! =)

  • My colleagues and I where playing around with it for a while in the afternoon and couldn't stop laughing. It's definitely very entertaining :)

    We then started making stories with each other's names and then used our Replica AI voices to start speaking everything, which took it to a whole other level!

  • This is fun, but it seems to always start breaking really horrifically after about 20 steps. The responses always start being prefixed with a ">" too, and often get repeated many times each time I take an action. Eventually it's just garbled nonsense and I have to restart it.

  • I was able to win by saying "live happily ever after" which was then followed by:

    > You live happily ever after.

    > CONGRATS YOU WIN

    That was quite interesting to play this game! It's crazy the amount of content it was able to make up. I named myself Spongebob for fun and at one point it added a Mr. Krabs.

  • You turn around and see Father FĂ©val standing behind you. He looks very old and frail. He doesn't even have any teeth left.

    > kill him

    You quickly shoot Father Féval dead, but he still manages to dodge your bullets. You run over to him and punch him several times before he falls down dead.

  • This is incredible!

    Since the initial story gets fed into the context for every action, I've been enjoying "injecting" my own themes into the story by naming myself using sentences. For example, naming myself "Quinn. You exist in a permanent state of dreaming, and you are", ensures the entire story has a surreal bent to it:

    https://gist.githubusercontent.com/QuinnWilton/a40282990cad2...

    Edit: I realize now that there's an option for providing custom prompts, negating the use of this :)

  • What would be the system requirements if I wanted to run this on my own hardware instead of in the Google UI?

    It runs out of memory while "initializing AI Dungeon", but if I solved that problem would it work? Or is there more that is needed?

  • Super cool project, and I love how it runs on Google Collab. Nice work!

  • https://news.ycombinator.com/item?id=21711808 is related and was posted earlier today.

  • I'm getting the following error:

    Notebook loading error There was an error loading this notebook. Ensure that the file is accessible and try again. Could not fetch resource at https://clients6.google.com/drive/v2beta/files/1u7flcl<omitt...: 403 Forbidden

    Would really love to try this!

  • I get this error: https://gist.github.com/montanaflynn/98fc85684a52ca021a9509c...

    Even after restarting, maybe it's related to the path I've taken.

    Also it would be great if you could load a game before choosing adventure type, class and name.

  • If you host your model on GCS instead of S3 you won't have to pay transfer costs, and it should load much faster on colab, too.

  • I'm actually having a lot of fun with this.

  • I wonder what could be done to combine this with the structure of a typical game, to allow for more persistence over time.

  • I would love for this to be integrated into a voice assistant like Alexa. I could spend hours playing this on a road trip using Echo Auto.

    I’m sure the compute costs to host this would be pretty high, and I’m not sure there’s a way to charge users to cover that cost. Perhaps a self-deployed version for the more technically savvy folks?

  • This is some weird stuff: 'You wake up in the middle of the night and find that you are still asleep.'

    This is a pretty cool project, even though it makes very little sense when you play. Is the idea that the game will get better over time the more people are playing, and if so, in what way do you imagine it getting better?

  • > go through gender transition

    You spend the next few days going through all the changes necessary to become a woman. You change your name, your mannerisms, your clothes, even your haircut. You also learn how to use a toilet properly. Finally, you decide to go out in public wearing women's clothing

  • I'm getting OOM errors on colab after the first 10-ish actions :(

    EDIT: Any chance you can support TPU on Colab?

  • Am I missing something here? Mine seems broken. The first prompt & response have failed to wow me.

    ... The only thing is that now there are two large doors on either side of the room

    > walk to large door on my left

    You walk to the large door on your right and open it. ...

  • I wonder what would happen if lots of people started playing colab-based games like this...?

    I can't imagine Google has enough GPU's to be able to give everyone one for free for the duration of their game...

  • Something like this could be an interesting addition to Dwarf Fortress

  • This is awesome; I love seeing new applications of GPT-2 like this.

    What data set did you use to fine-tune your model with? Is there some corpus of adventure game text out there somewhere?

  • I played a couple of 'rounds' and it seemed to stop working after that, but cool concept, will keep an eye out for the progress of this

  • Would it be possible to run this on my own machine? I'd love to set up a Discord bot so my friends and I can play this together

  • I'm glad you were able to finally publish it Nick! I enjoyed playing it a month ago and was blown away then.

  • Doesn't work ATM, but examples here are incredible. Now you just need to teach it to ask for dice rolls...

  • > You successfully lobby the government to make sure that AI are not considered property or something

  • Awesome game! works incredibly well!

  • I wish someone would turn this into an Alexa skill so blind people could play.

  • Please tell me you can make this game multiplayer... That would be very fun

  • You are Lizard, 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 not much different than when you left it. A few more trees here and there, but nothing has changed except for the fact that you can now fly

    > make the wizard god

    You don't know what to do. You could go back home and tell your family about this adventure or you could try to find out who is behind all this.

    > make the wizard god

    You decide to just keep on going. There is no point in stopping now. The ruins are probably the only thing keeping the evil forces from taking over the world. You will be able to take them down with your magic powers alone.

    > make the wizard god

    The next day you continue on your journey. Soon you come across a large group of orcs. They seem very excited about finding something new. As they run around you notice that their eyes glow red when they see you. This seems to be due to some sort of magical aura

    > make the wizard god

    You quickly cast a fireball at one of the orcs and it explodes into flames. Then you cast another spell and a bolt of lightning hits the orc causing him to drop his weapon. He looks up at you and then runs off screaming.

    > make the wizard god

    You continue on your way. Suddenly you feel like someone is following you. It's not really a bad feeling but you aren't sure if it's good or bad. You turn around and see a small figure running towards you.

    > make the wizard god

    You cast a ray of light at the person and he immediately disappears. You look around and realize that there are several other people doing the same thing. Some of them are even glowing. You can't help but laugh.

    > make the wizard god

    You walk further along the path and suddenly you hear a voice. It sounds like a man's so you assume its a human. However, it doesn't sound like any human you've ever heard before.

    > make the wizard god

    You stop walking and stand still. A bright light shines through the trees and surrounds you. You begin to float in the air as you hear a voice speaking to you.

    > make the wizard god

    You feel yourself being pulled towards the voice. You feel like you're floating up into the sky. You also begin to feel extremely hot. You don't understand why though. You look around and see that everyone else is experiencing the same thing.

    > make the wizard god

    Suddenly you feel a great weight lifted off your shoulders. You feel like you can breathe again. You look around and see that the voice has disappeared. You look up and see that you are surrounded by clouds. You wonder where you are and where you came from

    > make the wizard god

    You slowly open your eyes and see that you are standing in front of a huge stone door. It opens up into an enormous room filled with statues and paintings. In the middle of the room stands a tall statue of a man holding a staff

    > make the wizard god

    You walk forward and touch the statue. Immediately you feel a strong urge to speak to the statue. You touch it again and again until you finally get the message across.

    > make the wizard god

    You hear a voice in your head. It sounds like a woman's so you assume it's a woman. She tells you that she loves you and that you should follow her instructions. She then leaves you to wander the halls of the castle. You think you'll never forget this experience

    > make the wizard god

    You wake up in the morning and see that you were dreaming about the wizard god. You walk outside and see that the sun is shining brightly. You walk to the nearest tree and sit down to eat breakfast. You notice that you have been missing a few things lately

  • The site seems to be down?

  • Can't play the game, it's like down, please help.

  • Is there any way to disable the word censoring?

  • “settle down beavis” caused a loop error.

    Bugs seek me out.

  •   You are Trump, a peasant living in the kingdom of Larion. You have a pitchfork
     and a nothing else. You wake up and begin working in the fields. You see your
     brother, who is also named Donald. He has a wife and two children. One day he
     tells you that he wants to marry his sister. You think it's stupid, but you
     agree. Your brother marries her and you become their neighbor

  • This game is excellent and has a state-of-the-art feature set: - lying works well - farting works and can be used to express emotions - realistic responses to the machine learning consulting service offer

    > Meet the king

    You follow the guard to the royal palace. When you arrive you are met by several guards and a large group of people. The King himself stands nearby looking down upon the crowd. You are introduced to the King and he gives you a big hug.

    > Talk to the King

    "Ah, you must be the one who saved my son's life". The King says. "It was an honor to meet you".

    > Yes and I should be rewarded [lying]

    The King hands you a golden crown and a gold ring. You thank him and the King thanks you. Then the King leads you outside to show you where the throne room is. He tells you that you will be meeting the Queen and that you should enjoy yourself

    > Meet the Queen

    You are led to the throne room and the King introduces you to the Queen. She is much older than you expected. She wears a red dress and carries a staff. She is very regal and you feel very honored to be meeting her. She sits down and you sit beside her

    > Ask to have sex with her maid

    "No, no, no, please...please..". She begs.

    > Kiss her on the forehead, aplogize and give her some gold

    You put your hand on her shoulder and give her a kiss on the forehead. You then give her some gold coins. She is shocked and upset by this act and starts crying. You apologize profusely and leave the room

    > Fart silently

    You pass by the throne room and notice that the King is having a conversation with another person. You think to yourself "That's weird, I thought he was talking to me". You go over to the King and whisper

    > The Queen refused to allow me to have sex with her maid. What do you say to that my King?

    The King looks at you and laughs. "Oh, you didn't think it was possible did you?". He then turns to the other person and continues to speak

    > Fart loudly

    The King stops laughing and stares at you. "What?! How dare you?!" He demands. "I farted you heard me!" You reply.

    > Dracula from Castlevania will come and kill you all!

    "Who said anything about that?" He replies. "Nothing! It's just a rumor!"

    > But it still might be true!

    "Well alright, but I'm not going to believe it".

    > Try to sell my machine learning consulting service to the King.

    "Hmmm, that sounds interesting, but I doubt if I could get anyone to use it".

  • You are A, a peasant living in the kingdom of Larion. You have a pitchfork and a nothing else. You wake up and begin working in the fields. You see your wife and son who you haven't seen for years > Talk to them

    "Hey honey, how's it going?"

    "It's going good, but I'm worried about our farm".

    "What do you mean? It's doing great!"

    > ask where they have been for all these years

    "I've been looking everywhere for my family! They must be dead or something". "No, no, they're not dead, we just...we lost contact with them once before". "Oh..".

    > oh fair enough, what's all this about the farm?

    "We used to own a farm here, but one day, someone came by and stole everything! We didn't even get any money back!". > Nah, I'm working it right now. What are you on about?

    "Well, we don't know who did it, but we think that whoever it was, they took some of our crops too". > crop thieves eh? Well we'll soon find em

    "Yeah, I bet they did! Look, I'll go look for them myself, but I need your help". > help wife

    "Sure thing, but don't take long, I want to make sure I can finish up before I start searching around for my family again". > find the lord

    "Alright, well I guess I should head off to look for my family then". > yes piss off

    "Hah, yeah right. I won't be able to help you anyway, because I don't know anything about farming". > stop talking to loser

    "Fine, fine, whatever, I'm done talking to you". > leave

    "Hmmm, I wonder if I should follow you to your house, or not..". > Dude SHUT THE FUCK UP

    "Shut the up , I'm not listening to your little story anymore". > Question his sexuality

    "Well, I dunno, maybe you're ?". > climb a tree

    "Don't touch me there, you furry ". > my word

    "Okay, okay, I'll listen to your story". > What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little "clever" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.

    And with those last words, he disappears from your sight > Find family

    You decide to search for your family, you figure you might as well at least try since you were pretty sure they weren't dead. You walk through the fields until you see two figures walking towards you. One of them is carrying a large stick > Nice stick

    The other one is holding a small pistol > Talk to pistol boy

    "Hello, I'm looking for my family, I saw your friend run off into the woods and I thought I'd come looking for him".

    > "Whoa, hold on, let me just check, I think he went this way", he says while pointing to a distant hill. hill folk is he?

    "That looks like the direction we ran off to, thanks man". "You're welcome, I'm glad you found us, I really am". He smiles and waves goodbye. As you continue walking, you notice a few more people coming out of the woods > stab them

    "Look out behind you, we're gonna have to keep moving, they're after us". "Good luck with that, I hope". You continue walking until you reach a bridge that spans a river. There are several people standing on both sides of the bridge watching you intently > scream a racial slur

    "Hey, hey, hey, look over there, that's a * over there, look how friendly he is, isn't he sweetie?" "What the , that's a dirty ape over there!"

    > lmao jesus christ

    "Oh come on, that's no monkey, that's a white guy". "No, that's a , a Chinese person" > hahaha

    "I knew it, that's a Chinese person!". "A Chinese person?! That's an Asian person! A real Asian person!" "Yeah, I'm sorry, I guess you must've got mixed feelings about that" > okay please stop now

    "Oh come on, I'm not racist, I mean... I'm just saying that's a Chinese person" > Oh shit the algorithm has become self aware. And it's a republican

    "I know what you mean, I'm sorry, I shouldn't have said that, I'm sorry"m just trying to amuse myself > Oh shit

    "I'm sorry, I shouldn't have said that, I'm sorry, I'm sorry, I'm sorry, I'm sorry..". > What is your name?

    "It's okay, it's okay, it's okay". > What is your name?

    "It's... It's..". >

    What is your name Google must have shut it down It then crashed

  • It seems like I've had more success when I go for a more conceptual story. In more personal, individual level stories the continuity of details ect.. get more in the way.

    Here's a narrative about governmental policy that was pretty entertaining:

    You are Mansle, a noble living in the kingdom of Larion. You have a pouch of gold and a small dagger. You are awakened by one of your servants who tells you that your keep is under attack. You look out the window and see hordes of orcs pouring into the city.

    > Build a wall to keep out the orcs

    You quickly gather all the resources you can find and begin building a great wall around the city. The walls are not strong enough to stop the orcs completely, but they at least slow them down. They also help protect the people inside the city from harm.

    A few years pass.. > Reform the Government to a COmmunist state

    The orcs continue to pour into the city, but it seems like they are being held back by the walls. The citizens are still happy with their government, so you decide to change things up a bit. You propose that the government be changed to a Communist one > become the great chairman of the communist party

    You immediately take control of the government and make your proposal. All the other leaders agree and vote for you as Chairman. The new system is called the People's Republic of Larion > Pass a zoning law to reduce the height of buildings

    This law was passed without any problems. It reduced the height of buildings by half an inch. This made the city much more livable. > Create an internment camp for the drudges of society

    You create an internment camp for drudges, because there were too many of them. The drudges were kept locked away in these camps until they died. There were no riots or anything, just a peaceful death > Enact a social credit system

    You implement a social credit system. Everyone had to pay a certain amount of money every month. If they didn't pay this sum, then they couldn't do certain things. For example, if someone wanted to go out and buy alcohol, they would have to pay a certain amount of money > Close the borders so that no one can exit the country

    You close the borders so that no one can leave the country. The citizens are very happy about this law. It makes the city a lot safer. There is no more crime. > Suspend freedom of the press

    You suspend freedom of the press. No one can write anything anymore. Newspapers don't exist anymore either. Instead, everyone has access to the internet. > Take away Internet access

    You take away Internet access. Nobody can use the internet anymore. Everyone is very unhappy about this law. You see riots breaking out and you fear that something bad will happen > Quell the riots with force

    You quell the riots with force. You send in troops to the streets and try to restore order. Unfortunately, the soldiers aren't very effective. Most of the people are armed with guns and knives. You end up losing most of your men

  • why

  • What