Skip to content

heraclitus0/epacog

Repository files navigation

Epacog Logo

Epacog

Epistemic Artificial Cognition


License Python Status


Epacog is a programmable cognition engine designed to model recursive alignment and reception under misalignment, projection drift, rupture dynamics, and identity collapse in volatile systems. Built for epistemic volatility, it enables agents, analysts, and systems to:

  • Project belief states over time (V)
  • Accumulate misalignment memory (E)
  • Quantify distortion between belief and reception ()
  • Adapt or collapse based on rupture thresholds (Θ)
  • Realign via symbolic operators ()
  • Simulate recursive drift under external signals

Features

  • Recursive Epistemic Agents
    Dynamically maintain and evolve V(t), E(t), ∆(t), Θ(t) fields.

  • Custom Realignment Operators
    Inject your own ⊙ logic—linear, fatigue-aware, nonlinear, or symbolic.

  • Flexible Rupture Policies
    Threshold-based, probabilistic, consensus-aligned, or hybrid rupture triggers.

  • Collapse Response Models
    Control identity collapse: reset, decay, adopt R, or inject noise.

  • Simulation Engine
    Model epistemic fields over time using symbolic trace logs and visual overlays.

  • Symbolic Topology
    Classify field zones: stable, adaptive, collapsed:{type}.

  • Composable Architecture
    Override any operator, policy, threshold, or collapse mechanic.


Install

pip install epacog

Dependencies:
numpy, matplotlib, pandas, seaborn (optional: visualization)


Minimal Example

from epacog.core.epistemic_state import EpistemicState
from epacog.operators import realign_linear
from epacog.rupture.rupture_policy import build_rupture_policy
from epacog.rupture.volatility import theta_linear_growth
from epacog.sim.rupture_sim import simulate_epistemic_drift, generate_signal_sequence
from epacog.sim.projection_drift_map import build_drift_field_matrix, plot_drift_map

agent = EpistemicState(
    V0=0.0,
    E0=0.0,
    realign_fn=realign_linear,
    threshold_fn=theta_linear_growth,
    rupture_policy=build_rupture_policy("threshold")
)

signal = generate_signal_sequence(mode="shock", steps=100, shock_at=45)
trace = simulate_epistemic_drift(agent, signal, steps=100)

field = build_drift_field_matrix(trace)
plot_drift_map(field)

Architecture

Module Purpose
core/epistemic_state.py Projection state engine (V, E, , Θ)
core/operators.py Realignment ⊙, distortion ∆, memory decay
rupture/rupture_policy.py Rupture logic: threshold, consensus, stochastic, hybrid
rupture/volatility.py Dynamic Θ(t): linear, saturating, stochastic, peer-coupled
rupture/collapse_models.py Collapse actions: reset, decay, adopt R, symbolic
sim/rupture_sim.py Drift simulation engine with signal injectors
sim/projection_drift_map.py Visual + symbolic field analyzers

Applications

  • Recursive agent modeling
  • LLM hallucination regulation
  • Identity collapse simulations
  • Cognitive projection control
  • Drift-aware decision systems
  • Symbolic cognitive field experiments
  • Multi-agent epistemic networks

Foundations

This engine implements symbolic dynamics derived from recursive epistemic models of:

  • Misalignment accumulation
  • Rupture activation fields
  • Identity collapse patterns
  • Projection-reality feedback control

Inspired by:

  • Recursion Control Calculus (DOI)
  • Continuity Theory (DOI)

Epacog encodes these into a sandbox for programmable epistemic control.
No component is fixed. Every mechanism is overrideable.


License

Apache 2.0 © Pulikanti Sashi Bharadwaj


Citation

@misc{epacog2025,
  author       = {Pulikanti, Sashi Bharadwaj},
  title        = {Epacog: Epistemic Artificial Cognition},
  howpublished = {\url{https://github.com/heraclitus0/epacog}},
  year         = {2025},
  note         = {Version-agnostic repository citation}
}

About

A programmable framework for epistemic cognition, drift, rupture, and collapse dynamics.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages