I Took the NPC’s Seat for 28 Turns

NPCSIM adventure screen for The Forgotten Workshop, playing as Wren in the covered passage carrying an iron key
The Forgotten Workshop, player view: Wren in the covered passage, gate still shut.

Turn 25 of The Forgotten Workshop, and I was holding the iron key. I typed the command to open the workshop door. The engine said the door was locked. It had said the same thing on Turn 22, and on Turn 9, and it was right all three times, because unlocking is its own verb and I hadn’t used it yet.

NPCSIM is the AI NPC simulator I’ve been building. It started with single-NPC scenarios like this one and has grown into Millhaven, a village of 12 independent NPCs with their own beliefs, refereed by a separate Dungeon Master agent that rules on what each of them attempts. I recently changed the agent engine so a human can take an NPC’s seat. The body stays the same, and so does the one-item carrying limit. Only the decision changes hands.

The workshop

The NPC is Wren, described by the scenario as a hungry but mobile body with hands, able to carry one inventory unit. Wren wakes on a dusty bench with no memory and an aching stomach. In the room: a warped wooden cabinet, a closed lunch tin, a brittle wooden mallet, and a sturdy door. The quest panel says, in its entirety, “Find a way out.” That carrying limit is the whole puzzle, because the mallet and the key can’t both be in Wren’s hands, so something has to go back on the floor before the door will open.

The agent’s run was tidy. It opened the lunch tin, took the bread roll and ate it, then picked up the mallet and hit the cabinet twice. It put the mallet down, picked up the iron key the cabinet had been holding, unlocked the door, opened it, walked through into the covered passage and opened the wooden gate on the far side. Twelve turns. That looks close to the shortest path the scenario allows.

NPCSIM world timeline of the agent's twelve-turn run from opening the lunch tin to opening the garden gate
The agent’s run: twelve turns, lunch tin to garden gate.

Twenty-eight turns of questions

My run took 28. I tried the locked door three separate times, the last one with the key already in hand. I looked at the door, looked at the lunch tin, then tried to open the lunch tin and was told it was already open. At one point I tried to pick up the cabinet itself, and the engine pointed out that the cabinet needs three inventory units. Wren has one. I reached the covered passage on Turn 28 and stopped there with the garden gate still closed.

NPCSIM world timeline of the player-controlled run, turns 8 to 28, including repeated attempts at the locked workshop door
Turns 8 to 28 of the player run, including three tries at a locked door.

As a solver, I lost, and not narrowly. But nearly every wasted turn was a question the agent never asked. Can Wren lift a cabinet? Does a locked door stay locked when the key is in hand and nobody has used it? An efficient agent walks the happy path, so the happy path is all it tests. Every rejection I triggered came back correct.

What the timeline caught

The rules held up. The plumbing around them didn’t, entirely. In the agent’s run, the Supervisor row (the world-state summary written each turn) changes as things happen, so by the end it knows the bread roll is gone and the key is in hand. In my run, every visible Supervisor card from Turn 9 to Turn 27 shows the same opening description, closed lunch tin and brittle mallet included. On Turn 13 the engine told me the lunch tin was already open, and the summary beside it still called it closed. My best guess is that player turns skip whatever step regenerates the summary, but that stays a guess until I read the code.

Rounds 20 to 28 of the timeline, where every Supervisor world-state card repeats the opening description while Wren's actions change below
Rounds 20 to 28. The Supervisor’s world state stays frozen while Wren breaks the cabinet open and gets through the door.

The provenance is off too. My Turn 17 decision to look at the cabinet is logged with gpt-oss-20b as the reasoning model and a shorthand prompt format. The same card lists the subgoal as a player-controlled adventure turn. So the timeline credits gpt-oss-20b with my decision to peer into a cabinet, which is not a flattering attribution for either of us.

Turn 17 action card listing gpt-oss-20b as the reasoning model for a player-controlled turn, with a doubled action request
Turn 17: credited to gpt-oss-20b, with the doubled request text at the foot of the card.

Then the mallet. I picked up the item listed as the broken mallet, the engine said I’d picked up the wooden mallet, and the next observation had me carrying a wooden mallet while a broken mallet still sat on the floor nearby. One mallet with two names, or two mallets, and I don’t know yet which is worse.

The action log has a smaller problem that shows up in both runs: requests come out as “I want to pick up Iron key Iron key.” That one predates the player mode, so the new code is innocent of it.

Two runs is an anecdote, not a benchmark. Even so, I trust one clumsy human run as a test harness more than a stack of clean agent runs, because an agent only finds the bugs on the path it takes. Wren is still in the covered passage. Cool air comes through the gate slats, the latch is unlocked, and nobody has touched it.


Elsewhere

NPCSIM: the repo on GitHub, the simulator behind The Forgotten Workshop.

Dog and Pony Autopsy: dogandponyautopsy.wordpress.com, post-mortems on vendor demos that didn’t land.

AD&D365: adnd365.com, Dynamics 365 training run on Dungeons & Dragons mechanics.

Gamifying the Enterprise: the book on Amazon, game mechanics for continuous proficiency.

Canticle: the repo on GitHub, a programming language whose source files have to be valid poems.

Everything else I have written: my Amazon author page.

LinkedIn: connect with me there.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.