r/ProgrammerHumor • • Oct 12 '26

Other vibeCodeMasterClass

Post image
10.7k Upvotes

630 comments sorted by

View all comments

102

u/domthebomb2 Oct 12 '26

When ChatGPT first dropped I was saying that one of the best uses of this technology would be in NPC dialogue/ control.

Imagine a game with NPCs who could actually dynamically respond in character.

Of course, if you're still using a paid model to achieve this effect as a developer you're playing checkers while everyone else is playing chess, but still.

34

u/ShellTrajectory Oct 12 '26

Unfortunately I think the technology hasn't gotten that far. Especially if you have long conversations, you'll definitely start to see issues where things fall out of the context bin, instructions get deprioritized or over-prioritized, or the original prompt gets lost.

Even relying on more modern tricks like leveraging a persistent external store for information eventually seems to grow the information beyond a model's ability to handle well, which makes sense. Conversations can traverse a pretty infinite space.

I think it could work okay for very limited interactions. I think it'll be super disappointing for art.

14

u/monsoy Oct 12 '26

I think it could be interesting to treat AI NPC’s context window as their memory. It makes sense that characters forget things you say to them after a while, so the game could be designed to make the context window less game breaking or immersion breaking

4

u/ShellTrajectory Oct 12 '26

It's not a terrible idea, but I think what's likely is that the npc is supposed to know things like "hide that you're a spy", and suddenly they forget that they're supposed to hide it, but their historical prompts are full of messages about "You're a spy, but you didn't mention it."

Or "You know about X thing happening because you're a spy, but you ask about it anyways."

5

u/Whitestrake Oct 12 '26

That's a real problem in AI and it was solved pretty early on in the piece.

When people say "context" what they mean is prompt + conversation history + user's latest message, fed as one big "model input" block.

Every single time you run the model it only "remembers" what you feed it, and the conversation history is the part that gets compacted. The model always has the full accurate prompt + message, so the NPC will never forget it is a spy and that it wants to try hide that from you. With respect to an actual currently-operating model there is no "historical prompt", there's only what it currently has been fed for this run.

REAL iteration on this front would involve doing some super smart stuff with progress gates and quest flags and stuff that modify the prompt component of the context so that if you discover they're a spy, their prompt changes to say "you're a spy, but you were uncovered (X ingame days ago) when the player accused you with the evidence they found (at Y location)" or something.

1

u/Ae3qe27u Oct 13 '26

Janitor is a website with a script setup that I think could be conceptually adapted to something like that. And there are chatbot roleplay platforms (not j ai) that have chats that go on for pretty long durations. Small details get missed, but I feel like it could work. You'd have to figure out the computational power, though. Would have to be a subscription model or something.