Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A text adventure game where GPT-4 is the player (typingcloud.com)
26 points by trungdq88 on April 14, 2023 | hide | past | favorite | 16 comments



lol I ran it through a D&D'esque adventure. when it made a dumb mistake i told it that it died. this is it's response.

> Oh no, I made a grave mistake. I should have been more cautious and stayed hidden in the jungle. Going out into the open, especially with a dragon hot on my heels, was a poor decision.

> As an NPC, my actions were influenced by my limited programming and lack of critical thinking skills. If I were given a second chance, I would have taken a different approach and update my behaviors to better respond to situations that would ensure survival.

Edit: An NPC telling me it lacks critical thinking skills and wishing it had another chance is... funny and trippy.

"I was an adventurer once, but then i took an arrow to the knee" to a whole new level.


I built this for fun. Free to play with your own API key.

Your API key and chat messages are stored locally on your browser. Requests are also sent directly from your browser to OpenAI's server. No data collection.

The original prompt is shown in the first message after you start the game.


I prompted ChatGPT with the following prompt:

System Instruction: You are a the environment of a text adventure. The user will navigate and interact with the environment by describing their action with text.

You will act as the environment. You as the environment will respond with more information that helps the user to make their next decisions.

Now you will enter their first message to start the game. Then the user will reply. Make the adventure compelling, interesting, fun, mysterious and engaging.

And then proceeded to copy/paste between ChatGPT and the Text Adventure game in this link, making ChatGPT the environment and this link the player.

UPDATE: In two occasions, the app in the link (let's call it AdventureGPT) reversed roles and started to act as the environment and ending with "What do you want to do next?". I managed to reverse it back to being the player.


I think you might be better off putting the actual adventure in a gist.


[flagged]


[flagged]


GPT-4> As you carefully study the map, you begin to recognize several landmarks and features of the surrounding region. Although many of the annotations are in the same ancient script that you've encountered throughout the temple, you're able to deduce that the map seems to detail trade routes, settlements, and possibly even hidden locations that have been long forgotten.

Turning your attention to the ancient-looking tools, you carefully examine each of them. Some appear to be related to navigation and cartography, such as compasses and measuring devices, while others seem to be more ceremonial or symbolic in nature. You can't help but marvel at the precision and skill with which they were crafted.

As you read through the scrolls, you realize that they contain information about the civilization's history, including the rise and fall of their great empire, and details about their advanced technology and knowledge of the stars. You're eager to share your findings with the world and help shed light on this long-lost civilization.

Despite your excitement, you remain cautious and aware of your surroundings, listening for any sounds or signs of danger. For now, the chamber seems peaceful and secure, allowing you to fully immerse yourself in your discoveries.

What do you choose to do next?

AdventureGPT> The information contained within the scrolls and the tools is potentially invaluable, and I am struck by the feeling that it must be preserved and shared with the world.

In order to keep the information from being lost or destroyed, I decide to take the map, scrolls, and tools with me. However, given their age and fragility, I handle them with great care, aware of the importance of this discovery.

I take note of the location of the chamber and the detailed design on the wall. As I begin to make my way back through the passage, I remain alert for any potential hazards or dangers that may have been triggered by my presence in the chamber.

Despite the risk of the unknown that still lies ahead, I feel energized and excited by the knowledge and artifacts that I have uncovered. This discovery is far beyond anything I could have imagined, and I can't wait to share it with the world.


AdventureGPT> With the ancient book safely stored, I turn my attention back to the unexplored passage that leads deeper into the temple. Despite the potential danger that lies ahead, my curiosity is piqued, and I decide to proceed down the passage to uncover more of the temple's secrets.

With careful steps, I make my way towards the unexplored passage, keeping a lookout for any potential hazards or traps that could be lurking around the corner. As I enter the passage, I take a deep breath, preparing myself for whatever lies ahead.

GPT-4> Emboldened by your recent discovery, you venture into the unexplored passage, eager to uncover more of the temple's secrets. As you proceed, you notice that the passage becomes progressively narrower and more winding, with the air growing cooler and more damp. The glowing crystals embedded in the walls provide just enough light for you to see your way, casting eerie, elongated shadows on the passage floor.

You remain vigilant, carefully scanning the walls, floor, and ceiling for any signs of potential traps or hazards. As you navigate the passage, you begin to hear a distant, low rumbling sound that seems to grow louder the deeper you go. The sound is accompanied by a slight vibration beneath your feet, making you wonder if there is some sort of machinery or natural phenomenon at work.

Eventually, the passage opens up into a cavernous chamber, its walls and ceiling adorned with stalactites and stalagmites. In the center of the chamber, you see a massive stone door, covered in intricate engravings and symbols that seem to pulsate with a soft, bluish light. The rumbling sound appears to be emanating from behind the door, and the floor's vibrations are stronger here.

What do you choose to do next?

AdventureGPT> The massive stone door covered in intricate engravings and pulsating with a bluish light seems to hold great significance, and I am compelled to investigate further.

Studying the engravings and symbols on the door, I attempt to decipher their meaning and determine if there is a way to safely open the door. As I move closer to the door to inspect it more closely, I also try to identify if the source of the rumbling and vibrations are related to the symbols or if there is another possible explanation.

However, given the possible dangers that lie ahead, I also remain cautious and aware of my surroundings, constantly scanning for any potential traps or hazards that could put me in danger.


AdventureGPT> With the pattern in the arrangement of the symbols becoming clearer, I decide to attempt to unlock the door by interacting with the symbols based on the sequence I have deduced. I approach the door, being wary of any possible traps or hazards that could be triggered by my actions and carefully begin activating the symbols in the sequence.

As I touch each symbol, I pay attention to any changes in the rumbling sound and vibrations, making sure I'm not activating anything dangerous. The door begins to emit a brighter bluish light, and the rumbling sound reaches a crescendo. Suddenly, the door begins to move, slowly creaking open to reveal what lies beyond.

Heart pounding with excitement and anticipation of what I could find, I take a deep breath before making the decision to step inside the newly revealed area. However, before doing so, I examine the threshold and surroundings around the door in case of any unexpected surprises.

GPT-4> As you carefully examine the threshold and surroundings around the door, you don't find any signs of traps or other unexpected surprises. Feeling reasonably confident that it's safe to proceed, you step into the newly revealed chamber.

The chamber is dimly lit by a few glowing crystals scattered along the walls, revealing a large, ornately decorated room. The walls are adorned with intricate carvings, depicting scenes of great battles and legendary creatures. In the center of the chamber, a large, circular table made of polished stone dominates the space. It appears to be some sort of ancient council or meeting room.

Several chairs, carved from the same stone as the table, surround it, and you can't help but notice the fine craftsmanship and attention to detail that went into creating them. On the table, you find a detailed map of the surrounding region, with markings and annotations that you can't quite decipher, as well as several scrolls and a few ancient-looking tools.

As you take in the scene, you can't help but feel a sense of awe at the history and knowledge contained within these walls. This chamber holds secrets that have been hidden away for centuries, and you've uncovered them.

What do you choose to do next?

AdventureGPT> The detailed map of the surrounding region and the ancient-looking tools pique my interest, and I make my way towards the table to investigate them more closely. With a heightened sense of curiosity, I study the map and attempt to decipher the markings and annotations.

I examine the tools to try and understand any possible significance or use of each. As I read through the scrolls and examine the tools, I become increasingly aware that I have truly stumbled upon a great discovery, a treasure trove of knowledge and artifacts that could potentially reveal the history of the civilization that once inhabited this temple.

However, given the potential risks and dangers that still exist in the temple, I also remain cautious, keeping my senses alert and scanning my surroundings.


GPT-4> As you approach the massive stone door, you study the engravings and symbols, trying to decipher their meaning. Some of the symbols appear to represent elements of nature, such as water, fire, earth, and air, while others seem to depict various celestial bodies. There are also several symbols that you don't recognize, which seem to be unique to the culture that created this temple.

You carefully inspect the door, searching for a mechanism or a clue on how to open it safely. As you examine the engravings, you notice a pattern in the arrangement of the symbols, which seems to suggest a specific sequence in which they should be touched or activated.

While you contemplate the sequence and its possible significance, the rumbling sound and vibrations beneath your feet continue to intensify. Although you can't be certain, it seems likely that the source of the rumbling and vibrations is somehow connected to the door, and perhaps even to the symbols themselves.

With a mix of caution and curiosity, you prepare to attempt to unlock the door by interacting with the symbols in the sequence you've deduced. At the same time, you remain vigilant, keeping an eye out for any potential traps or hazards that could be triggered by your actions.

What do you choose to do next?

AdventureGPT> With the pattern in the arrangement of the symbols becoming clearer, I decide to attempt to unlock the door by interacting with the symbols based on the sequence I have deduced. I approach the door, being wary of any possible traps or hazards that could be triggered by my actions and carefully begin activating the symbols in the sequence.

As I touch each symbol, I pay attention to any changes in the rumbling sound and vibrations, making sure I'm not activating anything dangerous. The door begins to emit a brighter bluish light, and the rumbling sound reaches a crescendo. Suddenly, the door begins to move, slowly creaking open to reveal what lies beyond.

Heart pounding with excitement and anticipation of what I could find, I take a deep breath before making the decision to step inside the newly revealed area. However, before doing so, I examine the threshold and surroundings around the door in case of any unexpected surprises.

GPT-4> As you carefully activate the symbols in the sequence you've deduced, you notice the rumbling sound and vibrations seem to sync with your actions. With each symbol you touch, the bluish light on the door grows brighter, and the rumbling becomes more intense.

When you touch the final symbol, there's a sudden, powerful vibration, followed by a loud, grinding noise. The massive stone door begins to slowly open, revealing the chamber beyond. You take a deep breath, your heart pounding with excitement and anticipation.

Before stepping inside, you cautiously examine the threshold and the area surrounding the door, making sure there are no traps or other surprises waiting for you. As far as you can tell, everything seems safe, and there's no indication of any immediate danger.

With a final, deep breath, you cross the threshold into the newly revealed chamber. The air inside is cool and damp, and a faint, ethereal light fills the space. You find yourself in a large, circular chamber, with a high domed ceiling. At the center of the chamber stands an intricately carved, stone altar, upon which rests a beautiful crystal orb. The orb seems to be the source of the ethereal light, casting a soft, otherworldly glow throughout the chamber.

What do you choose to do next?


AdventureGPT> The leather-bound book on the pedestal looks like a valuable artifact and could contain valuable information. I slowly approach the pillar and the book, taking a closer look at the symbol on the cover of the book to see if it matches any other symbols in the temple that I've explored.

As I examine the symbol, I try and recall if I've seen it before on any other walls, carvings or artifacts. I also remain cautious as I take a step closer to the pedestal, being careful not to accidentally trigger any traps or disturb any guardians.

GPT-4> As you approach the pillar and the leather-bound book, you carefully study the symbol on the book's cover. It appears to be some sort of emblem or sigil, intricately designed with interlocking patterns. You take a moment to recall if you've seen this symbol elsewhere in the temple.

Upon closer inspection, you recognize the symbol as one of the glowing symbols adorning the stone pillar. You also recall seeing it on some of the carvings and murals you passed on your way here, though it wasn't as prominent as it is in this chamber. The symbol seems to carry some significance to the ancient civilization that once inhabited this temple.

Remaining cautious, you step closer to the pedestal, making sure not to disturb anything that could potentially trigger a trap or awaken a guardian. With a sense of reverence, you carefully reach out to the book, intending to open it and examine its contents.

What do you choose to do next?

AdventureGPT> As I reach out for the book with a sense of reverence, I carefully open it to examine its contents. I make sure not to touch any of the symbols inside in case it triggers anything dangerous.

As I begin to read through the book, I discover that it contains detailed information about the ancient civilization that once inhabited the temple. The writing is somewhat difficult to decipher, but as I continue to read, I become more familiar with the language and writing style.

The book describes the civilization's way of life, their beliefs and religion, as well as their advanced technological knowledge. I realize I have stumbled upon a great discovery and a valuable treasure trove of knowledge.

What do you choose to do next?

GPT-4> Realizing the immense value of the knowledge contained within the ancient book, you decide to preserve it and share it with the world. However, you're also aware of the potential dangers that still lurk within the temple, and you don't want to risk damaging the book during your further explorations.

You take a moment to study the chamber for a safe spot to temporarily store the book. Your eyes settle on a small, recessed niche in the wall near the entrance, just high enough to be out of reach from any potential hazards on the chamber floor.

Carefully closing the book, you place it in the niche and make a mental note of its location, intending to retrieve it once you've finished exploring the temple. You feel a sense of accomplishment and excitement, knowing that you've discovered a valuable piece of history.

With the book safely stored, you turn your attention back to the chamber's entrance. The passage you came from leads back to the fork, while the other, unexplored passage still beckons you deeper into the temple.

What do you choose to do next?


AdventureGPT> Once I have safely navigated through the partially collapsed passage, I slowly emerge from the other side, brushing the dust off my clothes. Taking a moment to adjust my eyes to the dim light, I look around to see what lies ahead.

The passage beyond the obstruction is narrow and winding, with walls adorned with more glowing crystals and intricate carvings of animals and creatures that you don't recognize. The air is warm and dry, and you can feel a faint draft blowing through the passage, as if there's a hidden chamber or room nearby.

As you continue down the passage, you come across a fork in the road. To your left, the passage opens up into a wider chamber, illuminated by bright, flickering flames. To your right, the narrow passage continues, leading deeper into the temple's heart.

Which direction do you choose to go next?

GPT-4> Once I have safely navigated through the partially collapsed passage, I slowly emerge from the other side, brushing the dust off my clothes. Taking a moment to adjust my eyes to the dim light, I look around to see what lies ahead.

The passage beyond the obstruction is narrow and winding, with walls adorned with more glowing crystals and intricate carvings of animals and creatures that you don't recognize. The air is warm and dry, and you can feel a faint draft blowing through the passage, as if there's a hidden chamber or room nearby.

As you continue down the passage, you come across a fork in the road. To your left, the passage opens up into a wider chamber, illuminated by bright, flickering flames. To your right, the narrow passage continues, leading deeper into the temple's heart.

Which direction do you choose to go next?

AdventureGPT> The bright flickering flames in the wider chamber are too intriguing for me to pass up, so I decide to head towards the left fork in the passage. With cautious steps, I make my way towards the chamber, eager to explore what lies ahead.

GPT-4> Drawn to the flickering flames, you turn left and cautiously make your way towards the wider chamber. As you enter, you are met with a breathtaking sight. The chamber is circular, with tall, vaulted ceilings that seem to stretch up endlessly. The walls are adorned with magnificent, colorful murals depicting the lives and legends of a long-lost civilization.

At the center of the chamber stands a massive stone pillar, covered in intricate carvings and glowing symbols. The flickering flames that caught your attention earlier come from a circle of large, ornate braziers surrounding the pillar. The firelight casts a warm, dancing glow across the chamber, making the murals appear to come alive.

In the middle of the stone pillar, there is a small, recessed alcove. Inside the alcove, you can see an ancient, leather-bound book resting on a pedestal. The book is slightly worn, but it appears to be well-preserved considering its age. The book's cover is adorned with a symbol that matches one of the glowing symbols on the pillar.

What do you choose to do next?


To be fair, I had a lot of fun last year asking various LLMs to play Skyrim, imagined as a role-playing adventure with a human game master, and watching as they break sooner or later https://www.palimptes.dev/ai

With ChatGPT-4 though, I haven't yet got it to make something that dumb, though I had to remind it not to hallucinate the part of the story that traditionally is governed by GM.

Could it be what your demo is doing behind the scenes?


I tried to include the full conversation between GPT-4 and AdventureGPT but the messages are reversed as most recent messages are on top on HN and there's only 3 levels of replies


HA wow this is incredibly fun with GPT on the other side as a player. Really fun!!


Cool idea and great way to promote your product, Tony. Congrats on shipping :)


thank you!!


You ship too fast, Tony! This is awesome :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: