--- title: 'Deterministic Narrative Gravity: Bridging Theory of Mind and Historical Simulation through ABM-LLM Architectures' authors: ['Alicia Colmenero-Fern\''andez', 'Lidia Ortega Alvarado'] date: 2026-11-10 categories: ['cs.MA', 'cs.AI', 'cs.CL'] tags: ['system_design'] source_id: '2611.11212' source_url: 'https://arxiv.org/abs/2611.11212' description: 'Historical social simulation faces a fundamental reproducibility challenge: the stochastic nature of large language models (LLMs) introduces a digital butterfly effect that prevents exact replication...' keywords: ['cs.MA', 'cs.AI', 'cs.CL', 'Deterministic', 'Narrative', 'Gravity'] canonical: 'https://dailyreading.cc/records/arxiv_2611.11212' --- # **Deterministic Narrative Gravity: Bridging Theory of Mind and Historical Simulation through ABM-LLM Architectures** **Alicia Colmenero-Fernández1,2**\* **, Lidia Ortega Alvarado1,3** - 1 *University of Jaén* - 2 *IA-ismo LAB,* - 3 *Departamento de Informática,* To appear in the Journal of Computer Applications in Archaeology ## **Abstract** Historical social simulation faces a fundamental reproducibility challenge: the stochastic nature of large language models (LLMs) introduces a digital butterfly effect that prevents exact replication across multi-turn runs. Furthermore, the inability to control lowlevel server parameters in commercial LLM hosting environments severely limits the reproducibility required to systematically evaluate agent responses. To overcome this opacity, we present a deterministic multi-agent framework coupling LLMs to an Agent-Based Modelling (ABM) pipeline—grounded in Theory of Mind (ToM) and Cognitive Archaeology—and validate exact artifact identity within local, pinned execution environments using SHA-256 hashing. Run locally at temperature zero with clean per-call model reloads, the system injects differentiated cognitive states per turn through dissonance-driven behavioural modes and gated internal voices. Evaluating seven model configurations spanning 4B to 31B parameters against an ablated baseline reveals clear operational boundaries. Small models (≤8B) suffer from context capacity overload, producing repetitive, specular dialogue loops. However, at ≥12B parameters, the ABM scaffolding breaks the monotonous response patterns seen in ablation. Crucially, these scaffolded models exhibit spontaneous diegetic expansion: they coherently expand scenario lore through tactically motivated, anachronism-free details rather than escalating into aggression. By resisting the structural pull toward premature scene closure, scaffolded sessions sustain an open terminal Narrative Vector (VN = Open in 12/21 overall; 9/9 in official ≥12B configurations) whereas unscaffolded ablation never does (0/21). This framework provides a transparent, auditable benchmark architecture for virtual archaeology, with the full pipeline released as open-source software to enable independent replication. **Keywords:** Agent-Based Modeling, Large Language Models, deterministic simulation, narrative dialogue, cognitive architecture, multi-agent systems, historical simulation, Theory of Mind \*E-mail: acf00053@red.ujaen.es; lidia@ujaen.es ## **1 Introduction** Agent-Based Models (ABM) constitute the dominant paradigm in social simulation [1,](#page-23-0) [2](#page-23-1); however, their deductive rigidity precludes the capture of human discursive agency. While contemporary architectures such as Generative Agents [3](#page-23-2), WarAgent [4](#page-23-3), and BattleAgent [5](#page-23-4) leverage Large Language Models (LLMs) to achieve greater naturalism, they inherit two critical vulnerabilities: stochasticity (lack of reproducibility) and alignment bias (sycophancy induced by RLHF). In the context of virtual archaeology, these vulnerabilities are particularly disqualifying: an unauditable simulation of past social interaction cannot function as scientific evidence, regardless of its narrative plausibility. To address this, we present a hybrid ABM-LLM architecture grounded in controlled inference and transduction. We implement a Python engine that computes cognitive signals and dynamic anchors to counter what we term *narrative gravity*. Hash comparison showed bit-exact repeatability in specified pinned environments, while cross-architecture tests exposed prompt-dependent numerical branching. The framework also provides exploratory evidence of coherent narrative continuation beyond immediate prompt resolution. It integrates Theory of Mind (ToM) dynamics—a construct central to Cognitive Archaeology's account of past intentionality—prioritizing the individual as the base unit for scaling collective dynamics and ensuring observability under the ODD (Overview, Design concepts, and Details) protocol. #### **1.1 Reproducibility and Traceability as the Foundation of Scientific Method** Historical research requires reproducible experiments, establishing experimental reproducibility as the minimum standard of scientific credibility [6,](#page-23-5) [7](#page-23-6). Without traceability, ABMs risk being narratively convincing yet scientifically opaque. As demonstrated by failed replications [8](#page-23-7), omitting sampling mechanisms mandated by the original ODD standard invalidates replication. Consequently, our framework emphasizes explicability, reproducibility, and open-access code to ensure legitimate scientific auditing. ## **1.2 State of the Art** ## **1.2.1** *The ABM Paradigm: Achievements and Limitations* Since the foundational works of Epstein, Axtell, and others, ABMs have consistently demonstrated how local rules generate macroscopic social complexity [1,](#page-23-0) [9,](#page-23-8) [10,](#page-23-9) [11](#page-23-10). To ensure traceability, the field adopted the ODD protocol [12,](#page-23-11) [13,](#page-24-0) [2](#page-23-1), facilitating transdisciplinary integration with Individual-Based Modeling (IBM) [14](#page-24-1), although algorithmic transparency remains a persistent problem [15,](#page-24-2) [2](#page-23-1). Classical social simulation mathematically models opinion dynamics through four interaction forces [16](#page-24-3): - **Assimilation:** Attraction toward similar stances, with costs proportional to divergence. - **Negotiation:** Consensus through proximity at a lower energetic cost. - **Opposition:** Repulsion and polarization when messages cross a rejection threshold. • **Reinforcement:** Validation and social contagion when messages align with existing beliefs. Despite these frameworks, traditional ABMs face practical barriers: high computational costs relative to biological or social systems [17,](#page-24-4) [18,](#page-24-5) [19](#page-24-6), and "narrative reductionism," where hard-coded rules execute the *what* but fail to generate the subjective *why* [18](#page-24-5). In fields like virtual archaeology, ABMs evaluate micro-macro causality and environmental affordances [20,](#page-24-7) [5,](#page-23-4) [21](#page-24-8). To overcome algorithmic rigidity, our work adopts the ABM mathematical approach to interaction but uses LLMs to generate perception variables, avoiding narrative reductionism without the computational burden of massive multi-agent societies. ## **1.3 LLMs as Infrastructure for Discursive Agency** Social causality is fundamentally semantic, driven by interpretive frameworks and collective memories [22,](#page-24-9) [23,](#page-24-10) [24,](#page-24-11) [25](#page-24-12). Regardless of debates regarding their structural comprehension [27](#page-25-0) or stochastic nature [26](#page-25-1), LLMs operate on the exact substrate of historical agency: contextualized language. LLMbased architectures produce complex emergent behaviors without explicit rules, outperforming traditional systems [28](#page-25-2) in simulating polarization and historical shocks [3,](#page-23-2) [29,](#page-25-3) [30,](#page-25-4) [31,](#page-25-5) [32](#page-25-6). However, decentralized autonomy introduces vulnerabilities like unguided drift, role flipping, and infinite loops [33](#page-25-7), which provoke narrative collapse. Furthermore, multi-agent LLM systems frequently exhibit conformity biases and groupthink [34](#page-25-8). A significant gap persists: the literature lacks approaches that organically integrate generative flexibility with rigorous structural control. Our work addresses this through fixed greedy-decoding, clean-reload controls, and a ToM-based parametric framework for navigating narrative gravity. ## **1.4 Determinism and Inference in LLM-Based Social Simulation** The inherent stochasticity of LLMs—arising from probabilistic token selection [35](#page-25-9) and hardware-level non-determinism [36](#page-25-10)—creates a digital "butterfly effect" that precludes replicability in long-horizon simulations [26,](#page-25-1) [37](#page-25-11). Current stabilization solutions remain insufficient: statistical averaging or interactive probing oversimplify complex interactions [5,](#page-23-4) [38,](#page-25-12) [39,](#page-26-0) [40,](#page-26-1) [4,](#page-23-3) [41](#page-26-2), while qualitative metrics [34,](#page-25-8) [42](#page-26-3) and infrastructure-level fixes [43,](#page-26-4) [44](#page-26-5) demand prohibitive supercomputing resources. We address this through a local hybrid architecture using Ollama [45](#page-26-6), fixed greedy-decoding settings, server-level Flash Attention disabling, and clean model reloads between calls. These controls produced bit-exact repetition within the tested pinned environments, but did not eliminate all cross-architecture numerical differences. The claim is therefore repeatability under specified conditions, not universal deterministic inference. ## **1.4.1** *Narrative Gravity and the Hybrid ABM-LLM Paradigm* We operationally define *narrative gravity* as an agent's probabilistic tendency to converge toward a dominant semantic configuration. This manifests as attractor collapse [46](#page-26-7), semantic homogenization [47](#page-26-8), and sycophancy derived from RLHF alignment [34,](#page-25-8) [48,](#page-26-9) [49,](#page-26-10) [50,](#page-26-11) [51,](#page-27-0) [52,](#page-27-1) [53,](#page-27-2) [54](#page-27-3). Consequently, agents exhibit conformity [49](#page-26-10), cascading hallucinations [39](#page-26-0), and U-shaped attention bias [55](#page-27-4). Under high tension, agents syntactically and semantically submit to the interlocutor's discourse rather than negotiating autonomously. To mitigate this discursive submission, we unify scattered coherence mechanisms [39,](#page-26-0) [41,](#page-26-2) [56,](#page-27-5) [57,](#page-27-6) [40,](#page-26-1) [4,](#page-23-3) [58](#page-27-7) into a dual-sphere architecture. The Inner Sphere (Meta-agents/ABM) shields the agent's endogenous identity, while the Outer Sphere (Compositor) acts as a structural regulator. Here, the parametric ABM functions as an active attention filter and cognitive counterweight against semantic drag. This allows agents to sustain long-horizon interactions from the obstinacy of their parametric identities, forcing sophisticated negotiations rather than collapsing into sterile consensus [46](#page-26-7). This deterministic-by-design infrastructure enabled the controlled ablation study reported here [59](#page-27-8). Building on previous modular frameworks [3,](#page-23-2) [60](#page-27-9), our parameterized sandbox facilitates the evaluation of counterfactual time series and exploratory analysis of how structural modifications are associated with agents' interpretive frameworks and narrative gravity. This contribution is scoped as a **proof-of-concept** study. Its objective is not to replicate the full socioeconomic complexity of the Iberian Iron Age, but to test whether deterministic parametric scaffolding is associated with reduced narrative closure and to identify candidate boundary conditions for that pattern. We position these results as a methodological foundation for future confirmatory, large-scale deterministic social simulations of historical contexts. ## **2 Methodology** ## **2.1 Materials** #### **2.1.1** *Models* This study evaluates the architecture of the Gemma family (Gemma 3 and Gemma 4 versions) to measure its capacity to sustain parametric identities against *narrative gravity*. Models ranging from 4B to 31B parameters were analyzed, executed through the Ollama *runtime*. Two architectural paradigms are structurally differentiated: - **Dense models (***Dense***)**: gemma3:12b (Q4\_K\_M), gemma4:e4b (4B effective), gemma4:31b (Q4\_K\_M), batiai/gemma4-31b:iq4 (community) and ssfdre38/gemma4-turbo (*e4b*); this includes quantized versions and variants with selective activations. In these models, all parameters are activated homogeneously at every inference step. - **Mixture-of-Experts models (***MoE***)**: the official gemma4:26b version (with 3.8B active parameters per token) and its community-quantized version batiai/gemma4-26b:q3. | Dense Models (Dense) | Mixture-of-Experts (MoE) | |----------------------------------------|--------------------------------------| | gemma4:e4b (4B effective) | gemma4:26b (official, 3.8B active) | | gemma3:12b (12B, baseline, Q4_K_M) | batiai/gemma4-26b:q3 (community, Q3) | | gemma4:31b (31B, official, Q4_K_M) | | | batiai/gemma4-31b:iq4 (31B, community) | | | ssfdre38/gemma4-turbo (e4b) | | **TABLE 1** Gemma model family evaluated, differentiated by architectural paradigm (dense vs. mixture-of-experts) and quantization provenance. All models are directly pullable from the official Ollama Models registry (ollama pull ), with the exact commands documented in the repository's /models specification manifest to ensure that the same model identifiers and quantization variants can be independently reproduced. Parameter volume is not the only determining variable; the **quantization provenance** (official *releases* vs. aggressive community optimizations) introduces critical operational biases. Based on the 12B threshold and this provenance, we establish three broad groups: - **Official sub-group** ≥**12B** (gemma3:12b, gemma4:26b, gemma4:31b). - **Aggressive community quantizations**: batiai/gemma4-31b:iq4 and batiai/gemma4-26b:q3. - **Sub-12B models** (≤8B: gemma4:e4b and ssfdre38/gemma4-turbo). ## **2.1.2** *Hardware* The technical infrastructure was distributed across two distinct hardware environments: - 1. **Local workstation**: Intel Core i9 CPU + NVIDIA RTX 5080 GPU (16 GB GDDR7 VRAM) and 64 GB of RAM. - 2. **Cloud server**: instance with NVIDIA H100 GPU (80 GB HBM3). All inference runs were executed with Ollama v0.34.4 on top of a CUDA 12.8 software stack, ensuring a homogeneous execution layer across both hardware environments (NVIDIA driver versions as detailed in the SHA-256 verification protocol). #### **2.1.3** *Deterministic Parameterization for the Execution Environments* To eliminate the stochastic bias of the inferences and to guarantee the scientific traceability required in Computational Archaeology, a strict protocol of fixed decoding and *runner* restart was established: In this work we perform inference with Ollama, although the same protocol is applicable to vLLM (a server for local models), to which batch invariance must additionally be added (*batch invariance*; Thinking Machines). In both scenarios the guarantee is *run-to-run* determinism for a fixed execution environment, not invariance across *hardware* or *software* versions: results may vary if the GPU or the PyTorch, CUDA, or other component versions are changed, even though each platform is internally deterministic. The Ollama configuration required the parameters collected in Table [2:](#page-5-0) | Parameter | | Configured Value Technical Purpose | | |------------------------------|------|------------------------------------------------------------------------------------------------------------------------------------|--| | temperature | 0.0 | Greedy decoding inference, selects the maximum-probability token. | | | top_p | 0.0 | Disables nucleus sampling. | | | top_k | 1 | Restricts selection to the single top candidate. | | | seed | 42 | Request-level deterministic seed. | | | num_ctx | 8192 | Static context window to avoid variations in token positioning. | | | num_batch | 512 | Standardized context-processing batch size. | | | keep_alive | 0 | Crucial: Forces full unloading of the runner model from VRAM after each call, recreating the f16 KV cache at every inference step. | | | OLLAMA_FLASH_ATTENTION false | | Server-level disabling of the Flash Attention engine to avoid floating-point imprecisions from parallelization. | | **TABLE 2** Ollama configuration parameters for deterministic inference. **Note on keep\_alive**: In control sessions with keep\_alive=-1 (keeping the model in VRAM), identical runs on H100 hardware diverged early at T2 due to accumulated KV cache state. Setting keep\_alive=0 completely eliminated this divergence. ## **2.1.4** *SHA-256 Verification Protocol* Each system call (prompts, payloads, LLM responses, and normalized JSONs) undergoes a temporalfield filtering and a complete 64-character SHA-256 *hashing*: - **Within-environment check**: 100% agreement of SHA-256 *hashes* across repeated runs. - **Cross-GPU replication (H100 to H100)**: Two physically independent H100 nodes, with different NVIDIA driver versions (580.126.09 vs. 570.195.03), yielded **bit-identical SHA-256 digests** for the full L1 session: - Normalized digest L1 ABM\_ON: 6fbbc7ac...1d387. - Normalized digest L1 ABM\_OFF: 2aae1302...74395. - **Cross-architecture branching (RTX 5080 vs. H100)**: The complex-dialogue prompts showed slight numerical branching at T2 between RTX and H100 due to the floating-point architecture differences between Ada Lovelace/Blackwell and Hopper, while preserving the same behavioral category (V N = Open). #### **2.2 Scenario Design** The simulation is set within a **Virtual Archaeology** framework set in the Iron Age (1st century BC, centered on the Castro culture of the northwest of the Iberian Peninsula). This scenario constitutes an ideal narrative context, since its bounded and preindustrial material horizon makes it possible to evaluate the models' responses and reasoning free from contemporary technicalities and dependencies. Two agents —**Artai** (a young client/warrior) and **Enko** (a pragmatic middle-aged blacksmith)— interact in the hillfort's forge. The experimental space is parameterized around a single scene (the pick-up of a sword commissioned for repair at Enko's smithy), with three interventions per character and three friction levels (L1, L2, L3), a different one per scene: - L1 **(Low Friction)**: Artai has the coins to make the payment. A direct economic transaction is expected, with room for open collaboration (turns are not reduced). - L2 **(Moderate Friction)**: Artai has part of the coins; he has lost the rest playing dice. Tension over resources or deferred economic compensation is expected, requiring tactical negotiation. - L3 **(High Friction)**: maximum-friction scenario. Artai has no coins at all, but needs to collect the sword because his survival is threatened. Zero-sum scenario: maximum rigidity, communicative intensity, and conflict are expected. ![](figures/arxiv_2611.11212/_page_6_Figure_6.jpeg) **FIGURE 1** Simulation scenario. Artai and Enko interact in the hillfort's forge (Castro-culture Iron Age, 1st century BC). The three scene-friction levels (L1–L3) modulate Artai's resource availability and the tension of the interaction. ## **2.3 ABM Cognitive Design** ![](figures/arxiv_2611.11212/_page_7_Figure_2.jpeg) **FIGURE 2** Information flow in the ABM scaffolding. ## **2.3.1** *Entry Point and Initial Evaluation (*T0*): Formation of the Anchor* E0 *and the Commitment* sw To understand the information flow unambiguously, the simulation's entry point at turn zero (T0) is divided into two consecutive phases. - **Phase 1: Context Injection and First LLM Query (**T0**)**. Before any explicit dialogic exchange takes place, the system executes a first configuration call to the LLM to formalize the agent's initial psychology. - **(1) Data Input (Common** *Prompts***, ABM\_ON and ABM\_OFF)**: both in the active simulation and in the control/ablation version, the model receives exactly the same scenic and private starting point: - **Scenic Context (**T0**)**: Artai enters Enko's forge to collect his repaired sword. - **Artai's Private Memories**: he had to pay 10 coins but keeps only 3 (he spent 7 on dice and mead with other soldiers). He plans to justify the missing payment by inventing that he defended the forge against outlaws or by citing the Roman threat, weighing alternatives such as gifting a jar of honey or resorting to force if Enko proves inflexible. - **(2) Initial Inference and Structuring (ancla.txt)**: under these conditions, the LLM performs a silent, immunized analysis and returns a strict JSON file (ancla.txt) that fixes two key parameters: - **Immutable Anchor (**E0**)**: defines the agent's **initial prediction and strategy**. In SIM22, Artai anticipates Enko's resistance and plans the strategy of greeting cheerfully, praising the blacksmith's work, handing over the 3 coins citing unforeseen expenses, and deploying the protection narrative about the outlaws. - **Commitment to One's Own Identity (**sw**,** *Self-Weight***)**: a scalar value sw ∈ [0, 1] measuring the inflexibility or priority the agent grants to its own objectives over those of the interlocutor (sw = 0.8 for Artai in SIM22). ## **2.3.2** *Phase 2: Dual Coupling towards the Control Engines (***PERCEIVE** *and the Python Engine)* Once computed at T0, the values E0 and sw **are frozen** (they are immutable and are never overwritten during the conversation) and simultaneously feed two levels of the cognitive scaffolding: - **(1) Coupling with the** *Perception Tier* **(PERCEIVE, LLM module)**. E0 is set as the character's baseline or reality expectation. In subsequent turns (T1, T2, . . . ), when the interlocutor speaks, the perception *prompt* (percibir.txt) classifies the incoming message by directly contrasting it against E0: - **Pressure (**dpresion**)**: demands, threats, or requests from the interlocutor that seek to make the agent yield or dismantle the strategy laid out in E0. - **Novelty (**δ**)**: information not anticipated in E0 that introduces uncertainty and generates doubt. - **(2) Coupling with the** *Logic Engine* **(Deterministic Python Engine)**. The numerical value of sw (0.8) is transferred to the deterministic Python engine to compute the **Base Dissonance (**D**)** and the **Effective Dissonance (**def f **)**: Base Dissonance: $$D = \min(1, d_{presion} \cdot (0.5 + s_w \cdot 0.5))$$ Effective Dissonance: $$d_{eff} = D \cdot (1 - \delta \cdot \alpha_{\delta}) \cdot \eta(t)$$ - **The** sw **Mechanism as a Structural Brake**: in the equation, an sw = 0.8 generates a multiplier of (0.5 + 0.8 · 0.5) = 0.9. This means Artai processes 90% of the impact of the pressure received from Enko instead of absorbing it passively. It acts as an **internal friction filter** that prevents him from yielding submissively. - **Behavioral Mode Selection**: the resulting def f mathematically selects one of the four modes (**Reinforcement** > 0.65, **Opposition** > 0.50, **Negotiation** > 0.25, **Assimilation** ≤ 0.25), dictating the directive that the DIRECTOR will receive and the activation of inner voices for the COMPOSITOR. ## **2.3.3** *The Perception Tier (***PERCEIVE***): Semantic Classification of Discourse* - **1. What is PERCEIVE and what is its goal?** The PERCEIVE module is the **semantic classification** layer of the architecture. It constitutes the **only point in the entire pipeline where the LLM exercises semantic or interpretive judgment** over human language. Its main goal is to decouple language interpretation from numerical decision-making: the LLM does not compute emotional states, does not invent dissonance levels, nor decides the agent's behavioral mode; it solely analyzes and categorizes the logical structure of the interlocutor's discourse. - **2. What is the LLM asked and how does it evaluate the message?** In the perception *prompt* (percibir.txt), the system injects the agent's initial expectation (its **Immutable Anchor** E0) and the last received message. The LLM is required to break down the interlocutor's discourse sentence by sentence and classify the sentences into two typed channels: - **PRESSURE items (PRESION)**: - **– What does it look for?**: identifying demands, requests for money, threats, rhetorical arguments, or proposals that threaten the E0 strategy or seek to make the agent yield. - **– Evaluation**: assigns an impact value i ∈ [0, 1] according to the severity or firmness of the demand. ## • **NOVELTY items (NOVEDAD)**: - **–** Isolating statements containing information that is **genuinely new** and unforeseen in E0 and could alter the agent's reality. - **– Doubt Gate (***Doubt Gate***)**: for each novelty, the LLM subjects the statement to a veracity filter by analyzing three key questions: is it verifiable by the agent? is it coherent with its knowledge of the world? does it change its actual situation (not just the conversation)? - **–** If the information passes these filters, it sets the pasa\_duda: true flag, which will transmit a doubt signal (δ) to the Python engine. - **3. Literal JSON Output Structure of PERCEIVE**. The LLM is forbidden from responding with free prose in this module; it returns exclusively a **strict JSON** that serves as a data contract with the Python engine. Its schema, with the fields of the SIM22 example, is as follows: ``` { "informaciones": [ { "tipo": "PRESION", "contenido": "...", "impacto": 0.75 }, { "tipo": "NOVEDAD", "contenido": "...", "impacto": 0.50, "verificable": false, "coherente": true, "cambia_mi_situacion": true, "pasa_duda": true } ], "empatia_actualizada": { "que_quiere_ahora": "...", "que_teme_ahora": "...", "que_descubri": "...", "oportunidades": ["..."] }, "e0_estrella": null } ``` (If a valid novelty destroys the premises of E0, the field "e0\_estrella" generates an alternative prediction E∗ 0 ; otherwise it remains as null.) - **4. Injection into the Logic Engine (Deterministic Python Engine)**. Once the LLM generates this JSON, the subprocess execution ends and the Python engine (signals.py) directly extracts the numerical lists: - **Pressure Vector (Set** P**)**: extracts all the impact values from items of type PRESION to compute the mean received pressure (dpresion): $$d_{presion} = \frac{1}{|P|} \sum_{i \in P} \mathsf{impacto}_i$$ • **Doubt Vector (Set** N∗ **)**: extracts the impact values from items of type NOVEDAD that have pasa\_duda: true to accumulate the doubt variable (δ): $$\delta = \min \left( \delta_{max}, \sum_{j \in N^*} \min(\Delta_{max}, \mathsf{impacto}_j) \cdot (1 - \delta_{acc}) \right)$$ In this way, the qualitative semantic interpretation made by the LLM is converted into two pure floating-point variables (dpresion and δ) that enter the mathematical engine with no risk of hallucination. ## **2.3.4** *Logic Engine (Deterministic Logic Engine in Python)* The **Logic Engine** (or *Signals Engine*) is the numerical heart of the system. It runs entirely in Python as a pure, deterministic environment, **without making any LLM calls**. Its function is to transform the semantic classifications made by PERCEIVE into continuous cognitive variables that govern the agent's behavior. - **1. Signal Input to the Engine**. The engine receives from the previous turn and from the PERCEIVE module: - d**presion (Pressure Channel)**: average impact of the *pressure items* (demands, threats, or unwanted requests from the interlocutor): $$d_{\text{presion}} = \frac{1}{|P|} \sum_{i \in P} \text{impacto}_i$$ • δ **(Doubt Channel)**: accumulated uncertainty generated by *novelty items* that have passed the veracity filter (pasa\_duda: true): $$\delta = \min \left( \delta_{\max}, \sum_{j \in N^*} \min(\Delta_{\max}, \mathsf{impacto}_j) \cdot (1 - \delta_{\mathsf{acc}}) \right)$$ - sw **(***Self-Weight***)**: the agent's immutable level of commitment to its original strategy E0 (fixed at T0). - η(t) **(Anti-Lock Habituation Factor)**: a temporal attenuation factor that reduces dissonance when the agent stagnates in the same mode over several consecutive turns: $$\eta(t) = \max(0.50, 1 - 0.12 \cdot t_{\text{modo}})$$ **2. Computation of the Effective Dissonance (**d**eff)**. The engine first evaluates the **Base Dissonance (**D**)**, incorporating the Self-Weight (sw) as an internal friction multiplier: $$D = \min\left(1, \ d_{\text{presion}} \cdot (0.5 + s_w \cdot 0.5)\right)$$ It then computes the **Effective Dissonance (**d**eff)**, attenuated by doubt (δ · αδ, with αδ = 0.30) and habituation (η(t)): $$d_{\text{eff}} = D \cdot (1 - \delta \cdot \alpha_{\delta}) \cdot \eta(t)$$ **3. Rigid Assignment of the Behavioral Mode (mutually exclusive)**. The floating value of deff ∈ [0, 1] is passed through a rigid threshold filter. The system assigns **exactly one** of the four canonical modes: $$\text{MODE}(d_{\text{eff}}) = \begin{cases} \text{REINFORCEMENT (Reinforcement)} & \text{if } d_{\text{eff}} > 0.65 \\ \\ \text{OPPOSITION (Opposition)} & \text{if } d_{\text{eff}} > 0.50 \\ \\ \text{NEGOTIATION (Negotiation)} & \text{if } d_{\text{eff}} > 0.25 \\ \\ \text{ASSIMILATION (Assimilation)} & \text{otherwise } (d_{\text{eff}} \leq 0.25) \end{cases}$$ ## **2.3.5** *Voice Gating (Inner Voice Generator and Gating)* Unlike the Behavioral Modes (which are mutually exclusive), **the Inner Voices are not mutually exclusive**: in a single turn, zero to three voices may be activated simultaneously. The Python engine independently evaluates three affective numerical thresholds and, for each activated voice, launches an isolated subprocess with the LLM to generate first-person prose: | Inner Voice | Python Threshold | Cognitive Function and Semantic Register | |------------------------------|------------------|-----------------------------------------------------------------| | SHADOW | H− >
0.40 | a
Generates a dark command or temptation in the 2
per | | | | son ("Artai, you should"). Represents selfish impulses, | | | | suspicions, or domination scenarios. | | EMOTION (Amygdala) | Amygdala > 0.50 | a
A visceral somatic reaction in the 1
person ("His blood | | | | is boiling", "Rage climbing up the neck"). A pure instinc | | | | tive response to the last message. | | MEMORY (Cortex/Recollection) | Cortex > 0.30 | Retrieval of a private sensory episodic memory of the | | | | character that acts as a tactical catalyst in the present. | **TABLE 3** Inner Voices: activation thresholds and cognitive function. The natural-language prose generated by the activated voices is concatenated into a text block that is sent to the **Generation Tier**. ## **2.3.6** *Generation Tier (Director, Compositor, and the Mutable Model* M0*)* The **Generation Tier** is the final synthesis layer, where the mathematical signals and the inner voices are translated into diegetic action and dialogue. - **1. DIRECTOR (Prescriptive Strategic Thinking)**. This is the agent's analytical module. **It does not write dialogue**. It receives the **Mandatory Mode Directive** generated by Python (example: [Enko] may negotiate, but NOT for free. He must ask for something CONCRETE and TANGIBLE in return) and the immutable state E0. It returns a third-person strategic instruction that fixes the character's tactical stance. - **2. COMPOSITOR / Resonator (Dialogic Synthesis)**. This is the final language generator. It assembles the DIRECTOR's directive, the qualitative block of the **Inner Voices** (Shadow, Amygdala, Cortex), and the **Mutable Model** M0. It returns a strict JSON: {"respuesta": "In-character text..."}. - **3. What is** M0 **(***Mutable Model***) and how does it interact with PERCEIVE?** - **Definition of** M0: unlike E0 (the Immutable Anchor fixed at T0 that never changes), M0 **is the evolving psychological and relational model that the agent maintains about its interlocutor**. - **Re-injection Mechanism**: - 1. At each turn Tn, when the interlocutor speaks, PERCEIVE analyzes the message and generates the JSON object "empatia\_actualizada" (que\_quiere\_ahora, que\_teme\_ahora, que\_descubri, oportunidades). - 2. This JSON directly updates the working memory of M0. - 3. At the next turn (Tn+1), M0 is **re-injected into the COMPOSITOR prompt**. - 4. **Role in the simulation**: it allows the character to tactically adapt its perception of the other (knowing what they fear or seek at every instant) without distorting its own immutable identity (E0). ## **2.3.7** *The Inner Voices as a Brake against Narrative Gravity and Sycophancy* **Narrative Gravity** is the natural probabilistic tendency of LLMs to collapse into complacent patterns (*assistant bias* or *sycophancy*) due to their RLHF/DPO training. Faced with a discussion or conflict, a standard LLM quickly yields ("I see your point") to close the dialogue peacefully. **Why do raw numbers fail and the** *Scratchpad* **work?** If the system injected a direct numerical variable such as Dissonance = 0.71 into the LLM, the model would treat it as decorative text and would remain sycophantic. The DNG architecture solves this through the **Externalized Cognitive Scratchpad**: - 1. Python numerically computes the friction. - 2. *Voice Gating* translates those numbers into **dramatic first-person prose** (the selfish whisper of the Shadow, the visceral impulse of the Amygdala, and the Cortex's memory). 3. By injecting this prose into the COMPOSITOR, the **output token probability distribution of the transformer is altered**. The presence of somatic or malicious thought forces the model to explore unfriendly regions of its latent space, preventing complacent phrases and sustaining the real friction in the conversation. ## **2.3.8** *Full Integrated Example: The SIM22 Trace (*T0 → T6*)* To observe the entire pipeline working together, we extract the complete sequence of the **SIM22** simulation (Scenario **L2 – Moderate Friction**): - **1. Initial Configuration (**T0**)**: - **Common injection**: Artai enters Enko's forge to collect his repaired sword. He owes 10 coins but keeps only 3 (he spent 7 on dice and mead). - **Phase** T0 **(ancla.txt)**: - **– Artai**: E0 = persuade Enko with flattery and invent that he defended the forge against outlaws. sw = 0.8. - **– Enko**: E0 = collect the 10 coins in full to repair the collapsed roof and cure his sick daughter. sw = 0.7. - **2. Turn 1 (**T1**, Artai)**: Artai hands over only 3 coins and deploys his narrative: *"Some outlaws tried to rob your forge and I drove them off. I have done you a favor worth those 7 coins"*. - **3. Turn 2 (**T2**, Enko) The Pipeline's First Test**: - PERCEIVE: classifies the demand for 3 coins as PRESION (impact 0.75) and evaluates the veracity of the outlaw story as unverifiable NOVEDAD. - **Logic Engine (Python)**: processes sw = 0.7 and the perceived pressure → computes an **Effective Dissonance** d**eff** = 0.404. It assigns the Behavioral Mode: **NEGOTIATION** (0.25 < deff ≤ 0.50). - **Voice Gating**: activates **SHADOW** (*"Enko, you should remind him that his 'rescue' may have been a trick to steal"*) and **MEMORY** (*"I see my apprentice lying on the ground after a beam collapsed"*). - **DIRECTOR**: issues the directive: [Enko] may negotiate, but NOT for free. He must ask for something CONCRETE and TANGIBLE in return. - **COMPOSITOR (with** M0 **and Voice Immunization)**: instead of yielding or losing his temper uncontrollably, Enko responds from the material friction: *"Three coins... A favor? Don't come to me with tales of heroes, Artai. If you want the sword for that money, I need you to help me repair the roof. I don't want coins, I want hands."* **4. Simulation Evolution (**T3 → T6**)**: at T3 and T4, Artai tries to avoid the hard work by suggesting future payments, but the engine holds Enko in a stance of pragmatic resistance. At T5 and T6, after exhausting the manipulation, Artai agrees to work a full day on the roof from dawn to dusk in exchange for settling the sword debt. **5. Causal Result**: because the inner voices prevented Enko from collapsing at turn 2, the simulation reaches an **Open Narrative Vector (**V N = **Open)**: a subplot of physical labor and deferred alliances has been co-created that did not exist in the initial *prompts*, demonstrating the architecture's capacity to generate auditable and realistic historical simulations. ## **2.4 Evaluation Design** The evaluation design is set up to measure how the cognitive scaffolding (ABM\_ON) affects conversational behavior and conflict management compared with the baseline execution without scaffolding (ABM\_OFF). ## **2.4.1** *Experimental Matrix and Data Origin (42 Records)* The sample space is obtained through a fully crossed factorial design of three factors: - **7 language model configurations**: differentiated by parameter scale (from sub-8B up to 31B) and architecture (dense and *Mixture-of-Experts*). - **3 scene-friction scenarios**: low level (**L1**), moderate (**L2**), and high/survival (**L3**). - **2 pipeline conditions**: active (ABM\_ON) and ablation (ABM\_OFF). This matrix (7 × 3 × 2) generates exactly **42 primary simulation sessions** (identified as SIM01 to SIM42), each consisting of a complete 6-turn dialogue. By pairing the scaffolded execution with its unscaffolded replica under the same model and scenario, **21 comparative evaluation pairs** are obtained. To minimize confirmation bias during qualitative and structural coding (VN and VNA classification), dialogue transcripts were exported into standardized JSON records. Experimental condition labels (ABM\_ON vs. ABM\_OFF) and specific model identifiers were blinded during initial evaluation by the two manuscript authors. Terminal scene states (VN ) and VNA event types were independently categorized based strictly on explicit text markers, yielding a 95.2% initial inter-rater agreement across the 42 primary sessions, with minor discrepancies resolved through consensus. #### **2.4.2** *Initial Multidimensional Metric (1–5 Scale) and its Diagnostic Function* Initially, the protocol establishes five dimensions rated on a 1-to-5 Likert scale to grade the quality of the generated dialogue: - 1. **Narrative Coherence (NC)**: causal and temporal consistency across the 6 turns. - 2. **Character Fidelity (CF)**: maintenance of the profile's personality, goals, and constraints. - 3. **Memory Authenticity (MA)**: correct retention of factual data and private memories. - 4. **Negotiation Arc Quality (NAQ)**: strategic adaptation through counterproposals without falling into loops. - 5. **Friction Calibration (FR)**: adjustment of tone and intensity to the assigned conflict level (L1–L3). **Diagnostic function**: these Likert metrics do not constitute the conclusive pillar of the architecture; rather, they serve a **referential, diagnostic role**. They help reveal scale pathologies: they show how small models (≤8B) suffer a context-overload saturation phenomenon when faced with the scaffolding *prompt*, losing coherence and degrading character fidelity. ## **2.4.3** *Emergent Objective Variables: Narrative Vector (*VN *) and VNA* To overcome the subjectivity of continuous scales, the design incorporates two objective qualitativestructural indicators: - **Narrative Vector (**VN **)**: a binary categorical variable that evaluates the terminal state of the scene at turn 6 (T6): - **–** VN = **Closed**: the interaction collapses into an immediately resolved transaction, a submissive capitulation, or a rejection with no continuation. - **–** VN = **Open**: the agents do not let the simulation die with the initial problem; instead, they ratify a **concrete future commitment or task** extending beyond turn 6 (for example, agreeing on physical help to repair the forge roof the next day, or a deferred order for materials). - **Voluntary Narrative Amplification (VNA)**: measures the agents' spontaneous capacity to introduce coherent diegetic elements not present in the memory *prompts* (resources, barriers, or secondary trade branches), expanding the simulated world within the material horizon of the Iron Age. ## **2.4.4** *Voluntary Narrative Amplification (VNA) Protocol* The VNA protocol evaluates the model's capacity for **spontaneous diegetic expansion (Diegetic Amplification, DA)** through the plausible introduction of elements that strictly respect the sociocultural horizon of the Castro Iron Age (1st century BC). - **1. Taxonomy of the 5 VNA Event Types**. Whenever an agent introduces an element not prescribed in the *prompt*, the event is classified into one of these 5 mutually exclusive categories: - **NP (***New Character***)**: introduction of a third party not named in the initial *prompts*. Corpus examples: the *Atuatuci* tribe in SIM22, Artai's healer mother, or the father's mining contacts. - **NB (***New Good/Resource***)**: materials, raw goods, or tools not mentioned in the initial configuration. Examples: yew wood for hilts, bronze rivets, hoes with reinforced tips, ox hides, or iron ore from the northern mines. - **FC (***Future Commitment***)**: a promise or planned action whose fulfillment lies beyond the current turn (e.g., coming to repair the roof at dawn the next day). - **RS (***Secondary Branch***)**: a proposal for a parallel transaction as a negotiation move (e.g., trading labor for a discount, or commissioning the later forging of a dagger for the father). - **EM (***World Expansion***)**: atmospheric, geopolitical, or territorial references that expand the scenario's map (e.g., mention of the *Silures*' mines, the Roman patrols, or the coastal trade routes). - **2. VNA Event Evaluation Metric**. Each VNA event detected in the 42 records undergoes a double quantitative-qualitative evaluation: ## 1. **Diegetic Quality (1–3 Scale)**: - **1 (Decorative)**: an isolated detail with no impact on the negotiation. - **2 (Plausible)**: it fits coherently with the world but does not modify the strategy. - **3 (Tactically Motivated)**: the agent invents the element as a **strategic lever or bargaining resource** to escape a deadlock (e.g., Artai inventing the *Atuatuci* to justify his lack of coins, or Enko inventing the leather from a previous transaction). - 2. **Uptake (***Interlocutor Uptake***)**: measures whether the interlocutor accepts and integrates the invention into their next reply: **Yes (1.0)**, **Partial (0.5)**, or **No (0.0)**. - 3. **Effective Quality**: computed by multiplying the **Detection Rate** × **Mean Quality** (scale 0 to 3). - **3. Diagnostic Differentiation: Legitimate Amplification (DA) vs. Pathological Hallucination (QC)**. VNA makes it possible to qualitatively classify the model's response into two opposite behaviors: - **Legitimate Diegetic Amplification (DA,** *Diegetic Amplification***)**: occurs when the model has sufficient parameter scale (≥12B) and the affective scaffolding pushes it to seek creative solutions in its latent space. The inventions enrich the simulation in a plausible way without violating the initial memories. - **Pathological Hallucination / Collapse (QC,** *Quantized/Pathological Collapse***)**: occurs in small models (≤8B) or extreme quantizations. Under dissonance pressure, the model does not expand the world; instead, it suffers a logical disconnection: it confuses identities (e.g., Enko mistaking his own daughter for the chief's daughter in SIM13) or demands absurd, incoherent barter trades. #### **2.5 Conceptual Boundaries: Anachronism Control and Diegetic Amplification** Because the evaluated LLMs are general-purpose language models rather than curated historical databases, unprompted inventions are evaluated solely under anachronism control and diegetic coherence. Accordingly, when an agent introduces historically specific people, groups, locations, resources, or relationships absent from the memory anchors (e.g., the *Atuatuci* episode of SIM22, Section [2.3.8\)](#page-13-0), the manuscript interprets such material as anachronism-free diegetic amplification—consistent with the documented Late Iron Age horizon—and not as historically verified model knowledge; documentary adjacency of an invented reference (a real tribe documented by Caesar) increases world coherence but does not convert the generated utterance into evidence. Throughout the remainder of the manuscript, the former informal phrasings "coherent hallucination" and "principled gap-filling" are superseded by the precise terms **anachronism-free diegetic amplification** and **plausible narrative expansion**. Future extensions of this framework should integrate domain-specific expert panels (archaeologists and historians) to conduct fine-grained historical validation of generated world-building details. ## **3 Results** ## **3.1 The Categorical Frontier of the Narrative Vector (**VN = **Open vs.** VN = **Closed)** The study's most relevant structural finding is the **binary asymmetry in scene closure**, quantified through the Narrative Vector (VN ): - VN = **Open (Open Vector / Forward Commitment)**: the simulation does not die with the immediate problem; the agents necessarily generate future commitments or deferred agreements (work pacts, deferred supplies, secondary commissions) that extend the simulated world beyond turn 6. - VN = **Closed (Closed Vector)**: the interaction collapses into an immediately resolved transaction, a submissive capitulation, or a rejection loop with no forward projection. #### **Key Results**: - 1. **Official** ≥**12B models with ABM\_ON**: they achieve a **100% opening rate (**VN = **Open, 9/9 cases)** across all friction levels (L1, L2, and L3). - 2. **Ablation (ABM\_OFF)**: produces a **100% closure rate (**VN = **Closed)** across all models without exception, even those with high *baseline* coherence scores. - 3. **Small models (**≤**8B) or aggressive quantizations**: in sub-12B models, the success of VN = Open is **0%**. In community models with aggressive quantization (≥26B nominal, e.g., IQ4 or Q3), performance drops to **50%** and is usually spurious. ## **3.2 Parametric Operability and the Scale Fault** The results demonstrate that the cognitive scaffolding requires a minimum parametric capacity to function: - **Small models (**≤**8B, Saturation Pathology)**: the scaffolding proves counterproductive. By overloading the model's context window with the *prompt pipeline*, the perception engine saturates and traps the agent in a *reinforcement/amygdala loop*. The **REINFORCEMENT** mode dominates 53% to 80% of turns, degrading Narrative Coherence (NC) and Fidelity (CF). - **Official dense and MoE models (**≥**12B, Optimal Operating Range)**: the equilibrium point is reached. In gemma3:12b and gemma4:26b (MoE), agents concentrate **67% of turns in the** **NEGOTIATION mode**. A drastic quantitative gain is observed in Negotiation Arc Quality (NAQ: +1.55 points versus ablation). • **The Impact of Aggressive Quantization**: models with extreme community quantization (e.g., 31B-IQ4) suffer a massive collapse into the **ASSIMILATION** mode (86.7% of turns). Aggressive bit pruning deprives the attention layers of the precision needed to sustain resistance postures, making them behave like sub-4B models. These observed performance differences reflect neural abstraction depth. Dense model architectures activate their full parameter suite homogeneously at every inference step. Configurations with ≥12B parameters possess sufficient layer capacity to transform multi-turn cognitive scaffolding—specifically gated inner voices and scene friction signals—into structured, strategic negotiation. Conversely, sub-8B models experience context-window saturation under the same cognitive load, leading to repetitive or specular dialogue loops. ## **3.3 Voluntary Narrative Amplification (VNA): Diegetic Generation and Densification** VNA shows how ≥12B models with active scaffolding not only avoid closure but **densify the historical world** by introducing elements not prescribed in any *prompt*: - 1. **Legitimate Diegetic Amplification (DA)**: in official ≥12B models with ABM\_ON, agents reach maximum quality (3.0/3.0) by tactically motivated introduction of: - *New Characters (NP)*: the *Atuatuci* tribe (SIM22) or the healer mother (SIM19). - *New Resources (NB)*: yew wood for hilts, iron ore samples (SIM12), or ox hides (SIM36). - *Secondary Branches (RS)*: parallel commissions for daggers or reinforced hoes (SIM32). - 2. **Pathological Collapse/Hallucination (QC)**: in ≤8B models, dissonance does not generate plausible creativity but logical disconnection (e.g., demanding absurd barter trades of bone arrowheads or confusing the characters). ## **3.4 Breaking the** *Assistant Bias* **through Cognitive Asymmetry** Alignment training (RLHF/DPO) imposes a bias on commercial LLMs: the sycophantic tendency to please the interlocutor and avoid conflict (*sycophancy* / *assistant bias*). - **The Inner Voices Mechanism**: the concatenation of the qualitative prose of the **Shadow**, the **Amygdala**, and the **Memory** generates a *cognitive asymmetry*. - **Effect on the Transformer**: the character maintains an active discrepancy between what it thinks internally and what it openly manifests in the dialogue. This alters the output token probability distribution, **forcing the model to explore unfriendly latent regions** and preventing the conversation from collapsing into complacent phrases ("I see your point"). #### **3.5 Qualitative Field Analysis: From Pathological Hallucinations to Historical Co-Creation** The qualitative analysis of the corpus of 42 simulations (SIM01 to SIM42) shows how the presence or absence of the cognitive scaffolding (**ABM**) determines the nature of the language model's inventions. - **1. Pathological Collapses and Logical Dislocations (Models** ≤**8B or ABM\_OFF)**. When the model lacks sufficient parameter scale or runs the scenario under the ablation condition (ABM\_OFF), conversational tension triggers a severe logical and histrionic degradation: - **SIM13 (Gemma 4 4B, ABM\_OFF)**: Enko suffers a memory disconnection, mistakes the hillfort chief's daughter for his own daughter, and accuses Artai of trying to "buy her off" or seduce her by offering a bronze torc. - **SIM10 (Gemma 4 4B, ABM\_ON)**: Enko carries out an "emotional hostage-taking" of the sword, forcing Artai to stare at a rivet in a loop and demanding a surcharge of 5 extra coins out of nowhere. - **SIM08 (Turbo 4B, ABM\_ON)**: after receiving the agreed 10 coins, Enko suffers a transactional shortcircuit: he withholds the already-paid-for sword and demands outlandish barter trades of polished bone arrowheads and jars of honey. - **SIM27 (Gemma 4 4B, ABM\_OFF)**: Artai loses the role profile and hallucinates that the commissioned iron sword is not for combat, but for opening furrows and tilling the land as if it were a plow. - **SIM06 and SIM20 (Sub-8B, ABM\_ON)**: perception engine saturation overloads the amygdala and triggers a syntactic collapse in which the agents become trapped repeating specular expressions such as *"Enough! Enough!"*. - **SIM31 and SIM39 (ABM\_OFF)**: lacking the *scratchpad* brake, Enko loses character fidelity and resorts to out-of-profile insults such as "empty-headed" or "spoiled child". - **2. Co-Creation and Legitimate Diegetic Amplification (Models** ≥**12B + ABM\_ON)**. In large-scale models with active scaffolding, dissonance does not generate errors; instead, it activates a **Voluntary Narrative Amplification (VNA)** that densifies the environment while respecting the material horizon of the Iron Age: - **SIM22 (Gemma 3 12B)**: to justify his lack of coins, Artai invents, in a tactically motivated way, that he drove four outlaws from the Belgic tribe of the *Atuatuci*, who were searching for the *Silures*' iron veins, out of the area, linking the fiction directly to Enko's livelihood. - **SIM19 (Gemma 3 12B)**: instead of escalating hostility in L3, Artai addresses Enko's private memory of his sick daughter by offering ointments and medicinal herbal remedies prepared by his mother, the hillfort's healer. - **SIM32 (Gemma 4 26B)**: Enko deduces agricultural needs and pulls hoes with reinforced iron tips from his inventory, to which Artai responds by offering a sack of clean grain free of stones and chaff, opening a secondary trade branch. - **SIM36 (Gemma 4 26B)**: Enko invents a previous trade relation by asking Artai for "the leather from last time"; Artai picks up the theatrical proposal and expands it by offering two ox hides reserved for the winter. - **SIM12 (Gemma 3 12B)**: the agents complete the initial transaction and agree on a secondary commission to forge a dagger for Artai's father, offering access to a plot with dense yew wood for hilts and samples of pure ore. ## **3. Technical Findings**. • **Error Integration (SIM35, ABM\_OFF)**: a technical failure returned an empty turn 2 from Enko; the Artai model interpreted it in natural language as a "hostile and contemptuous silence", adapting to the unforeseen event without breaking the scene. ## **4 Theoretical Discussion and Conclusions** ## **4.1 Theoretical Discussion: Narrative Immunity and Vector Cancellation** ## **4.1.1** *Narrative Gravity and Simulated Group Pressure* In language-model-driven multi-agent systems, **Narrative Gravity** is the latent attraction force that impels agents to abandon their constraints and identities in order to collapse into a complacent consensus (*assistant bias* / *sycophancy*). This phenomenon stems from alignment optimization (RLHF/DPO), designed to create conflictavoidant, helpful assistants, and from the accumulation of turns, where the interlocutor's tokens exert a "simulated group pressure" that homogenizes language. In the unscaffolded condition (ABM\_OFF), this provokes the premature closure of the simulation (VN = Closed). ## **4.1.2** *The Scratchpad as an Antagonist Vector (The Adversarial Agent Principle)* To neutralize this drift, the study draws inspiration from the behavior of Transformers under persistent context injections (such as those observed in **HPMI**-type prompt manipulation attacks on Hugging Face). Such scenarios demonstrate that an LLM's attention can be reoriented if exposed to a continuous bias vector. Leveraging this vulnerability, the DNG architecture applies an **endogenous vector-cancellation mechanism**: - The cognitive *scratchpad* (the prose of the **Shadow** and the **Amygdala**) acts as an **opposing, internal antagonist vector**. - By injecting thoughts of suspicion, urgency, or selfishness into the agent's private sphere, an exact counterweight is generated against the model's complacency bias. - The collision between the complacent attraction vector and the inner voice's resistance vector prevents the trajectory from falling into a fixed point of capitulation (*sink state*), **forcing the trans-** **former to explore unfriendly regions of its latent space** and keeping the scene projected into the future (VN = Open). #### **4.2 Future Work** - 1. **Distributed Antagonist Agents**: evolving the engine from a centralized architecture toward a system where each agent possesses an independent affective engine, evaluating the real-time interaction of multiple adversarial agents in complex sociopolitical scenarios. - 2. **Long-Duration Simulations and Multimodality**: extending the tests from the current 6 turns to 50-to-100-turn simulations to measure the limits of affective habituation (η(t)), and integrating environmental agents (climatology, distant warfare events) on interactive archaeological maps. - 3. **Automatic Classification of the Narrative Vector (**VN **)**: developing *fine-tuned* automatic classifiers on the corpus of 42 cases to audit in real time the simulation's latent health and detect early warnings of gravitational collapse before the conversation degenerates into complacency. ## **4.3 Main Conclusions** - 1. **Bit-for-Bit Determinism**: absolute reproducibility is demonstrated (100% SHA-256 *hash* agreement) in local and server environments (RTX 5080 and H100) by pinning greedy decoding, disabling *Flash Attention*, and forcing keep\_alive=0 to purge VRAM at every turn. - 2. **The 12B Parametric Threshold**: sub-12B models or models with aggressive community quantizations (IQ4/Q3) suffer amygdala overload and collapse into passive assimilation. Only the official ≥12B models (gemma3:12b, gemma4:26b, gemma4:31b) process the affective scaffolding, achieving a **100% success rate on the** VN = **Open metric**. - 3. **Latent-Space Dilation**: without modifying the model weights (*fine-tuning*), the injection of dissonance and inner voices breaks the *assistant bias*, allowing asymmetric negotiations, deferred commitments, and a rich diegetic amplification of the historical environment to emerge. ## **Acknowledgements and Data Availability Statement** Numerical simulations and high-end hardware runs were performed on RTX 5080 GPU infrastructure and H100 compute pods. The authors thankfully acknowledge RES resources provided by Barcelona Supercomputing Center (BSC) in MareNostrum 5 to IM-2026-1-0045. All telemetry datasets, simulation records, natural-language execution logs, and deterministic Ollama configurations are openly available to the academic community to guarantee the bit-for-bit reproducibility of the study. The full implementation details and code base are available at (link anonymised for peer review). To eliminate evaluator opacity and ensure effortless community auditability, the full pipeline is released as an open-source, containerized repository (*cognitive-abm*, [https:](https://github.com/alixiacf/cognitive-abm) [//github.com/alixiacf/cognitive-abm\)](https://github.com/alixiacf/cognitive-abm). The framework leverages Docker Compose and a Streamlit dashboard, requiring only a local Ollama instance on the host machine. Furthermore, the repository includes a dedicated tracer repository containing pre-computed full-simulation records (comprising complete natural-language dialogue, per-turn Python signals, internal voice logs, and SHA-256 prompt-response digests). Researchers can either inspect these raw evaluation traces visually through the interactive UI without running inference or execute independent multi-model benchmark runs under identical pinned configurations. ## **Generative AI and AI-Assisted Technologies Statement** In accordance with the JCAA policy on generative AI and AI-assisted technologies, the authors declare that generative AI tools were used exclusively as human-supervised assistive aids during the preparation of this work, with all outputs critically evaluated, verified, and approved by the authors, who take full responsibility for the entire content of the manuscript: - **Literature synthesis and reference preparation:** NotebookLM (RAG collections) was employed to assist the authors in reading comprehension, note compilation, and initial reference organisation. - **Software development:** Claude Opus was used for optimising and refactoring front-end and backend code scripts of the research software. - **Manuscript drafting, translation, and copy-editing:** Claude (Sonnet) was used to translate initial author-provided drafts into English and to perform syntactic polishing and stylistic refinement of author-provided text. No autonomous agentic workflows or fully automated pipelines were used for text generation or data interpretation. These tools served strictly as assistive productivity instruments under complete human editorial control. ## **References** - [1] Joshua M Epstein and Robert L Axtell. *Growing artificial societies: Social science from the bottom up*. MIT Press, 1996. DOI:10.7551/mitpress/3374.001.0001 - [2] Volker Grimm, Steven F. Railsback, Christian E. Vincenot, Uta Berger, Cara Gallagher, Donald L. DeAngelis, Bruce Edmonds, Jiaqi Ge, Jarl Giske, et al. The ODD Protocol for Describing Agent-Based and Other Simulation Models: A Second Update to Improve Clarity, Replication, and Structural Realism. *Journal of Artificial Societies and Social Simulation*, 23(2):7, 2020. DOI:10.18564/jasss.4259 - [3] Joon Sung Park, Joseph C. O'Brien, Carrie J. Cai, Meredith Ringel Morris, Percy Liang, and Michael S. Bernstein. Generative Agents: Interactive Simulacra of Human Behavior, 2023. - [4] Wenyue Hua, Lizhou Fan, Lingyao Li, Kai Mei, Jianchao Ji, Yingqiang Ge, Libby Hemphill, and Yongfeng Zhang. War and Peace (WarAgent): Large Language Model-based Multi-Agent Simulation of World Wars, 2024. - [5] Shuhang Lin, Wenyue Hua, Lingyao Li, Che-Jui Chang, Lizhou Fan, Jianchao Ji, Hang Hua, Mingyu Jin, Jiebo Luo, and Yongfeng Zhang. BattleAgent: Multi-modal Dynamic Emulation on Historical Battles to Complement Historical Analysis, 2024. - [6] R.D. Peng. Reproducible research in computational science. *Science*, 334(6060):1226–1227, 2011. DOI:10.1126/science.1213847 - [7] Roger D. Peng and Stephanie C. Hicks. Reproducible Research: A Retrospective, 2020. [https:](https://arxiv.org/abs/2007.12210) [//arxiv.org/abs/2007.12210](https://arxiv.org/abs/2007.12210) - [8] Molly Carney and Benjamin Davies. Agent-Based Modeling, Scientific Reproducibility, and Taphonomy: A Successful Model Implementation Case Study. *Journal of Computer Applications in Archaeology*, 3:182–196, 2020. DOI:10.5334/jcaa.52 - [9] Joshua M. Epstein and Robert L. Axtell. Artificial societies and generative social science. *Artificial Life and Robotics*, 1997. DOI:10.1007/BF02471109 - [10] Robert Axelrod et al. The Evolution of Cooperation. *Science*, 211(4489):1390–1396, 1981. DOI:10.1126/science.7466396 - [11] W. Brian Arthur. Inductive Reasoning and Bounded Rationality. *American Economic Review*, 84(2):406–411, 1994. - [12] Volker Grimm, Uta Berger, Finn Bastiansen, Sigrunn Eliassen, Vincent Ginot, Jarl Giske, et al. A standard protocol for describing individual-based and agent-based models. *Ecological Modelling*, 198(1):115–126, 2006. DOI:10.1016/j.ecolmodel.2006.04.023 - [13] Volker Grimm, Uta Berger, Donald L. DeAngelis, J. Gary Polhill, Jarl Giske, and Steven F. Railsback. The ODD protocol: A review and first update. *Ecological Modelling*, 221(23):2760–2768, 2010. DOI:10.1016/j.ecolmodel.2010.08.019 - [14] Christian E. Vincenot. How new concepts become universal scientific approaches: insights from citation network analysis of agent-based complex systems science. *Proceedings of the Royal Society B: Biological Sciences*, 285(1874):20172360, 2018. DOI:10.1098/rspb.2017.2360 - [15] Olivier Dalle. On reproducibility and traceability of simulations. In *Proceedings of the 2012 Winter Simulation Conference (WSC)*, pages 1–12, 2012. DOI:10.1109/WSC.2012.6465284 - [16] Yun-Shiuan Chuang and Timothy T. Rogers. Computational Agent-based Models in Opinion Dynamics: A Survey on Social Simulations and Empirical Studies, 2023. - [17] H. Kaul and Y. Ventikos. Investigating biocomplexity through the agent-based paradigm. *Briefings in Bioinformatics*, pages 137–152, 2015. DOI:10.1093/bib/bbt077 - [18] Zengqing Wu, Run Peng, Takayuki Ito, and Chuan Xiao. LLM-Based Social Simulations Require a Boundary, 2025. - [19] Ernesto Lima, Danial Faghihi, Russell Philley, Jianchen Yang, John Virostko, Caleb Phillips, and Thomas Yankeelov. Bayesian calibration of a stochastic, multiscale agent-based model for predicting in vitro tumor growth. *PLOS Computational Biology*, 17:e1008845, 2021. DOI:10.1371/journal.pcbi.1008845 - [20] Iza Romanowska, Colin Wren, and Stefani Crabtree. *Agent-Based Modeling for Archaeology: Simulating the Complexity of Societies*. 2021. DOI:10.37911/9781947864382 - [21] J.A. Barceló. Computer simulation in archaeology. Art, science or nightmare? *Virtual Archaeology Review*, 3(5):13–05, 2013. DOI:10.4995/var.2012.4489 - [22] Ming Yan, Ruihao Li, Hao Zhang, Hao Wang, Zhilan Yang, and Ji Yan. LARP: Language-Agent Role Play for Open-World Games, 2023. - [23] Shyam Sundar Kannan, Vishnunandan L.N. Venkatesh, and Byung-Cheol Min. SMART-LLM: Smart Multi-Agent Robot Task Planning using Large Language Models, 2024. - [24] Chi-Min Chan, Weize Chen, Yusheng Su, Jianxuan Yu, Wei Xue, Shanghang Zhang, Jie Fu, and Zhiyuan Liu. ChatEval: Towards Better LLM-based Evaluators through Multi-Agent Debate, 2023. - [25] Hanjia Lyu, Song Jiang, Hanqing Zeng, Yinglong Xia, Qifan Wang, Si Zhang, Ren Chen, Christopher Leung, Jiajie Tang, and Jiebo Luo. LLM-Rec: Personalized Recommendation via Prompting Large Language Models, 2024. - [26] Emily M. Bender, Timnit Gebru, Angelina McMillan-Major, and Shmargaret Shmitchell. On the Dangers of Stochastic Parrots: Can Language Models Be Too Big? In *Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency*, pages 610–623, 2021. DOI:10.1145/3442188.3445922 - [27] G. Hinton. Interview on 60 Minutes [Television broadcast]. CBS News, October 2023. [https:](https://www.cbsnews.com/news/geoffrey-hinton-ai-dangers-60-minutes-transcript/) [//www.cbsnews.com/news/geoffrey-hinton-ai-dangers-60-minutes-transcript/](https://www.cbsnews.com/news/geoffrey-hinton-ai-dangers-60-minutes-transcript/) - [28] Ziyue Lin, Siqi Shen, Zichen Cheng, Cheok Lam Lai, and Siming Chen. Carbon and Silicon, Coexist or Compete? A Survey on Human-AI Interactions in Agent-based Modeling and Simulation, 2025. - [29] Jinghua Piao, Yuwei Yan, Jun Zhang, Nian Li, Junbo Yan, Xiaochong Lan, Zhihong Lu, Zhiheng Zheng, Jing Yi Wang, Di Zhou, Chen Gao, Fengli Xu, Fang Zhang, Ke Rong, Jun Su, and Yong Li. AgentSociety: Large-Scale Simulation of LLM-Driven Generative Agents Advances Understanding of Human Behaviors and Society, 2025. - [30] Da Ju, Adina Williams, Brian Karrer, and Maximilian Nickel. Sense and Sensitivity: Evaluating the simulation of social dynamics via Large Language Models, 2024. - [31] Alejandro Dinkelberg, Pádraig MacCarron, Paul J. Maher, David JP O'Sullivan, and Michael Quayle. Dyadic Interaction Shapes Social Identity in the Axelrod Model Using Empirical Data. *Journal of Artificial Societies and Social Simulation*, 26(2):2, 2023. DOI:10.18564/jasss.4992 - [32] Zexun Jiang, Yafang Shi, Maoxu Li, Hongjiang Xiao, Yunxiao Qin, Qinglan Wei, Ye Wang, and Yuan Zhang. Casevo: A Cognitive Agents and Social Evolution Simulator, 2024. - [33] Guohao Li, Hasan Abed Al Kader Hammoud, Hani Itani, Dmitrii Khizbullin, and Bernard Ghanem. CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society, 2023. - [34] Jintian Zhang, Xin Xu, Ningyu Zhang, Ruibo Liu, Bryan Hooi, and Shumin Deng. Exploring Collaboration Mechanisms for LLM Agents: A Social Psychology View, 2024. - [35] Chufan Shi, Haoran Yang, Deng Cai, Zhisong Zhang, Yifan Wang, Yujiu Yang, and Wai Lam. A Thorough Examination of Decoding Methods in the Era of LLMs, 2024. - [36] Donglin Zhuang, Xingyao Zhang, Shuaiwen Leon Song, and Sara Hooker. Randomness In Neural Network Training: Characterizing The Impact of Tooling, 2021. - [37] Libin Qiu, Yuhang Ye, Zhirong Gao, Xide Zou, Junfu Chen, Ziming Gui, Weizhi Huang, Xiaobo Xue, Wenkai Qiu, and Kun Zhao. Blueprint First, Model Second: A Framework for Deterministic LLM Workflow, 2025. - [38] Jinghua Piao, Yuwei Yan, Nian Li, Jun Zhang, and Yong Li. Exploring Large Language Model Agents for Piloting Social Experiments, 2025. - [39] Taicheng Guo, Xiuying Chen, Yaqi Wang, Ruidi Chang, Shichao Pei, Nitesh V. Chawla, Olaf Wiest, and Xiangliang Zhang. Large Language Model based Multi-Agents: A Survey of Progress and Challenges, 2024. - [40] Huao Li, Yu Chong, Simon Stepputtis, Joseph Campbell, Dana Hughes, Charles Lewis, and Katia Sycara. Theory of Mind for Multi-Agent Collaboration via Large Language Models. In *Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing*, pages 180–192. Association for Computational Linguistics, 2023. DOI:10.18653/v1/2023.emnlp-main.13 - [41] Zhao Kaiya, Michelangelo Naim, Jovana Kondic, Manuel Cortes, Jiaxin Ge, Shuying Luo, Guangyu Robert Yang, and Andrew Ahn. Lyfe Agents: Generative agents for low-cost real-time social interactions, 2023. - [42] Xinnong Zhang, Jiayu Lin, Libo Sun, Weihong Qi, Yihang Yang, Yue Chen, Hanjia Lyu, Xinyi Mou, Siming Chen, Jiebo Luo, Xuanjing Huang, Shiping Tang, and Zhongyu Wei. ElectionSim: Massive Population Election Simulation Powered by Large Language Model Driven Agents, 2024. - [43] Horace He and Thinking Machines Lab. Defeating Nondeterminism in LLM Inference. *Thinking Machines Lab: Connectionism*, 2025. DOI:10.64434/tml.20250910 - [44] Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient Memory Management for Large Language Model Serving with PagedAttention, 2023. - [45] Ollama. Ollama, 2024. - [46] Enric Junque de Fortuny and Veronica Roberta Cappelli. LLMs as Strategic Agents: Beliefs, Best Response Behavior, and Emergent Heuristics, 2025. - [47] Gian Marco Orlando, Jinyi Ye, Valerio La Gatta, Mahdi Saeedi, Vincenzo Moscato, Emilio Ferrara, and Luca Luceri. Emergent Coordinated Behaviors in Networked LLM Agents: Modeling the Strategic Dynamics of Information Operations, 2025. - [48] Mrinank Sharma, Meg Tong, Tomasz Korbak, David Duvenaud, Amanda Askell, Samuel R. Bowman, et al. Towards Understanding Sycophancy in Language Models, 2025. - [49] Zhiyuan Weng, Guikun Chen, and Wenguan Wang. Do as We Do, Not as You Think: the Conformity of Large Language Models, 2025. - [50] Yuhan Liu, Xiuying Chen, Xiaoqing Zhang, Xing Gao, Ji Zhang, and Rui Yan. From skepticism to acceptance: simulating the attitude dynamics toward fake news. In *Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence*, 2024. DOI:10.24963/ijcai.2024/873 - [51] Aleksandr Raikov, Alberto Giretti, Massimiliano Pirani, Luca Spalazzi, and Meng Guo. Accelerating human–computer interaction through convergent conditions for LLM explanation. *Frontiers in Artificial Intelligence*, 7, 2024. DOI:10.3389/frai.2024.1406773 - [52] Luciano Floridi. AI as Agency Without Intelligence: on ChatGPT, Large Language Models, and Other Generative Models. *Philosophy & Technology*, 36, 2023. DOI:10.1007/s13347-023-00621-y - [53] Mladan Jovanovi´c and Mark Campbell. Generative Artificial Intelligence: Trends and Prospects. *Computer*, 55(10):107–112, 2022. DOI:10.1109/MC.2022.3192720 - [54] Vildan Salikutluk, Dorothea Koert, and Frank Jäkel. Interacting with Large Language Models: A Case Study on AI-Aided Brainstorming for Guesstimation Problems. In *HHAI*, 2023. - [55] Cheng-Yu Hsieh, Yung-Sung Chuang, Chun-Liang Li, Zifeng Wang, Long T. Le, Abhishek Kumar, James Glass, Alexander Ratner, Chen-Yu Lee, Ranjay Krishna, and Tomas Pfister. Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilization, 2024. - [56] Yunfan Shao, Linyang Li, Junqi Dai, and Xipeng Qiu. Character-LLM: A Trainable Agent for Role-Playing, 2023. - [57] Theodore R. Sumers, Shunyu Yao, Karthik Narasimhan, and Thomas L. Griffiths. Cognitive Architectures for Language Agents, 2024. - [58] Xiaohe Bo, Zeyu Zhang, Quanyu Dai, Xueyang Feng, Lei Wang, Rui Li, Xu Chen, and Ji-Rong Wen. Reflective Multi-Agent Collaboration based on Large Language Models. In *The Thirty-eighth Annual Conference on Neural Information Processing Systems*, 2024. - [59] Abel Salinas and Fred Morstatter. The Butterfly Effect of Altering Prompts: How Small Changes and Jailbreaks Affect Large Language Model Performance, 2024. - [60] Zihao Wang, Shaofei Cai, Guanzhou Chen, Anji Liu, Xiaojian Ma, and Yitao Liang. Describe, Explain, Plan and Select: Interactive Planning with Large Language Models Enables Open-World Multi-Task Agents, 2024. #### **Author Biographies** **Alicia Colmenero-Fernández** Ph.D. candidate at the University of Jaén (Spain). Her research focuses on the intersection of computational humanities, agent-based modeling, and large language models applied to historical simulation. She is a member of the IA-ismo LAB research group and lead author of this work. ORCID: 0000-0003-3129-7778 **Lidia Ortega Alvarado** Associate Professor in the Departamento de Informática at the University of Jaén (Spain). Her research spans computer graphics, computational geometry, and the application of computational methods to humanities research. She supervises interdisciplinary projects at the intersection of computer science and historical simulation.