Skip to content

Commit ea47643

Browse files
docs: update v2 arch — merged pass caveat, conversation priority, cognitive arch cuts
1 parent 8fd496d commit ea47643

1 file changed

Lines changed: 49 additions & 25 deletions

File tree

docs/simulation-v2-architecture.md

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,13 @@ relationship_weights:
240240
coworker: 0.5 # ULEZ: less relevant unless both tradies
241241
```
242242
243-
These weights control conversation priority (who the agent talks to first) and peer opinion ordering in the prompt.
243+
These weights are used in two places:
244+
1. **Conversation conflict resolution** — when two people want to talk to the same agent, higher weight goes first
245+
2. **Peer opinion ordering in the prompt** — higher weight peers appear first with full detail (name, demographics, statement), lower weight peers get summarized ("a few acquaintances also mentioned it")
246+
247+
The agent's OWN choice of who to talk to is LLM-driven — they see the list of available people and pick based on what they need. The weights handle tiebreaking and prompt ordering, not the agent's decision.
248+
249+
**Auto-generation:** `extropy scenario` generates these weights automatically — the compiler LLM knows that ASI is a workplace threat (coworker weight high), Netflix is a household product (family weight high), ULEZ is local policy (neighbor weight high). The user can override in the YAML after generation.
244250

245251
---
246252

@@ -663,9 +669,17 @@ Respond as JSON:
663669
}
664670
```
665671
666-
### 3.4 Merged Pass 1 + Pass 2
672+
### 3.4 Merged Pass 1 + Pass 2 (With Caveat)
673+
674+
**Why we originally split into 2 passes:** Single-pass role-play + classification caused 83% central tendency — agents hedged toward safe middle options because "be this person" and "pick from these categories" competed in the same generation.
675+
676+
**Why merging might work now:** The v2 merged pass is structured differently. The agent reasons freely FIRST (unconstrained monologue), then fills in structured fields AFTER — within the same generation. The classification is downstream of the reasoning, not competing with it. The reasoning comes first and informs the structured extraction.
677+
678+
**This is a hypothesis that needs testing.** A/B test: run 200 agents with merged pass vs 2-pass, compare outcome distributions. If merged produces the same spread as 2-pass, keep it (saves 1 round trip per agent, ~50% fewer LLM calls). If it collapses to center, revert to 2-pass. The architecture supports both — the engine just needs a flag.
667679
668-
No separate classification pass. The single call produces:
680+
**Note on Pass 2 context:** The current Pass 2 already receives the Pass 1 reasoning text (not completely disconnected). What it lacks is the full persona/exposures/peers — but the reasoning already reflects all of that. The real win from merging is latency reduction and cost savings, not fixing a context gap.
681+
682+
The single call produces:
669683
- Free-form reasoning (internal_monologue, elaboration)
670684
- Structured outputs (sentiment, conviction, position, outcomes)
671685
- Actions (talk_to, post)
@@ -688,13 +702,18 @@ Classification into categories happens in `extropy results`, not during simulati
688702
689703
When an agent's actions include `talk_to`, the engine resolves it:
690704
705+
**Who the agent talks to** is LLM-driven — the agent sees their available contacts and picks who's relevant based on what THEY need right now. Travis might choose Darnell over Lisa tonight because he needs field-specific intel about automation in services, not a budget argument. The LLM makes this choice in context, so it's naturally topic-aware.
706+
707+
**Conflict resolution** (when two people want to talk to the same person) uses scenario-defined `relationship_weights` × structural edge weight. These weights are auto-generated by `extropy scenario` (the compiler knows ASI is a workplace threat → coworker weight high, Netflix is a household product → family weight high) and can be overridden in the YAML.
708+
691709
```
692710
1. Collect all talk_to requests across all agents
693-
2. Build pairs: (initiator, target, topic, edge_weight)
694-
3. Sort by edge_weight descending
711+
2. Build pairs: (initiator, target, topic, priority_score)
712+
priority_score = structural_edge_weight × scenario_relationship_weight
713+
3. Sort by priority_score descending
695714
4. Identify conflicts (same agent appears in multiple pairs)
696715
5. Non-conflicting pairs → parallel execution
697-
6. Conflicting pairs → sequential execution, highest weight first
716+
6. Conflicting pairs → sequential execution, highest priority first
698717

699718
For each conversation pair:
700719
Turn 1: Initiator speaks (LLM call with initiator's context + topic)
@@ -796,38 +815,42 @@ For network contacts specifically: if Darnell posted on X AND Darnell is in Trav
796815

797816
### 3.10 Cognitive Architecture (Tiered by Fidelity)
798817

799-
Split into independent subsystems, ordered by implementation difficulty:
818+
Split into independent subsystems. Each assessed for actual value vs implementation cost.
819+
820+
**Tier 1: Build (trivial, high impact — string formatting from existing data)**
821+
822+
- **3.10a: Emotional trajectory rendering.** Map sentiment history to narrative: "I started panicked. By mid-week it settled into dread. It hasn't lifted." Deterministic lookup from sentiment values + trend. Gives the LLM emotional continuity between timesteps instead of starting fresh every time. Zero cost.
800823

801-
**Tier 1: Trivial (string formatting from existing data)**
824+
- **3.10b: Conviction self-awareness.** "I've been firm about this since Week 1" or "I started certain but I've been getting less sure." Deterministic from conviction history. Enables commitment bias (consistent agents resist change) and openness (wavering agents are more receptive). Zero cost.
802825

803-
- **3.10a: Emotional trajectory rendering.** Map sentiment history to narrative: "I started panicked. By mid-week it settled into dread. It hasn't lifted." Deterministic lookup from sentiment values + trend.
826+
**Tier 2: Build at high fidelity (medium effort, good value)**
804827

805-
- **3.10b: Conviction self-awareness.** "I've been firm about this since Week 1" or "I started certain but I've been getting less sure." Deterministic from conviction history.
828+
- **3.10c: Internal monologue vs external action (THINK vs SAY).** Schema change — output includes both `internal_monologue` (raw, honest) and `public_statement` (socially filtered). Replaces the mechanical public/private split with agent-generated divergence. An agent with high agreeableness might have a large gap between what they think and what they say — that's interesting data. Schema change only, no new system.
806829

807-
- **3.10c: Internal monologue vs external action.** Schema change — output includes both `internal_monologue` (raw, honest) and `public_statement` (socially filtered). Replace the mechanical public/private split with agent-generated divergence.
830+
- **3.10d: Repetition detection + forced deepening.** If string overlap between consecutive reasonings > 70%, inject a prompt nudge: "You've been thinking the same thing for several days. Has anything actually changed? Are you starting to doubt your plan? Have you actually done anything about it?" Simple string comparison, no embeddings needed. Prevents the stale convergence we saw in the ASI run ("No change — save, learn AI, backup income" × 5 timesteps). Without this, agents converge to identical outputs and the sim produces meaningless duplicate reasoning.
808831

809-
**Tier 2: Medium (new logic, no new infrastructure)**
832+
**Tier 3: Build at high fidelity (medium effort, marginal value over full traces)**
810833

811-
- **3.10d: Repetition detection + forced deepening.** If cosine similarity between consecutive reasonings > 0.85 (or simple string overlap > 70%), inject a prompt nudge: "You've been thinking the same thing for several days. Has anything actually changed? Are you starting to doubt your plan? Have you actually done anything about it?" Simple string comparison, no embedding infrastructure needed.
834+
- **3.10e: Episodic vs semantic memory.** After N timesteps of consistent reasoning on a theme, engine extracts a belief statement and adds to persistent "beliefs" field. Shown as "Things I've come to believe:" separate from "What I thought recently." Extraction is rule-based: if the same keywords appear in 3+ consecutive reasonings, consolidate into a belief. Marginal value because the LLM already consolidates beliefs implicitly when reading its own full history — making it explicit is a nice-to-have.
812835

813-
- **3.10e: Episodic vs semantic memory.** After N timesteps of consistent reasoning on a theme, engine extracts a belief statement and adds to persistent "beliefs" field. Shown as "Things I've come to believe:" separate from "What I thought recently." Extraction is rule-based: if the same keywords appear in 3+ consecutive reasonings, consolidate into a belief.
836+
**CUT: Not building**
814837

815-
**Tier 3: Advanced (new subsystem)**
838+
- **~~3.10f: Attention/focus weighting.~~** ~~What the agent is currently focused on determines which inputs are foregrounded in the prompt.~~ **Cut.** The LLM already does this natively — if the memory trace says "budget first," the model naturally attends to budget-related inputs. Artificially weighting prompt sections is trying to replicate what attention heads already do. Unnecessary complexity.
816839

817-
- **3.10f: Attention/focus weighting.** What the agent is currently focused on (from previous reasoning keywords) determines which inputs are foregrounded in the prompt. "Budget" focus → budget-related exposures highlighted. Requires keyword extraction from previous reasoning and weighted prompt section ordering.
840+
**DEFERRED: Post-launch**
818841

819-
- **3.10g: Spontaneous memory recall.** Memories surface by RELEVANCE to current events, not recency. Requires embedding stored memories and comparing to current context. Small embedding model on short text, cheap per-call, but needs embedding infrastructure.
842+
- **3.10g: Spontaneous memory recall.** Memories surface by RELEVANCE to current events, not recency. Requires embedding stored memories and comparing to current context. Small embedding model on short text, cheap per-call, but needs embedding infrastructure. **Deferred because:** for most scenarios with 10-15 timesteps, recency and relevance overlap heavily — the memory that's relevant IS usually recent. This matters more for long-running sims (50+ timesteps) where early memories might be contextually triggered. Build it when we actually have that use case.
820843

821844
**Fidelity tier mapping:**
822845
| Feature | low | medium | high |
823846
|---------|-----|--------|------|
824847
| 3.10a emotional trajectory | Yes | Yes | Yes |
825848
| 3.10b conviction self-awareness | Yes | Yes | Yes |
826-
| 3.10c internal monologue | No | No | Yes |
849+
| 3.10c THINK vs SAY | No | No | Yes |
827850
| 3.10d repetition detection | No | No | Yes |
828851
| 3.10e episodic/semantic memory | No | Yes | Yes |
829-
| 3.10f attention weighting | No | No | Yes |
830-
| 3.10g spontaneous recall | No | No | Yes |
852+
| ~~3.10f attention weighting~~ | | | **Cut** |
853+
| 3.10g spontaneous recall | No | No | **Deferred** |
831854

832855
---
833856

@@ -948,10 +971,9 @@ Conversation themes (clustered):
948971
| Conversations | None | Top 1 edge (partner/closest) | Top 2-3 edges |
949972
| Internal monologue | Not separated | Not separated | Explicit THINK vs SAY |
950973
| Repetition detection | No | No | Yes |
951-
| Spontaneous recall | No | No | Yes |
952974
| Social posts | Stored, not rendered | Stored + aggregate | Stored + aggregate + named peer posts |
953975
| Scenario timeline | Yes | Yes | Yes |
954-
| Pass structure | Single merged call | Single merged call | Single merged call |
976+
| Pass structure | Merged (test vs 2-pass) | Merged (test vs 2-pass) | Merged (test vs 2-pass) |
955977

956978
### Cost Estimates (Conservative)
957979

@@ -1068,9 +1090,11 @@ Changes: `engine.py` (conversation phase), new `conversation.py`, `reasoning.py`
10681090

10691091
Changes: `reasoning.py`, `engine.py`, `persona.py`.
10701092

1071-
- Tier 1 (easy): emotional trajectory, conviction self-awareness, internal monologue
1072-
- Tier 2 (medium): repetition detection, episodic/semantic memory
1073-
- Tier 3 (advanced): attention weighting, spontaneous recall
1093+
- Tier 1 (easy): emotional trajectory, conviction self-awareness (all fidelity levels)
1094+
- Tier 2 (high fidelity): THINK vs SAY separation, repetition detection
1095+
- Tier 3 (high fidelity): episodic/semantic memory consolidation
1096+
- ~~Attention/focus weighting~~: **Cut** (LLM does this natively)
1097+
- Spontaneous memory recall: **Deferred** to post-launch
10741098

10751099
### Phase F: Aggregate Mood + Fidelity Tiers (Issues 7, fidelity) — ~1 week
10761100

0 commit comments

Comments
 (0)