Causal Depth Priority
Realism is not a standalone criterion. The question is: does the change increase the number of durable causal structures (memory, trust, debt, attachment, reputation, belief, norm)?
Executable Epistemic Contracts in Deterministic Agent Simulation
WORLD TRUTH ≠ NPC MEMORY ≠ NPC BELIEF
ENIGMA is a research project exploring whether a deterministic game simulation can generate meaningful emergent behavior when agents act based on their own incomplete and potentially erroneous models of the world — rather than on objective truth.
It is not a game. It is a scientific software artifact: a causal simulation engine where every layer — perception, memory, belief, decision, narration — is causally traced and never conflated with the layer above or below.
"The simulation is deep, but mute to the player: the world cannot initiate contact, and the time the player missed leaves no reachable traces. The loop is broken in both directions." — Loop Closure design rationale
Layers are built in strict order. Each upper layer must use the causal work of the layer below — never imitate it. Dialogue ≠ Memory, Memory ≠ Causality, Belief ≠ Decision.
18 laws (§ENIGMA-001..018) are not guidelines — they are executable contracts. Violations raise ArchitecturalViolationError at runtime.
Realism is not a standalone criterion. The question is: does the change increase the number of durable causal structures (memory, trust, debt, attachment, reputation, belief, norm)?
A new fundamental primitive cannot be introduced until runtime bugs in at least two independent domains prove the same ontological problem. Hypothesis-driven generalization is forbidden.
Absence of data is interpreted as absence of a valid projection in the agent's memory graph — not as a neutral or zero value of the objective world. UNKNOWN ≠ NEUTRAL(0.0).
The engine produces only raw signals. Meaning arises at the interaction between personality structure (drives + trauma markers) and the raw signal. Fear does not always mean flight — a control-heavy personality redirects it to preemptive aggression.
There is one time — game_time_seconds. All other "times" are either deterministic projections or durations. Parallel time manifolds are forbidden; this is what makes replay possible.
datetime.now(), time.time(), time.monotonic() are forbidden in the simulation layer. Real time is allowed only in logging, persistence metadata, and UI.
Beliefs are lenses (weight modifiers), not genes (scalars). A CrystallizedBelief cannot mutate drives_runtime directly or indirectly. Personality drift via interpretation is forbidden.
The causal axis (Reality) and the epistemic axis (Observer Knowledge) are orthogonal. Consumers (UI, DM, replay) receive only epistemic representations — never Reality directly. Five invariants hold, including "truth never increases" and "no causal return".
Every gameplay-relevant change must be traceable through this chain. If any link is missing or imitated, the upper layers are considered unproven.
The vertical test: human description → NPC compilation → NPC lives → perceives → remembers → forms beliefs → wants → decides → acts → changes the world → remembers consequences → changes relationships/expectations → answers the player from its own history.
The canonical vertical scenario (track MEM, §16.5). The goal is not an NPC that stores the past — it is an NPC whose past has become part of its model of itself.
NPC meets Goran. Several positive interactions. Memory entries with importance 0.5–0.8.
The episode is recorded — but with perspective (victim vs witness vs actor), with betrayal-importance (not as a routine event), with emotion-at-encoding.
Decay is driven by Δticks, not wall-clock. Salience weights decide what survives. Episodic details fade; the structure of the betrayal persists.
A query about Goran must trigger a reconstruction — not a lookup. Personal perspective, temporal structure, surviving and lost details, possible errors, influence on prediction.
Per-source expectations ("Goran usually helps" — or, after betrayal, "Goran usually betrays"). Prediction error feeds back into memory importance and belief revision.
Success criterion: "Goran? Yes..." — and then a reconstruction of the NPC's individual history, distinct from WORLD TRUTH, reproducible by the deterministic engine.
Every layer must prove causal work that no other layer performs. A new entity named after a phenomenon is forbidden until it demonstrates work that existing mechanisms cannot do.
Dialogue ≠ Memory — speech is a read-only projection of memory storesMemory ≠ Causality — storage is not a mechanismBelief ≠ Decision — belief modulates weights, does not author actionsRelationship scalar ≠ History — a number is not a sequence of eventsSelf-interpretation ≠ Motivation — explanation is not the causeLLM ≠ Canonical Truth — language model is a renderer, never an authorityIf you use ENIGMA in your research, please cite it as below.
@software{gritsaenko_2026_enigma,
author = {Gritsaenko, M.},
title = {ENIGMA: Executable Epistemic Contracts in Deterministic Agent Simulation},
version = {0.5.4.4.5},
year = {2026},
url = {https://github.com/4Um4/Enigma},
doi = {10.5281/zenodo.22831764},
license = {AGPL-3.0}
}
Gritsaenko, M. (2026). ENIGMA: Executable Epistemic Contracts in Deterministic Agent Simulation (Version 0.5.4.4.5) [Computer software]. https://doi.org/10.5281/zenodo.22831764
Gritsaenko, M. 2026. "ENIGMA: Executable Epistemic Contracts in Deterministic Agent Simulation." Version 0.5.4.4.5. https://doi.org/10.5281/zenodo.22831764.