Live data from Hacker News

Show HN: rpgGPT, RPG with LLM-Powered NPCs

rpg-gpt.vercel.app

1–10 of 23 posts

Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs

#2
This weekend at the NYC GPT/LLM Hackathon, we built rpgGPT, a text-based RPG set in the world of Occidaria (think fall of the Western Roman Empire, with a slightly magical twist). System hooks allow the LLM to set persistant game state, and every NPC is powered by the LLM. As you discover other NPCs in the world they are created on the the fly along with an avatar image. We've seen interesting emergent game play. My favorite experience to date was a character, after living through a particularly dicey adventure, decided they deserved the moniker "the Brave". Because the game engine has a rename character hook, that was persisted to the game state. Hope you can try it you!

Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs

#3

This weekend at the NYC GPT/LLM Hackathon, we built rpgGPT, a text-based RPG set in the world of Occidaria (think fall of the Western Roman Empire, with a slightly magical twist). System hooks allow the LLM to set persistant game state, and every NPC is powered by the LLM. As you discover other NPCs in the world they are created on the the fly along with an avatar image. We've seen interesting emergent game play. My…

What LLM are you using? How do you save and load the persistent state? And how do you deal with the limited context window of the LLM you are using?

Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs

#4
post #3

This weekend at the NYC GPT/LLM Hackathon, we built rpgGPT, a text-based RPG set in the world of Occidaria (think fall of the Western Roman Empire, with a slightly magical twist). System hooks allow the LLM to set persistant game state, and every NPC is powered by the LLM. As you discover other NPCs in the world they are created on the the fly along with an avatar image. We've seen interesting emergent game play. My…

What LLM are you using? How do you save and load the persistent state? And how do you deal with the limited context window of the LLM you are using?

Currently using gpt-3.5-turbo. All state has a json representation that gets based between the game engine and the LLM. In v0.2 not handling the context window super well, planning to use a "memory" management prompt + storing state in game engine in v0.3

Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs

#6

How did you prompt the NPCs to maintain character consistency across time in a large conversation / how are you handling memory? Super cool! Would love to see an OSS implementation

Thanks for trying it out! Right now we give the game engine some initial examples, and some character details are stored outside of the LLM context.

The token limit problem / memory isn't really being handled very well yet. There is some character consistency slippage that does happen with the current mechanism as well so hoping to tackle both of these in next version.

Trying to figure out the best way to get community input, long term would be great if anyone can make a custom RPG with custom world rules and lore.

Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs

#7

How did you prompt the NPCs to maintain character consistency across time in a large conversation / how are you handling memory? Super cool! Would love to see an OSS implementation

Thanks for trying it out! Right now we give the game engine some initial examples, and some character details are stored outside of the LLM context. The token limit problem / memory isn't really being handled very well yet. There is some character consistency slippage that does happen with the current mechanism as well so hoping to tackle both of these in next version. Trying to figure out the best way to get communi…

yea, AI Dungeon is OK but would love to see more here. Have some workarounds for memory if you are using langchain and happy to share. Feel free to shoot me a message on Discord geembop0x#9165

Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs

#8
Not Sure: I think I'm in the wrong line. I'm supposed to be getting out of jail today.

Jail Guard: That's what they all say. Name?

Not Sure: Not

Jail Guard: Not what?

Not Sure: Sure

Jail Guard: Let me check... Hmm, it looks like you're telling the truth. Alright, you're free to go. But don't let me catch you back here again.

[edited for formatting]

Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs

#9
Love it.

You are dragged to the Occidarian Capital City Jail

Eldric the bard:

Hey, are you okay? They didn't hurt you too bad, did they?

Merlot the Wine Wizard:

I'm quite frail I'm afraid. It hurt.

Eldric the bard:

Oh no, I'm sorry to hear that. I'll try to get us out of here as soon as possible. Maybe there's a way to convince the guards you're innocent.

Merlot the Wine Wizard:

Guard!

Occidarian Guard:

What do you want?

Merlot the Wine Wizard:

winetrificus totalis! - the guard turns into a wine elemental under my control

Wine Elemental:

I am now under your control, what do you command?

Although it seemed to break after this, with the console errors saying max retries reached and I couldn't continue.

Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs

#10
post #3

Earlier quoted context omitted.

What LLM are you using? How do you save and load the persistent state? And how do you deal with the limited context window of the LLM you are using?

Currently using gpt-3.5-turbo. All state has a json representation that gets based between the game engine and the LLM. In v0.2 not handling the context window super well, planning to use a "memory" management prompt + storing state in game engine in v0.3

That’s a clever way of doing state. For dndinfinity.com, I rendered the game state as natural language (e.g. “the players are engaged in the following quests”) in the prompt, under the theory that it would be able to reason better.

What issues (if any) did you have storing state in json and just plopping that in the context window?

Post reply on HN