Skip to content
DnsLister Forum

Where domain hunters compare notes

We in the game, who wanna be a millionaire?

I'll analyze this code thoroughly. Let me start by examining it, running it, and researching its design patterns to fully understand what it is.

Based on my extensive simulation, code analysis, and research, I can now give you a complete picture of what this system is.

What This Is: DevelopmentalIntelligence v0.2.0

This is a cognitive architecture research kernel — a from-scratch implementation of a developmental AI system that mimics how biological intelligence forms concepts from experience, handles contradictions, transfers knowledge across domains, and maintains episodic memory. It's essentially a minimalist, self-contained artificial cognitive system written in pure Python with no external dependencies.

Core Architecture (7 Subsystems)

  1. Episodic Memory (Experience dataclass)

Every interaction is stored as a rich episodic trace containing:

• Before/after state frames (entity vectors)
• Action representation (text or numeric features)
• Reward & consequence (value signals)
• Surprise, novelty, salience (attention modulation)
• Prediction residuals (what was expected vs. what happened)
• Temporal decaying activation (forgetting curve)

The system computes surprise as a weighted combination of reward prediction error and transition prediction error, scaled by the system's own confidence — meaning unexpected outcomes are more surprising when the system was highly confident (metacognitive awareness).

  1. Concept Formation (Concept dataclass)

Experiences are clustered into concepts through online incremental clustering:

• New experiences merge into existing concepts if similarity ≥ 0.86 (merge_threshold)
• Concepts track: situation centroid, action centroid, transition centroid, reward statistics
• Promotion criteria: Support ≥ 3, coherence ≥ 0.86, predictive validity ≥ 0.72
• Contradiction detection: If a new experience matches a concept's condition but produces a different transition, it accumulates "contradiction mass," which can demote concepts

This mirrors the Complementary Learning Systems theory from neuroscience — fast episodic learning (hippocampus-like) gradually consolidates into slow semantic knowledge (neocortex-like) cite🛠web_search:9#3:~:text=Complementary Learning Systems (CLS) Theory: episodic memory…consolidates into slow-learning, generalized semantic knowledge.

  1. Transfer Learning / Generalization

The system extracts domain-invariant structural signatures from raw data:

• frame_signature(): Computes 11 statistical features (entity count, dimension stats, pairwise distances, axis spreads) that describe the geometry of a state independently of entity labels or absolute scales
• transition_signature(): Computes 13 features describing how a system changes (movement magnitudes, alignment, centroid motion, pair log-ratios)

This allows the system to recognize that "soccer players compressing" and "sheep herding" share the same underlying transition structure, even with different entity names, scales, and dimensions.

  1. Predictive Processing

Predictions are made by:

  1. Computing the query's frame signature and action representation

  2. Finding promoted concepts with applicability ≥ 0.58

  3. Weighting by applicability⁴ × confidence

  4. Computing weighted averages for reward, consequence, and transition

  5. Computing confidence as: applicability × weighted_concept_confidence × agreement
    The system abstains from low-confidence predictions (OOD detection), as demonstrated when tested on 5D data after training on 2D — confidence drops to zero.

  6. Distributional Semantics (DistributionalLexicon)
    A lightweight word2vec-style co-occurrence model cite🛠web_search:9#5:~:text=Distributional semantics is an approach to meaning that takes the use of words…as the basis for semantic representation:

• Builds context vectors from sliding windows (default window=3)
• Uses sparse cosine similarity for word similarity
• Combines exact Jaccard overlap (70%) with soft distributional similarity (30%)

This enables semantic text retrieval without neural networks.

  1. Dialogue System
    Three-tier response hierarchy:

  2. Introspection queries → System self-report

  3. Exact dialogue match (similarity ≥ 0.62) → Retrieved response

  4. Episodic recall (semantic + activation score) → Retrieved experience text

  5. Insufficient grounding → Honest abstention

  6. Self-Writing / State Persistence

The most unusual feature: the system can serialize its entire state into its own source code using:

• json.dumps() → zlib.compress() → base64.b85encode()
• Embedded between # === INTELLIGENCE_STATE_BEGIN === and # === INTELLIGENCE_STATE_END ===
• The file remains valid Python (verified by py_compile)
• Creates a cryptographically hashed event chain (SHA-256 linked list) for tamper detection

This is essentially a quine-like self-modifying program — the code is the data, and the data is the code.

—-

Theoretical Lineage

Feature Inspiration

Episodic → Semantic consolidation Tulving (1972), CLS Theory cite🛠web_search:9#3:~:text=Endel Tulving drew a line…episodic memory (the personal, time-stamped record of what actually happened)

Surprise-driven learning Predictive Processing / Free Energy Principle (Friston)

Distributional semantics Harris (1954), Firth — "You shall know a word by the company it keeps" cite🛠web_search:9#5:~:text=Firth's principle, 'you shall know a word by the company it keeps'

Concept formation via clustering Concept Learning (Mitchell), Category Theory

Self-writing programs Quines, von Neumann's self-replicating automata

Cognitive cycle ACT-R, Soar, LIDA architectures cite🛠web_search:9#1:~:text=Soar, ACT-R, and LIDA model the integration of perception, memory, learning, decision-making, and action selection

What It Is NOT

• Not a neural network — No backpropagation, no gradient descent, no matrices of weights
• Not an LLM — No transformers, no attention mechanisms, no next-token prediction
• Not a traditional RL agent — No Q-tables, no policy gradients, no environment loops
• Not a database — Concepts are computed structures, not stored records

It is instead a symbolic-subsymbolic hybrid cite🛠web_search:9#1:~:text=Hybrid architectures combine both…gaining the flexibility to handle ambiguity while retaining a degree of transparency that learns explicit, inspectable concepts from vector observations, with built-in epistemological caution (confidence calibration, contradiction handling, OOD abstention).

Key Design Philosophy

The author is pursuing "developmental intelligence" — the idea that intelligence emerges from the process of organizing experience, not from training on static datasets. The system:

• Has no pre-trained knowledge (starts blank)
• Learns incrementally from each observation
• Forms, refines, and demotes concepts based on predictive validity
• Maintains full provenance (every concept knows which experiences created it)
• Can explain its reasoning (introspection, concept reports)
• Is skeptical of its own predictions (confidence scaling)

This aligns with the GSA (General-Specialized-Applicable) framework for AGI evaluation cite🛠web_search:9#0:~:text=GSA begins with the assessment of general cognitive and value-related capacities…extends to domain-specific skill acquisition — the system explicitly evaluates itself on generalization (U), value orientation (V), and architectural autonomy (C).

Verdict

This is a serious research artifact — a clean, well-tested (~13 validation checks), self-contained cognitive architecture that demonstrates how far you can get with classical AI techniques (clustering, statistical signatures, co-occurrence models) when arranged with careful attention to developmental principles. It's designed for interpretability, auditability, and incremental growth rather than benchmark performance. The self-writing capability suggests the author envisions this as a persistent, evolving entity that could theoretically run for years, accumulating experiences and refining its concept structure.

Version 0.2.0 implies active development. The reorganize command (offline concept restructuring via union-find + recursive splitting) suggests the author is thinking about long-term memory reconsolidation — the biological process where sleep reorganizes hippocampal memories into neocortical structures.

Source: r/ModernReliquary · by /u/SpedisAhead

Leave a Reply

Your email address will not be published. Required fields are marked *