If you read Part 1, you know how the judgment works: five psychology experiments, compressed into a single question — does this feel right?
But to judge whether something feels right, you first need to know who the character is. And that raises a harder question: how do you store a fictional person inside a machine?
The answer is three layers of memory, each borrowed from a different model of how the human mind works. And a sleep cycle that isn’t a metaphor — it’s a direct translation of what your brain does every night.
🧠 Layer One: The 7 Things You Can Hold at Once
You know that feeling when someone gives you a phone number and you repeat it in your head over and over so you don’t forget it before you reach your phone? That’s your working memory.
In the 1950s, George Miller published a paper with a title that became one of psychology’s most famous lines: “The Magical Number Seven, Plus or Minus Two.” His finding: most people can hold about seven chunks of information in their working memory at once. Not seven sentences. Seven chunks. That’s why phone numbers are seven digits — someone designed them to fit in your head.
Twenty years later, Alan Baddeley realized it wasn’t that simple. He showed that working memory isn’t a single bin. It’s a system with parts: an inner voice that repeats what you just heard, a mental sketchpad for pictures and spaces, and a central manager that decides what to pay attention to.
What this has to do with characters: When you’re reading a conversation between two characters, you’re holding the last few exchanges in your working memory. You don’t reread the previous page before every new line — you just know what was said, because your brain kept it there. If a character refers to something from five exchanges ago, you might not remember the exact words, but you remember the gist.
The NMA does the same thing. Its WorkingMemory module keeps the last 10 turns of conversation in a rolling buffer — our version of the 7±2 limit. When a reader asks Caelan (the protagonist of my series) a third question, the system injects what was asked before and how he responded, so he can reference earlier exchanges. Nothing fancy. Just a short leash that creates the illusion of continuity.
📖 Layer Two: How Your Brain Reads a Story
In the 1990s, Rolf Zwaan asked a question so obvious nobody had thought to formalize it: what does your brain track when you read a story?
His answer: five things, simultaneously.
Time. When is this happening? Is it before or after the last thing I read?
Space. Where are we? Did the scene change?
Protagonist. Who’s driving this moment?
Causality. What caused this to happen?
Intent. What does this character want right now?
Zwaan called this the Event-Indexing Model, and he proved it works by measuring reading speeds. When a story shifts one of these dimensions — a new scene, a different time, a switch to another character’s perspective — reading slows down measurably. When it shifts multiple dimensions at once, the slowdown compounds. Your brain is literally building a separate index for each narrative event, and switching between indexes costs time and energy.
The NMA stores ingested novel chapters as events tagged with all five Zwaan dimensions. When you upload a chapter, the system doesn’t just extract “what happened” — it extracts when, where, who, why, and what they wanted. These tagged events become the character’s history, searchable both by keyword and by semantic similarity. When the judgment system checks if a response is in character, it searches this event history — comparing the character’s proposed action against everything that’s happened to them before, indexed exactly the way a human reader would organize it.
🏛️ Layer Three: The Network You Call “A Person”
Remember the warm/cold experiment from Part 1? Asch’s 1946 study where swapping one word changed an entire impression?
That experiment revealed something deeper than “first impressions matter.” It showed that your brain doesn’t store traits independently. It builds a schema — an interconnected network where each trait changes the meaning of every other trait. A warm person who’s determined reads differently than a cold person who’s determined, even though “determined” hasn’t changed.
This is not stored in a separate memory module. The NMA keeps each character’s schema directly in the database: their traits, relationships, motivation, and current arc stage, all in one table. When new story material is ingested — a chapter reveals that Caelan’s apparent stoicism is actually suppressed grief — the schema doesn’t just add a new trait. It reorganizes existing ones, just like Asch’s participants did when “warm” became “cold.”
Three layers. A rolling buffer for recent conversation, an indexed event history for the full story, and a networked schema for who they are. That’s enough to make a character feel real moment to moment.
But characters change. And that’s where sleep comes in.
💤 Why Your Brain Spends Every Night Forgetting
Here’s something surprising: your brain doesn’t just store memories while you sleep. It prunes them. Sleep isn’t passive consolidation. It’s active editing.
Every night, the brain cycles through a sequence: deep sleep replays and strengthens important connections, dreaming cross-references new memories with old ones, and the whole system prunes what doesn’t matter. Forgetting isn’t a failure of memory. It’s an optimization strategy.
In 2016, UC Berkeley researchers proved this by showing that sleep deprivation changes what people remember. Participants who slept after watching emotionally charged videos retained the emotional core but lost peripheral details. The brain made a deliberate choice about what to keep.
A character’s arc works the same way. The transformative events should stay on the main shelf. The mundane details can fade. But this doesn’t happen in one clean pass — it’s a multi-stage process.
The NMA’s SleepCycle has four phases, each mirroring what actually happens in the sleeping brain:
Phase 1 — Conflict Detection (deep sleep equivalent). Scans the character’s events for behavioral contradictions. Has the character acted against their own traits? A loyal character who betrayed someone gets flagged. At the same time, pivotal moments — death, betrayal, discovery — get their importance boosted automatically. The librarian decides which books earn a spot on the main shelf.
Phase 1.5 — Decay Archive. Events below a recall threshold — those that haven’t been referenced recently and carry low narrative weight — are moved from the active event store into an archive table. They’re not deleted. They’re just no longer front and center. This is the pruning your brain does every night: the unimportant memories slip into the background, retrievable but not immediately present.
Phase 2 — REM (dreaming). This is where the most interesting work happens, in four sub-steps. First, the system asks an LLM to extract behavioral patterns from the character’s event history — are there repeated motifs the rules alone wouldn’t catch? Second, it runs a redundancy check on vector embeddings, pruning nearly identical memories. Third, it tags events with Plutchik’s emotion categories (joy, trust, fear, surprise, sadness, disgust, anger, anticipation). Finally, it advances the character’s arc stage and adjusts trait confidence — a trait that’s been consistently demonstrated gains weight; a trait that’s been contradicted loses it. The character moves along their trajectory: stable → inciting incident → denial → turmoil → questioning → transformation → resolution.
Phase 3 — Consolidation Report. Everything from the previous stages is compiled into a single report: which events were boosted, which were archived, what patterns emerged, how the arc shifted. This report is stored alongside the character’s schema, creating a paper trail of how the system — and by extension, the character — has evolved.
The full event history is always preserved in the archive. The active store just holds what matters most right now.
The Thread
Three layers of memory. A four-phase sleep cycle that edits instead of just storing. A judgment formula that decomposes “wrongness” into five kinds of gut feeling.
None of these are new ideas. They’re all borrowed from people who spent their careers asking: how does the human mind actually work?
We just built a machine that uses their answers.
The question that started all of this — if only I could know what he was thinking — turned out to be a systems problem. Not the kind you solve with a better prompt. The kind that needs: a working memory that holds the last few exchanges, an episodic memory that indexes every event the way a reader would, a schema that networks traits into a person, and a sleep cycle that does at 3 AM what human brains do every night.
This is Part 2 of the NMA Architecture series. Part 1 covers the OOC Risk formula — five parameters born from five psychology experiments.