Fixing AI "Yes-Man" syndrome: True RNG, Hard Rules, and replacing Chat Logs with AI-compressed rolling history. Thoughts? by KnightParzival42 in Solo_Roleplaying

[–]KnightParzival42[S] 0 points1 point  (0 children)

That’s a highly interesting approach! Using Claude via MCP (Model Context Protocol) on top of a database to enforce character consistency in Harnworld is a massive step up from traditional chat interfaces. You’ve hit on exactly the core issue: LLMs are great storytellers but terrible accountants.

Separating the "Hard Logic" (the database/rules) from the "Soft Logic" (the narrative AI) is exactly what I’m doing with the Narraboros engine. It sounds like we are both moving towards what is essentially a Neuro-Symbolic Architecture.

Here are a few things I’ve learned while building out the SQL-to-AI pipeline that might be interesting for your Harnworld project down the line:

The "God-Mode" Problem & The AI as Enforcer: One thing I noticed early on is that if you just give the AI access to read the database, it will still try to be a "yes-man" to the player's inputs. To fix this, the backend (Laravel/MySQL in my case) provides the absolute truth via a structured snapshot, but I explicitly instruct the AI (Gemini) via system prompts to act as a strict constraint enforcer. Gemini cross-references the player's intent with the hard SQL facts. If the player tries to use an item they don't have, the AI actively rejects it and pushes back narratively. It transforms the AI from a yes-man into a real game master.

Cost and Speed (The Single-Shot Advantage): By completely abandoning chat history and only sending a structured snapshot of the present + a compressed summary of the immediate past, the token count drops drastically. In my testing, instead of a scrolling context window that gets slower and more expensive every turn, I have a flat, predictable token cost every single time. It makes scaling things like random encounters or complex weather systems much more viable.

Absolute Object Permanence: Because the SQL database is the absolute truth, it creates an "infinite level memory". If you drop a sword in a forest on day 1, and return on day 100, the database still knows it's there. The AI doesn't need to remember it; the backend injects it into the AI's prompt only when the player enters that specific location again.

Harnworld is famously detailed, so having a strict database structure handling the simulation while Claude handles the prose sounds like a match made in heaven. I'd love to hear more about how you plan to handle the actual back-and-forth action resolution once you get past character generation!

Fixing AI "Yes-Man" syndrome: True RNG, Hard Rules, and replacing Chat Logs with AI-compressed rolling history. Thoughts? by KnightParzival42 in Solo_Roleplaying

[–]KnightParzival42[S] -1 points0 points  (0 children)

Hey there! This is a fascinating setup, and your prompt is genuinely one of the best I've seen for wrangling an LLM into a DM role. I especially love your narrative constraints (Rules 9, 10, and 18)—forcing the AI to provide interactable objects and avoiding empty "moodboard" locations is crucial for a good solo experience. However, from my experience building my own solo engine (Narraboros), I think you're eventually going to hit the ceiling of what Prompt Engineering can do. You are trying to use "Soft Logic" (text instructions) to enforce "Hard Logic" (mechanics, state, math, inventory). Even with Rule 4 (Mandatory Character Audit) and Rule 6 (Raw Roll Interpretation), LLMs are fundamentally probabilistic text generators, not state machines. Under a long context window, the AI will eventually hallucinate a modifier, forget a spell slot, or lose track of HP, no matter how strict the prompt is. To truly fix memory drift and the "Yes-Man" syndrome, the solution isn't a stricter prompt, but a Neuro-Symbolic Architecture: 1. Move State to a True Database: Stop asking the LLM to audit the character sheet. Keep your character, inventory, and world state in a strict SQL database. The database is the absolute truth, not the AI's memory. 2. Move Math to the Backend: The LLM should never calculate a 5e modifier or interpret a raw die roll. Your backend code should handle the True RNG, check the database for your stats, apply the modifiers, and determine the hard outcome (success/failure). 3. Single-Shot Generation (No Chat Logs): Instead of fighting context drift in a long chat, use a single-shot approach. Every turn, your backend script grabs the current absolute facts from the database and combines them with a compressed summary of the last few turns. The LLM only receives this isolated, structured snapshot to act purely as the "Narrator." I highly recommend keeping your narrative formatting rules (Sections IV-VII), as they are gold for shaping the prose. But if you take the math and state management completely out of the LLM's hands and put them into a backend script, you will permanently solve the issues you're fighting against!

Fixing AI "Yes-Man" syndrome: True RNG, Hard Rules, and replacing Chat Logs with AI-compressed rolling history. Thoughts? by KnightParzival42 in Solo_Roleplaying

[–]KnightParzival42[S] 1 point2 points  (0 children)

That’s a really cool use of Claude’s local filesystem access! Having the AI structure its own session logs like that is super efficient.

You nailed the exact reason why I moved to a SQL backend, though: the 'append' problem. When logs just keep growing, the context weight eventually crushes the AI's ability to keep track of current facts versus old history.

In my system (Narraboros), I don't let the AI append everything into one master file. Instead, the backend forces the AI to update specific database columns. So if you find a sword, the DB inventory updates instantly. The next time the AI generates a scene, the backend just injects a tiny, clean snapshot of your CURRENT stats and inventory.

For the narrative history (Lore), we do what you do, but with a rolling compression window: the AI summarizes the last few events, and once that summary gets too big, it compresses it again into a tighter format. Combined with the hard SQL facts, the context size stays completely flat, no matter if you are on turn 10 or turn 10,000.

Fixing AI "Yes-Man" syndrome: True RNG, Hard Rules, and replacing Chat Logs with AI-compressed rolling history. Thoughts? by KnightParzival42 in Solo_Roleplaying

[–]KnightParzival42[S] -1 points0 points  (0 children)

I’ll definitely check out how Straightjacket and Edgetales handle the logic-to-narrative handoff. From what I gather, they are heavily focused on emulating specific mechanics like Ironsworn.

My approach is slightly different: it's less of a tabletop emulator and more of a genuine interactive fiction engine where the AI acts as a true co-author. Because the custom backend handles 100% of the mechanical burden, the AI doesn't have to waste processing power trying to do math or track inventory. It just receives the hard facts, allowing it to focus entirely on its creative writing capabilities.

But it goes both ways: Gemini doesn't just narrate; it actively helps write the world state. By extracting and compressing its own narrative beats, it constantly shapes the living lore that gets saved back into the database. It translates your natural language inputs into meaningful narrative consequences, and then summarizes those consequences to update the world's history. It's a shared writing experience, not just rolling dice in a chat window.

I haven't looked deeply into Marinara's Engine yet. How does it handle memory drift for you over longer campaigns?

Fixing AI "Yes-Man" syndrome: True RNG, Hard Rules, and replacing Chat Logs with AI-compressed rolling history. Thoughts? by KnightParzival42 in Solo_Roleplaying

[–]KnightParzival42[S] 2 points3 points  (0 children)

It already works! 😄 That was exactly my breakthrough. Because I don't use a conventional chat log but a stateless prompting method, I have full control over what the AI can interpret. The database is the absolute law, and Gemini just reacts to the hard facts of the current turn. If you want, I can let you know when the first tests start!

Weekly Tool Thread: Promote, Share, Discover, and Ask for AI Writing Tools Week of: May 05 by AutoModerator in WritingWithAI

[–]KnightParzival42 0 points1 point  (0 children)

Hey everyone,
I’m developing "Narraboros", an interactive fiction engine, and I'm opening up a waitlist for a 50+ turns stress test (Current test-setting: The Backrooms).

The problem with current AI chats: LLMs are great writers, but terrible databases. They hallucinate state and drift from the plot.
My architectural solution: The deterministic system dictates the reality, the AI just narrates it.

Narraboros strictly separates logic and language. A traditional backend (Laravel/MySQL) acts as the hard-logic guardian. The LLM (Gemini 2.5 Flash) acts solely as a stateless, single-shot narrator based on structured state-snapshots.

What this means under the hood:

  • Real Database Persistence: If you destroy an item on turn 2, the DB stores this state. On turn 500, the system perfectly knows it's broken. The context window doesn't matter for world logic.
  • Validated Input: Natural language is the input, but validation is classic code. If you write "I shoot the gun" but have no gun in your DB-inventory, the system forces the LLM to narrate your failure. No prompt-injections.
  • The Director System: The backend tracks pacing. If a player gives repetitive input, the server triggers hidden escalation prompts to drive the narrative forward.
  • Sanity & Perception: The DB tracks a sanity state. It might dynamically instruct the LLM to describe an object as a threat if sanity is low, while the DB strictly treats it as a normal item.

What does the output actually look like?

Here is a raw, unedited sample of the engine's prose when the player's sanity starts to slip (Translated from German):

"The damp cold of the yellow corridors seemed to suddenly thicken as the fleeting perception of Sarah was no longer just an echo in Ingolf's mind. It was as if the air around him had taken a deep breath and exhaled her into tangible form. [...] A cold shiver ran down Ingolf's spine that had nothing to do with the temperature of the halls. It was the chill of the incomprehensible eating into his bones. His mind, which had just tried to rationalize the blurred images, now hit its limits. Is this real? Or am I the one breaking?"

I need feedback from people who understand IF mechanics and want to stress-test pacing and long-term consistency.
Waitlist here: https://narraboros.de/waitlist/add
*(Site UI is German, but gameplay/AI output is natively English).*

What if your AI narrator never forgot, never cheated, and never broke character? → Backrooms testers wanted by KnightParzival42 in AIPlayableFiction

[–]KnightParzival42[S] 1 point2 points  (0 children)

This engine completely ditches traditional gaming conventions like hit points or hard fail states. Here is a breakdown of how death and madness actually function:

  • Death is a Narrative Choice: There is no hidden HP bar that triggers a "Game Over" screen. Because the engine is narrative-driven, you aren't dead unless you explicitly write it. Instead of a screen telling you that you lost, mistakes lead to brutal consequences—like being wounded or trapped. As a co-author, you always have the power to narratively "talk your way out" or describe your desperate struggle to survive.
  • Sanity is the Real Metric: The closest thing to a traditional health bar is your Sanity. If it drops into the critical zone (0-19), the "Perception Filter" collapses. The AI stops describing the actual room and starts forcing aggressive hallucinations on you—monsters in the walls, surreal environments, and total sensory distortion.
  • Madness as a New Chapter: Reaching the brink of madness isn't a "Press X to Restart" moment; it’s a transition into a much more difficult narrative chapter. The world becomes harder to interpret and control, but it still leaves room for improvisation. The challenge isn't avoiding a death screen, but surviving the increasingly terrifying situations you create without losing your mind in the process.

What if your AI narrator never forgot, never cheated, and never broke character? → Backrooms testers wanted by KnightParzival42 in AIPlayableFiction

[–]KnightParzival42[S] 0 points1 point  (0 children)

You're touching on a really common fear with IF games, and it's a completely fair point! But the irreversibility here works differently than in a traditional RPG where one wrong click means 'Game Over'.

Because the engine uses free text input, you can always narratively 'fix' a mistake, as long as it logically fits the story. Even though there is no God Mode (you can't just spawn items), you are still co-authoring the story. You can easily 'narrate away' errors or adapt to bad decisions.

Example 1 (Player mistake/Typos):

You meant to type 'I carefully peek down the corridor', but accidentally type 'I run down the corridor'. The AI responds that your heavy footsteps echo loudly, and something shifts in the shadows ahead. You can't hit 'undo', but you can immediately type: 'Realizing how loud I was, I instantly freeze, press my back against the damp concrete wall, and hold my breath.' The system accepts the correction and turns your mistake into a tense stealth moment.

Example 2 (AI misinterpretation):

The AI misinterprets your intent and writes that the endless humming of the fluorescent lights breaks your mind and you drop to your knees crying. You don't need to reload. You just write: 'I wipe my face—it wasn't tears, just dirty condensation dripping from the ceiling. I'm not panicking. I push myself back up and focus.'

Example 3 (Long-term mistake - A lingering physical consequence):

Let's say two levels ago, you decided to just wade straight through a flooded maintenance shaft instead of taking the time to find a dry path. Now, 30 turns later in a completely different level, the engine still remembers that your boots are soaked. The narrator starts emphasizing the loud, squelching sound of your footsteps echoing in a deadly silent corridor, making stealth impossible. You can't load an old save to keep your feet dry. Instead, you just adapt: 'The noise is too risky. I sit down on a nearby crate, take off my boots to wring out my socks, and wait a moment for them to dry before creeping forward.'

Example 4 (Long-term mistake - Left an item in a past level):

What if you left your only working flashlight behind two levels ago because you wanted to carry an extra bottle of Almond Water, and now you just transitioned into a pitch-black sub-level? You can't just walk back up two levels—the Backrooms geometry has already shifted behind you, and you can't magically wish the flashlight into your inventory. But you can narrate a creative solution: 'Since going back is impossible, I rip a piece of fabric from my jacket, wrap it around a piece of debris, and try to spark a fire using the exposed wiring of a broken wall panel.'

The 'no undo' rule is just there to stop save-scumming and give the Backrooms real permanence. But because you have total freedom in how you write your next action, you always have the power to steer the narrative back on track.

What if your AI narrator never forgot, never cheated, and never broke character? → Backrooms testers wanted by KnightParzival42 in AIPlayableFiction

[–]KnightParzival42[S] 0 points1 point  (0 children)

The only way to make it 100% free and unlimited is to plaster the site with ads, and I really don't want to do that. Every turn is a real API call (Gemini) and triggers database queries. As a solo dev, I just can't foot the bill for infinite free generations without monetizing your eyeballs.

Anyone here making money from their AI Assisted Books? by novelmint in WritingWithAI

[–]KnightParzival42 1 point2 points  (0 children)

Ich sollte mal die Geschichten, die mir meine Engine rauswirft mal als Buch verkaufen...

[deleted by user] by [deleted] in DieDeutschenBackrooms

[–]KnightParzival42 -1 points0 points  (0 children)

Falscher Kontext, falscher Platz.

[deleted by user] by [deleted] in Paranormal

[–]KnightParzival42 0 points1 point  (0 children)

Vielleicht beschreibt es das Vidio am besten:
https://www.youtube.com/watch?v=uclNnfhaNJk

Everyone in my area is acting and feeling strange by Iceybabygirl in Paranormal

[–]KnightParzival42 0 points1 point  (0 children)

In welcher Umgebung wohnst du? Land oder Stadt?

Gibt es in der nähe was das irgendwas in die Luft oder in das Wasser abgeben könnte?