The question
How do automatic processes shape what a person does and thinks?
Walk into the kitchen and you don't think about a single step. Your mind is somewhere else. In an emergency it is the same: much of what a person does happens before they know there is one. The gap between a warning and the moment someone notices it, the habits that fire in that gap, and the plans that never turn into actions are hard to study in real people, because you can't rerun a real Monday with one thing changed.
So I built a person you can rerun. Everything numeric (valuation, decay, thresholds, every bias) lives in code and can be dialed. The language model is the thinking organ inside a mostly numerical person. It writes the thoughts and reads the snap judgments, and it remembers nothing between calls. It generates hypotheses about mechanisms rather than forecasts, and results are read as distributions over many runs, never from one run.
How it works
Six layers, from the world inward
- World
The ground truth the person lives in, run by a director with a written scenario, so every run hears the same events in the same words.
- Perception and attention
Only what the senses can reach gets in. Seeing is a list of the things within a radius in front of the person. Attention has a limit, and stress makes threats win.
- Body
Arousal, fear, anger, stress, fatigue, hunger, load and a dopamine channel, each drifting back toward baseline. When load plus stress passes capacity, the body takes over.
- Automatic layer
Seven buckets, each with its own dials and an off switch, turn events and body state into noticing, reactions and actions, with no thought involved.
- Awareness gate
Decides what ever reaches thought: the chance is how loud a thing is, times how much attention is left. Most of it never does.
- Thought and memory
The language model writes the ongoing first-person thought, in episodes. Memory is a database beside it: what happened, beliefs, trust in each person, habits, intentions, expectations.
The thinking module
Trained on a life, never told who it is
The thought stream is a 4B language model I host locally, in 4-bit on one RTX 4060 with 8 GB. It is trained on a large set of artificial experiences and ideas written for its persona, so it doesn't play a person. It thinks only in that persona's voice.
Training matters because telling a model who it is doesn't work well. In my framing test, a conventional "You are an AI assistant simulating..." frame bought no measurable persona sensitivity (1.90 against 2.07), lost probability on the answer labels (0.46 against 0.88), and leaked into the inner voice (1 of 20 thoughts against 0 of 20). The samples are small, so those are directions, not findings. "You are," "simulate," "character," "persona," "assistant" and "AI" are banned from model input. Every thought starts in the first person, as its own, and the model keeps going.
| Component | Run by | Per call |
|---|---|---|
| World, body state, valuation, learning, decay, every bias | Code | free |
| Attention, fast appraisal, habit choice, awareness checks | A decision read on the 4B model: one forward pass, probabilities over the allowed answers | ~63 ms |
| Thought episodes, reflection, speech | The same model, writing into a fixed first-person scaffold | ~3.8 s |
| Memory relevance, habit cues | Qwen3-Embedding-0.6B on the CPU | negligible |
A 9B model was compared. It is better at knowledge checks and invents fewer things, but worse at judging threats and 3.4 times slower per read, so the project stays on the 4B until a test shows the gain is needed.
Memory, feeling and intention, in real time
- Memory
The model remembers nothing between thoughts. Before each one, the few memories most active right now are pulled in, about four, fewer under stress, using ACT-R activation and embeddings.
- Feeling
The body's numbers move every moment and tune the thinking as it happens. Stress narrows attention and shrinks memory. Feelings reach thought only as words ("your chest is tight"), never as a number.
- Tempo
How much time one thought covers is set in code from stakes, surprise, arousal and routine. It rises fast and falls slowly: one compressed episode for an ordinary shift, a step every 30 to 60 simulated seconds when stakes and surprise are both high. An anxious persona can stay keyed up with nothing new happening, which is rumination.
- Intention
Thought never moves the hand. It sets intentions, each with a priority that fades. Habit and action code turns them into acts, and the body can still say no.
The rule that organizes everything
Code does math, models do meaning
Every model call starts blank and receives exactly what code gives it, through one prompt builder, under a token budget, in a fixed order. Most of the engineering is in enforcing that.
- Decision reads
A snap judgment is one forward pass reading next-token probabilities over opaque option labels. Every option is rotated through every position and averaged to remove position bias, and each question family is recalibrated on a labelled set. Differences between people come only from code-side parameters.
- Biases live in code
No numeric trait ever appears in a prompt, and a test scans every rendered template for banned words and decimals. Prospect-theory valuation, Prelec probability weighting and stress amplification are applied after the read, where they can be dialed.
- Thought sees only what passed the gate
Unnoticed events never appear in a prompt. Raw probabilities never reach thought.
- Structured thought without JSON
Each episode is written into a fixed first-person scaffold: free slots are sampled, constrained slots are scored by log-probability, and code extracts intentions and belief updates. A monitor flags any slip into narrating to an audience.
Running an experiment
From seed to comparison
Inputs. A persona seed, a scenario script with narration written in advance, and a config of dials. Every dial has a range, an evidence note and one owning mechanism.
Run. The per-tick cycle in code, with decision reads and thought episodes on the GPU. A 20-seed batch takes about 23 GPU hours, or 4 to 4.5 hours across six workers on two machines.
Logs. Every model call passes one gateway and is logged with its full input and output, model, template version, option order and seed, with a provenance record of commit, config, model lockfile and hardware.
Replay. Model outputs can be served from the log with no GPU, and a replay must reproduce the run exactly, so code-side dials can be swept with the thoughts frozen.
Compare. Every random stream is keyed so two conditions with one seed share every draw until behavior diverges. Predictions and pass criteria are committed before a batch runs.
Labelling discipline
Any automatic check on the model's output runs in shadow mode first. It is enforced only after I hand-label a random sample of what it would drop, blind to its verdict, and 5% or fewer of those drops are wrong.
Where it goes
Next
- Check it
A validation battery on three to five very different personas: do they stay distinct and consistent, keep to what they could know, and move with each dial the way evidence on real people says they should?
- Two lives
Two personas trained on lives that differ in one formative event should react to the same day differently, in the right direction.
- A town
A population with a social network, where the scripted characters are replaced by other simulated people.
A note I wrote while designing the body, on the variables that decision science and neuroscience agree a decision runs on and where each lives in the brain, is here.
Vale. A styling app that makes one decision every morning: what to wear. Live on the web and the App Store. Read it