CTHmodules is an open-source framework that transforms history into auditable data, providing insights into socio-historical dynamics. By utilizing advanced computational methods, it allows for the quantification and simulation of historical events, paving the way for predictive civilizational engineering.
CTHmodules: Psychohistory in Code – Quantify History, Forecast Futures
CTHmodules is an open-source JavaScript framework for tetrasociohistorical analysis — a rigorous, auditable step toward Isaac Asimov's Psychohistory. It transforms descriptive history into quantifiable metrics, diagnoses present dynamics, and projects probabilistic futures using transparent complexity science.
Core Vision
Move beyond storytelling:
- Past → Auditable data
- Present → Technical diagnosis
- Future → Manageable probabilities
Built on real math: Shannon Entropy, non-linear dynamics, high-density Monte Carlo simulations (50k+ iterations in deep-zoom mode), and dynamic inference to handle fragmented datasets without bias.
Tetrasociohistorical Context (CTH Index)
Quantifies any event across four dimensions with dynamic weighting:
- Historical Epoch (E): GDP/capita, political density, technological level
- Social Range (S): Income inequality, literacy, cultural cohesion
- Age Range (A): Life expectancy, birth rates, generational pressure
- Population Range (P): Density, urbanization, migration flows
Computed across 5 temporal phases (Before → Prelude → During → Transition → After) to capture ΔCTH (context variation) and reveal systemic patterns.
Key Engines & Features
- Strategic Orchestrator (Core.js) → Weighted ultra-synthesis of all engines; outputs high-certainty trajectories, risk indices, and strategic recommendations.
- Cognitive Bridge (Bridge.js) → Converts raw narratives/news into structured CTH data (LLM-augmented or standalone).
- Butterfly Field & Chaos Resilience → Maps non-linear causal drifts, detects fragility, and scores post-disruption recovery.
- Stochastic Projection Engine → Master predictor with Monte Carlo refinement for robust probabilities (RMD: Positive Transformation vs CMN: Decline/Stagnation).
- Invariance & Pattern Detection → Finds thresholds and recurring "temporal echoes" automatically.
Real-World API – Live & Ready
Public API (one endpoint: /v1/predict) turns natural-language inputs into psychohistorical verdicts in milliseconds.
- Basic (Free) (Explorer): Test & build (non-commercial)
- Pro ($9.99/mo): Higher limits for professionals
- Ultra ($29.99/mo): Institutional scale
- Mega ($99.99/mo): Large enterprises
Use cases:
- Geopolitical forecasting (e.g., US-China 2028)
- Macro risk (e.g., Argentina 2026)
- Crypto/market trajectories (e.g., Bitcoin 2027)
- Corporate survival (AI startups)
- Historical backtesting ("What if Berlin Wall never fell?")
All revenue reinvested in research & scaling.
Get Started
# Install via npm or clone
git clone https://github.com/AlejoMalia/CTHmodules.git
- License: CC BY-NC-SA 4.0 (non-commercial open-source)
- Docs & theory: cthmodules.cc
- GitHub: AlejoMalia/cthmodules
- Npm: npmjs.com/package/cthmodules
- API: rapidapi.com/alejomalia/api/cthmodules
- Join the push: Collaborate on scaling engines, integrating LLMs, or applying to real-world foresight. Test it quantify history today!
No comments yet.
Sign in to be the first to comment.