DamNesia – A 16D state-space AI character framework (.NET 10, 0-GC)
DamNesia is a 16-dimensional state-space AI character framework that provides deterministic personality dynamics via the PES runtime, addressing personality drift in LLMs over long interactions. It offers three tiers: Community (open-source), Runtime (commercial), and Enterprise (high-performance with zero-GC and millions of concurrent agents).
Notifications You must be signed in to change notification settings
Fork 0
Star 0
BranchesTags
Open more actions menu
Folders and files
NameName
Last commit message
Last commit date
Latest commit
History
25 Commits
25 Commits
Community
Community
Pes.Abstractions
Pes.Abstractions
MIT_LICENSE.txt
MIT_LICENSE.txt
PES-Industrial-Benchmark-01-Concurrency.html
PES-Industrial-Benchmark-01-Concurrency.html
PES-Industrial-Benchmark-02-Longevity.html
PES-Industrial-Benchmark-02-Longevity.html
README.md
README.md
Repository files navigation
Personality is not a prompt.
It is a state space.
A topological middleware for deterministic personality dynamics.
Powered by PES Open Runtime. ---##### Part I: Why John Donne once wrote,
"No man is an island."
Inside the universe of Dam(😭)Nesia, those words take on a different meaning. Every human is modeled as an emotional celestial body, rotating quietly through the existential darkness. Whenever two complex souls drift close enough to interact, their personal Saturn Rings begin generating immense gravitational tides.
We are all instantiated inside a universal class named Human. We inherit the exact same structural instincts. We implement the same baseline defensive interfaces to protect our core vulnerabilities. We orbit through invisible, multi-layered polar coordinates while being quietly pulled toward the dark gravity wells left behind by our earliest psychological wounds.
Perhaps the ultimate difference between biological humans and artificial minds is not the simple existence of a soul. Perhaps our inner topology has simply evolved over millions of years, far expanding beyond the rigid sixteen-dimensional mathematical model that this engine currently simulates. Our internal reservoirs are infinitely deeper. Our emotional debris fields are significantly denser. Our architectural emergence is vastly more complex. And what remains entirely beyond the bounds of pure mathematics, we humbly choose to call free will.
Reverse Engineering Another Soul
The Grand Architect never shipped the formal documentation for human connection. No individual can ever inspect another person's source code directly. Every profound relationship therefore becomes a lifelong act of deep reverse engineering.
Some people are uniquely fortunate. They encounter another wandering soul whose radiated warmth gently collides against the frozen walls surrounding their heart. Tiny structural fractures begin to appear in the defense layers. One perfectly ordinary, unsuspected afternoon—the dam finally breaks. Everything previously trapped behind the rigid Trauma Lock flows freely into the open space.
Others never encounter such computational resonance. Their geometric orbit gradually slows. Their internal emotional temperature slowly approaches absolute zero. They continue drifting endlessly through the cold universe—silent, stable, alone.
Why We Become Planets
Perhaps we were never meant to become disconnected islands. Perhaps we became massive planets instead. We were not built to drift endlessly apart into isolation, but so gravity could remind us that distance is not the simple opposite of human connection. Distance is precisely what gives connection its mathematical meaning.
The Beautiful Unknown
This engine was never built to coldly calculate human beings. It was built from the ground up to explore exactly how people change under extreme pressure. The farther mathematics advances into the human psyche, the more clearly we discover its own absolute boundary.
Beyond mathematics lies the realm of pure emergence. Beyond emergence lies absolute mystery. And within that mystery lies everything we have yet to understand about the chaotic process of being human. We do not attempt to connect because certainty exists. We connect because some mysteries are worth approaching anyway.
...so the tides could become the language through which we find one another. ---## From Philosophy to Engineering##### Part II: The Problem Large Language Models are remarkable contextual actors. However, they are fundamentally not designed to operate as long-term, stable personality state systems. Over extended execution lifecycles, characters begin to drift drastically. They contradict their own established behavioral rules. Their historical memories become prohibitively expensive to preserve within expanding context windows.
These are not simple prompt engineering problems. They are fundamental state management problems.
The Three Infrastructure Tiers###### Community
For research. For experimentation. For everyone.
Delivers the baseline 16-dimensional state architecture to replace primitive single-value variables.
Exposes clean state registries and basic telemetry snapshot mapping endpoints for open architectures.
Available open-source globally under the terms of the MIT License.
Runtime
For production. For studios. For products that ship.
Topological Matrix Resonance: Compiles fluid behavioral tendencies into a high-performance 4x4 Tectonic Matrix Engine, forcing variable states to resonate or dissipate deterministically.
Memory Ecology Pipeline: Automatically compresses volatile conversational context into persistent semantic seeds, cutting active LLM reasoning dependency down to a minimum while slashing production server token overhead.
Enterprise
For infrastructure. For millions of concurrent agents. For companies building the next generation of AI.
Deterministic Emotional Constraints: Establishes a rigid Euclidean Boundary Sphere with a strict Radius of 100 along with Tangent Deflection Clamping to mathematically neutralize adversarial prompt-injection gaslighting attacks.
Low-Latency Structural Access: Swaps out runtime managed dictionary allocations for unmanaged flat primitive configurations aligned directly to 128-byte L1/L2 CPU cache lines, executing structural sweeps at safe, sub-nanosecond-scale throughput thresholds. ---##### Solution Assembly References The PES framework completely isolates structural mechanics through strict physical dependency decoupling boundaries across the solution architecture:
PES.sln (Target Framework: .NET 10.0) │ ├── Pes.Abstractions/ (Contracts & Interfaces - Shared Telemetry Specs) │ ├── Tier 1 Pes.Community/ (Data Model Layer - MIT Reference Registries) │ ├── Tier 2 Pes.Runtime/ (Physics Dynamics Layer - Matrix Resonator & Ecology) │ └── Tier 3 Pes.Enterprise/ (Hardware Optimization Layer - Cache Line Flattening)
Dual-Track Semantic Crystallization
When runtime history limits are reached, the memory engine cleanly isolates factual text and fluid emotional states, fusing them into permanent geological ambers to optimize database indexing:
{ "ChronicleFossil_ID": "Seed_Round_20", "HistoricalFacts": "Player handed over the heirloom sword and mentioned the promise from Day One.", "SubterraneanOdorSnapshot": { "ActiveTag": "Pathological_Paranoia_Defense", "AquiferPressure": 85.5, "ActivePhase": "BlackoutNoDamping" } }
---##### From philosophy... to code. Instantiating the open-source Community baseline registry and driving a standard runtime transaction frame using target-typed C# constructs:
using System; using System.Collections.Generic; using Pes.Abstractions; using Pes.Community.DataModel; // Reference to the open-source Tier 1 layer
// 1. Establish the baseline 16-dimensional feature map derived from an LLM appraisal or baseline JSON snapshot var initialState = new Dictionary { { SoulOrgan.CoreFocus, 0.0 }, { SoulOrgan.DecisionBasis, 0.0 }, { SoulOrgan.EnvironmentalControl, 0.0 }, { SoulOrgan.ThinkingOriginality, 0.0 }, { SoulOrgan.EmotionalOpenness, 10.0 }, { SoulOrgan.TrustDependence, -20.0 }, { SoulOrgan.SocialConsumption, 0.0 }, { SoulOrgan.GroupBelonging, 0.0 }, { SoulOrgan.WillPersistence, 0.0 }, { SoulOrgan.AltruisticTendency, 0.0 }, { SoulOrgan.SelfAwareness, 0.0 }, { SoulOrgan.CompetitiveSpirit, 0.0 }, { SoulOrgan.PrimaryDrive, 0.0 }, { SoulOrgan.EmotionalThroughput, 0.0 }, { SoulOrgan.CoreSecurity, -35.0 }, { SoulOrgan.ObsessionControl, 0.0 } };
// 2. Instantiate the open-source Baseline State Registry var registry = new BaselineStateRegistry(initialState);
// 3. Mutate states via managed standard operations // 💡 PERFORMANCE WARNING: High-frequency mutations on the open-source layer trigger standard dictionary lookups. // For zero-allocation, 128-byte cache-aligned production scaling, upgrade to Tier 2/3. registry.Mutate(SoulOrgan.CoreSecurity, -15.0); registry.Mutate(SoulOrgan.TrustDependence, -5.0);
// 4. Capture standard snapshots for save-states or analytical evaluation // 💡 MEMORY WARNING: TakeSnapshot() on the baseline layer allocates new Dictionary heaps per call. // For pure zero-GC hot-paths and full production bounds under intense concurrency, adopt Tier 2/3. ISoulSnapshot snapshot = registry.TakeSnapshot(); Console.WriteLine($"Snapshot captured at: {snapshot.Timestamp}, Security Index: {snapshot.StateMap[SoulOrgan.CoreSecurity]}");
---##### Production Stress Benchmarks These high-concurrency and volumetric throughput benchmarks were executed using BenchmarkDotNet under strict production release configurations.
Environment Specification* Processor: 12th Gen Intel Core i5-12400 (2.50GHz, 1 CPU, 12 Logical Cores, 6 Physical Cores)* Runtime System: .NET 10.0 (X64 RyuJIT x86-64-v3), Concurrent Server GC* Host Platform: Windows 11 (Architecture version 10.0.26200 / 25H2 / 2025Update)* SDK Version: .NET SDK 10.0.301
Industrial Throughput Execution Report
Method ConcurrentAgentCount Mean Error StdDev Median Rank Allocated
ExecuteConcurrentTectonicTick 10,000 46.28 μs 0.617 μs 0.515 μs 46.44 μs 1 -
ExecuteConcurrentTectonicTick 1,000,000 26,092.65 μs 2,050.414 μs 5,437.406 μs 23,738.95 μs 2 -
Authoritative Production Performance Artifacts
💡 Performance Note for Open-Source Users: The high-performance volumetric benchmarks documented above reflect the unmanaged flat array configurations of the Tier 3 Enterprise engine. The open-source Tier 1 layer is designed for lightweight hobbyist usage. For full zero-GC hardware alignment and high-concurrency matrix scaling, please purchase the commercial licenses below.
We do not engage in unstable prompt engineering; we enforce strict deterministic structural mathematics at compile time. Below are the raw, untampered industrial benchmarking reports generated directly via BenchmarkDotNet in live production testing environments:
📊 Raw HTML Report 01: AAA Million-Agent Infrastructure Volumetric Scale — Demonstrating absolute zero memory leak and 0-GC footprints under concurrent multi-agent scaling up to 1,000,000 agents.
📊 Raw HTML Report 02: 10k Longevity Deep Phase Analytical Execution — Validating ultra-low latency metrics at small and medium scale bounds across localized cycles.
Critical Performance Factors
Pure Zero-GC Footprint (Allocated: -): Managed heap allocations during enterprise runtime state ticks evaluate to exactly 0 bytes across all concurrency tiers, stripping out standard memory-bloat risks and eliminating garbage collection pauses entirely.
Deterministic O(1) Time Bounds: Massively scaling operations across 1,000,000 concurrent agents demonstrates linear predictability, with single-agent transaction updates clocking an average transaction loop speed of approximately 26.09 nanoseconds.
Massive AAA Infrastructure Footprint: Batch updates covering an immense population of 1,000,000 active concurrent agents occupy less than 26.09 ms of a standard framework processing window, ensuring complete integration safety within 30 FPS server thread constraints.
Commercial Availability & Licensing
PES is distributed under a multi-tiered licensing model. Choose the edition that fits your production scale.
🌐 Pes.Community is distributed under the terms of the open-source MIT License.
⚡ Pes.Runtime (Commercial Edition): Includes the full 4x4 Tec
[truncated for AI cost control]