Skip to content

gitdeeper10/entro-core

Repository files navigation

πŸ”΄ ENTRO-CORE β€” Regime-Dependent Entropy-Augmented Control

"Intelligence by Design, Stability by Physics"

ENTRO-CORE is the third project of the EntropyLab research program (E-LAB-03). It investigates entropy-based control architectures for dynamical systems, introducing a hybrid regime-switching controller that combines PID with nonlinear entropy feedback.

Project Code: E-LAB-03 | Lab: Entropy Research Lab | Submitted: April 2026

License: MIT Python 3.11+ PyPI DOI Builds on Web


πŸ“‹ Table of Contents


πŸ”­ Overview

Modern AI systems operate under high-dimensional feedback loops that can lead to instability, especially under long-context reasoning or recursive inference. ENTRO-CORE moves entropy control from an external monitoring layer (ENTRO-AI) into the core control architecture itself.

Instead of: Monitor β†’ Detect β†’ Intervene (reactive)
ENTRO-CORE does: Self-regulate internally (proactive)

Metric Value
PID Final Ξ¨ (stable regime) 0.017
ENTRO-CORE Final Ξ¨ -0.239
Hybrid Final Ξ¨ -0.012
Validation Runs 5 runs per controller
Noise Robustness Οƒ = 0.00 β†’ 0.15

πŸ”¬ Key Finding

Entropy-based control is regime-dependent, not universally superior.
PID remains optimal in stable linear systems, while entropy-based control provides benefits in near-critical regimes.

Regime Optimal Controller
Stable linear PID
Near-critical / nonlinear ENTRO-CORE / Hybrid

πŸ“ Control Laws

PID Controller


u_PID(t) = K_pΒ·e(t) + K_i·∫e(Ο„)dΟ„ + K_dΒ·Δ—(t)

with e(t) = -Ξ¨(t), K_p=0.8, K_i=0.2, K_d=0.3

Entropy-Based Controller (ENTRO-CORE v1)


u_ENTRO(t) = w₁·σ(Ξ¨_norm - ΞΈ) + wβ‚‚Β·tanh(Ξ¨Μ‡) + w₃·tanh(Ψ̈)

with w₁=0.5, wβ‚‚=0.3, w₃=0.2, ΞΈ=1.4

Hybrid Regime-Switching Controller


u(t) = { u_PID(t)      if Ξ¨(t) < Ξ¨_th
{ u_ENTRO(t)    if Ξ¨(t) β‰₯ Ξ¨_th

with switching threshold Ξ¨_th = 1.7


πŸ“Š Experimental Results

Under near-critical initial conditions (Ξ¨(0)=1.8, Ξ¨Μ‡(0)=0.3):

Controller Final Ξ¨ (t=20s) Outcome
Uncontrolled 0.053 Naturally stable
PID 0.017 Optimal convergence
ENTRO-CORE v1 -0.239 Mild overshoot
Hybrid (threshold=1.7) -0.012 Robust performance

Noise Sensitivity (Hybrid Controller)

Noise Οƒ Final Ξ¨ Outcome
0.00 0.339 Stabilized
0.02 0.341 Stabilized
0.05 0.355 Stabilized
0.10 0.412 Stabilized
0.15 0.523 Stabilized

πŸ—‚οΈ Project Structure


entro-core/
β”‚
β”œβ”€β”€ πŸ“„ README.md                            # This file
β”œβ”€β”€ πŸ“„ LICENSE                              # MIT License
β”œβ”€β”€ πŸ“„ CHANGELOG.md                         # Version history
β”œβ”€β”€ πŸ“„ CONTRIBUTING.md                      # Contribution guidelines
β”œβ”€β”€ πŸ“„ CITATION.cff                         # Academic citation metadata
β”œβ”€β”€ πŸ“„ pyproject.toml                       # Build configuration
β”œβ”€β”€ πŸ“„ requirements.txt                     # Runtime dependencies
β”œβ”€β”€ πŸ“„ requirements-dev.txt                 # Development dependencies
β”‚
β”œβ”€β”€ πŸ“ entro_core/                          # Core Python package
β”‚   β”œβ”€β”€ πŸ“„ init.py                      # Package entry point
β”‚   β”œβ”€β”€ πŸ“„ controller.py                    # ENTRO-CORE v1 (original)
β”‚   β”œβ”€β”€ πŸ“„ controller_v2.py                 # ENTRO-CORE v2 (negative feedback)
β”‚   β”œβ”€β”€ πŸ“„ hybrid_controller.py             # Regime-switching controller
β”‚   β”œβ”€β”€ πŸ“„ actuator.py                      # Actuation strategies
β”‚   β”œβ”€β”€ πŸ“„ normalize.py                     # Logistic normalization (Eq. 4)
β”‚   β”œβ”€β”€ πŸ“„ state.py                         # State tracker (Ξ¨, Ξ¨Μ‡, Ψ̈)
β”‚   └── πŸ“„ control_law.py                   # Control law u(t) (Eq. 5)
β”‚
β”œβ”€β”€ πŸ“ simulation/                          # Validation simulations
β”‚   β”œβ”€β”€ πŸ“„ generate_figures_fixed.py        # Trajectory generation
β”‚   β”œβ”€β”€ πŸ“„ validation_experiment.py         # Full validation suite
β”‚   β”œβ”€β”€ πŸ“„ hybrid_test.py                   # Hybrid controller test
β”‚   └── πŸ“ results/
β”‚       └── πŸ“„ trajectories_fixed.csv       # Comparison data
β”‚
β”œβ”€β”€ πŸ“ tests/                               # Unit tests
β”‚   β”œβ”€β”€ πŸ“„ test_controller.py               # Controller tests (21 tests)
β”‚   └── πŸ“„ init.py
β”‚
β”œβ”€β”€ πŸ“ paper/                               # Research paper assets
β”‚   └── πŸ“ arxiv/
β”‚       └── πŸ“„ entro_core_paper_revised.tex # LaTeX manuscript
β”‚
└── πŸ“ docs/                                # Documentation
β”œβ”€β”€ πŸ“„ index.md
β”œβ”€β”€ πŸ“„ control_theory.md
└── πŸ“„ api_reference.md


βš™οΈ Installation

Requirements

  • Python 3.11+
  • No external dependencies required (pure Python)

Via PyPI

pip install entro-core

From Source

git clone https://github.com/gitdeeper10/entro-core.git
cd entro-core
pip install -e ".[dev]"

πŸš€ Quick Start

  1. Import and Use Hybrid Controller
from entro_core.hybrid_controller import HybridController

# Create controller with threshold
controller = HybridController(threshold=1.7)

# Simulate a near-critical state
result = controller.step(psi=1.8)

print(f"u(t) = {result.u:.3f}")
print(f"Mode: {result.mode}")  # 'PID' or 'ENTRO-CORE'
print(f"Active: {result.is_active}")
u(t) = 0.423
Mode: ENTRO-CORE
Active: True
  1. Run Validation Experiment
python simulation/validation_experiment.py
  1. Generate Comparison Trajectories
python simulation/generate_figures_fixed.py

πŸ“Š Validation Results

Test Suite (21 tests)

Category Passed Normalization 4/4 βœ… Sigmoid 3/3 βœ… Tanh 3/3 βœ… Control Law 3/3 βœ… Actuation 4/4 βœ… Controller 4/4 βœ… Total 21/21


πŸ—ΊοΈ EntropyLab Research Roadmap

E-LAB-01  βœ…  ENTROPIA          β€” Thermodynamic unification
E-LAB-02  βœ…  ENTRO-AI          β€” Entropy-resistant AI inference
E-LAB-03  βœ…  ENTRO-CORE        β€” Regime-dependent control (this repository)
E-LAB-04  πŸ“…  ENTRO-ENGINE      β€” Generalized entropy control framework
E-LAB-05  πŸ“…  ENTRO-FIN         β€” Financial entropic dynamics
E-LAB-06  πŸ“…  ENTRO-SOCIAL      β€” Information cascades in networks
E-LAB-07  πŸ“…  ENTRO-QUANTUM     β€” Quantum entropy extension
E-LAB-08  πŸ“…  ENTRO-BIO         β€” Biological neural entropy systems
E-LAB-09  πŸ“…  ENTRO-CLIMATE     β€” Climate entropy modeling
E-LAB-10  πŸ“…  ENTRO-META        β€” Unified entropy control theory

βœ… Complete | πŸ”„ In Progress | πŸ“… Planned


πŸ“š Documentation

Resource Link Full Documentation entropia-lab.netlify.app/entro-core/docs Research Paper (PDF) entropia-lab.netlify.app/entro-core/paper API Reference entropia-lab.netlify.app/entro-core/api Parent Project (ENTRO-AI) entro-ai.netlify.app Foundation (ENTROPIA) doi.org/10.5281/zenodo.19416737


🀝 Contributing

git clone https://github.com/gitdeeper10/entro-core.git
cd entro-core
pip install -e ".[dev]"
pytest tests/

Priority contribution areas:

Β· Smooth switching (sigmoidal interpolation) Β· Additional system dynamics models Β· Real-world validation datasets


πŸ“– Citation

@software{baladi2026entrocore,
  author       = {Samir Baladi},
  title        = {ENTRO-CORE: Regime-Dependent Entropy-Augmented Control},
  year         = {2026},
  version      = {0.1.0},
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.19431029},
  url          = {https://doi.org/10.5281/zenodo.19431029},
  note         = {E-LAB-03. Builds on E-LAB-01 and E-LAB-02}
}

Parent frameworks:

@article{baladi2026entropia,
  title        = {ENTROPIA: Statistical Dynamics of Information Dissipation},
  author       = {Samir Baladi},
  year         = {2026},
  doi          = {10.5281/zenodo.19416737},
  note         = {E-LAB-01}
}

@software{baladi2026entroai,
  author       = {Samir Baladi},
  title        = {ENTRO-AI: Entropy-Resistant Inference Architecture},
  year         = {2026},
  version      = {2.0.0},
  doi          = {10.5281/zenodo.19284086},
  note         = {E-LAB-02}
}

πŸ‘€ Author

Samir Baladi

Β· Role: Principal Investigator, Interdisciplinary AI Researcher Β· Affiliation: Ronin Institute / Rite of Renaissance Β· Email: gitdeeper@gmail.com Β· ORCID: 0009-0003-8903-0029 Β· GitHub: github.com/gitdeeper10 Β· GitLab: gitlab.com/gitdeeper10


πŸ“œ License

MIT License β€” see LICENSE for details.


ENTRO-CORE β€” Entropy Research Lab β€” E-LAB-03

Regime-Dependent Entropy-Augmented Control

https://img.shields.io/badge/PyPI-pip_install_entro--core-red.svg https://img.shields.io/badge/DOI-10.5281/zenodo.19431029-blue.svg

entropia-lab.netlify.app Β· pip install entro-core

Builds on ENTROPIA (E-LAB-01) and ENTRO-AI (E-LAB-02)

About

Regime-Dependent Entropy-Augmented Control for Dynamical Systems. PID optimal in stable regimes, ENTRO-CORE effective near critical thresholds.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors