karma-dynamics

Mathematical modeling of karmic dynamics using epidemiological approaches

https://github.com/eduwardus/karma-dynamics

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.6%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Mathematical modeling of karmic dynamics using epidemiological approaches

Basic Info
  • Host: GitHub
  • Owner: eduwardus
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Size: 8.45 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 3
Created 9 months ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

Mathematical Modeling of Karmic Dynamics

Binder Open In Colab DOI

Official computational implementation for the paper:
"Mathematical Modeling of Karmic Dynamics: An Epidemiological Approach to Buddhist Philosophy"

Overview

This repository bridges complex systems theory and contemplative traditions through: - Epidemiological-Karmic Synthesis: Adaptation of SEIRS models to Buddhist philosophy - Wisdom Quantification: Parameterization of spiritual development (w) - Nonlinear Dynamics: Modeling of Three Karmic Roots and Five Mental Poisons - Attractor Theory: Samsara realms as distinct dynamical regimes - Social Physics: Network extensions for collective karma

mermaid graph LR A[Epidemiology] --> B[SEIRS-Karma Model] C[Buddhist Philosophy] --> B B --> D[Three Karmic Roots] B --> E[Five Mental Poisons] D --> F[Realm Attractors] E --> F F --> G[Enlightenment Conditions]

Models

| Model | Script | Key Features | Mathematical Representation | |-------|--------|--------------|-----------------------------| | Individual Karma | seirs_karma.py | SEIRS-Karma framework with wisdom modulation | dS/dt = ξ(1-w)R - αS + λf(R) | | Three Roots | three_roots.py | Ignorance-Attachment-Aversion coupling | dI/dt = αI I + βIAAV - γI w I | | Five Poisons | five_poisons.py | Asymmetric interactions with pride/envy extensions | dP/dt = αP P + βPA PA - γP w P | | Samsara Realms | realms_attractors.py | Realm-specific attractor configurations | 6 dynamical regimes (Table 1) | | Enlightenment | enlightenment.py | Lyapunov-stable fixed point at K=0 | w > max( (αi + 0.5Σ|βij|)/γi ) | | Stochastic Extensions | stochastic_extensions.py | Randomness & time delays in karmic processes | dE = [αE E + ...]dt + σE E dWt | | Collective Karma Network | network_karma.py | Social influence on karmic dynamics | dwi/dt = ε(1-wi) - μ wi + ΣA{ij}(wj - wi) |

Key Parameter Documentation

Each model contains adjustable parameters that control its behavior. Below are the main parameters for all simulation scripts:

1. Individual Karma SEIRS Model (seirs_karma.py)

| Parameter | Description | Typical Range | Unit | Equation | |-----------|-------------|--------------|------|----------| | alpha | Latent karma activation rate | [0.1, 0.5] | 1/time | dS/dt = ... - αS | | sigma | Intention manifestation rate | [0.2, 0.6] | 1/time | dE/dt = αS - σE | | gamma | Action resolution rate | [0.3, 0.7] | 1/time | dI/dt = σE - γI | | xi | Karmic residue recycling rate | [0.1, 0.4] | 1/time | dS/dt = ξ(1-w)R - ... | | w | Wisdom factor | [0, 1] | dimensionless | Modulates relapse | | lambda_val | Maximum habit feedback rate | [0.05, 0.2] | 1/time | + λ·R/(1+R) |

2. Three Karmic Roots Model (three_roots.py)

| Parameter | Description | Typical Range | Unit | Equation | |-----------|-------------|--------------|------|----------| | alphaI | Ignorance (I) auto-reinforcement | [0.1, 0.5] | 1/time | dI/dt = αI I + ... | | alphaA | Attachment (A) auto-reinforcement | [0.1, 0.5] | 1/time | dA/dt = αA A + ... | | alphaV | Aversion (V) auto-reinforcement | [0.1, 0.5] | 1/time | dV/dt = αV V + ... | | betaIA | Attachment+Aversion → Ignorance | [0.2, 0.8] | 1/time | βIA A V | | betaAV | Aversion+Ignorance → Attachment | [0.2, 0.8] | 1/time | βAV V I | | betaVI | Ignorance+Attachment → Aversion | [0.2, 0.8] | 1/time | βVI I A | | gammaI | Wisdom sensitivity (Ignorance) | [0.3, 0.7] | dimensionless | - γI w I | | gammaA | Wisdom sensitivity (Attachment) | [0.3, 0.7] | dimensionless | - γA w A | | gammaV | Wisdom sensitivity (Aversion) | [0.3, 0.7] | dimensionless | - γV w V | | w | Wisdom factor | [0, 1] | dimensionless | Global damping |

3. Five Mental Poisons Model (five_poisons.py)

| Parameter | Description | Typical Range | Unit | Notes | |-----------|-------------|--------------|------|-------| | alphaX | Auto-reinforcement rate | [0.1, 0.5] | 1/time | X ∈ {I, A, V, P, E} | | betaXY | Asymmetric coupling | [0.05, 0.8] | 1/time | Doctrinal hierarchy (βij ≠ βji) | | gammaX | Wisdom sensitivity | [0.3, 0.7] | dimensionless | Poison-specific | | w | Wisdom factor | [0, 1] | dimensionless | Global control |

4. Samsara Realms Attractors (realms_attractors.py)

| Parameter | Description | Realm-Specific Values | Notes | |-----------|-------------|------------------------|-------| | alphaX | Auto-reinforcement | Varies by realm | Higher in Naraka, lower in Devas | | betaXY | Cross-coupling | Varies by realm | Strong in Humans, weak in Animals | | gammaX | Wisdom sensitivity | Varies by realm | Higher in Devas | | w | Wisdom level | [0.01 (Naraka) - 0.45 (Devas)] | Dimensionless | | y0 | Initial condition | Poison-predominant setup | Eg: Devas → High Attachment |

5. Enlightenment Analysis (enlightenment.py)

| Parameter | Description | Range | Key Equation | |-----------|-------------|-------|--------------| | w_critical | Minimum wisdom threshold | >0 | maxi((αi + 0.5Σ|βij|)/γi)| |recoverythreshold| Convergence tolerance | [0.01, 0.1] | 10% of perturbation | |tolerance| Enlightenment precision | 1e-3 |||K|| < tolerance` |

6. Stochastic Extensions (stochastic_extensions.py)

| Parameter | Description | Typical Range | Unit | |-----------|-------------|--------------|------| | sigmaX | Noise intensity (X=S,E,I,R) | [0.01, 0.1] | dimensionless | | tau | Karmic maturation delay | [5, 20] | time | | perturbation | (time, intensity, variable) | - | Tuple specification | | recovery_threshold | Resilience threshold | [0.05, 0.2] | dimensionless |

7. Collective Karma Network (network_karma.py)

| Parameter | Description | Typical Range | Unit | |-----------|-------------|--------------|------| | kappaX | Social influence strength | [0.01, 0.1] | 1/time | | epsilon | Intrinsic wisdom growth | [0.05, 0.2] | 1/time | | mu | Wisdom degradation | [0.01, 0.1] | 1/time | | delta | Wisdom diffusion strength | [0.1, 0.5] | dimensionless | | w_critical | Collective wisdom threshold | [0.5, 0.6] | dimensionless |## Installation

Installation

```bash git clone https://github.com/eduwardus/karma-dynamics.git cd karma-dynamics pip install -r requirements.txt

Additional dependencies for specific models:

pip install sdeint ddeint networkx # For stochasticextensions.py and networkkarma.py ```

Usage

```python

Run individual karma simulation

python scripts/seirs_karma.py

Simulate three karmic roots dynamics

python scripts/three_roots.py

Explore five mental poisons with asymmetric coupling

python scripts/five_poisons.py

etc... ```

Philosophical Framework

"Models are upāya (skillful means), not ultimate truth"
- Ethical Position: Middle Way (madhyamaka) non-reductionism
- Variables as normalized energy densities (bīja → vipāka)
- Conservation: "Karma transforms but is never destroyed"

Abstract

"This work presents a novel mathematical reinterpretation of epidemiological models for karmic dynamics... bridging complex systems theory and contemplative traditions while providing formal tools for analyzing social information networks of mental habit transmission."

Citation

bibtex @article{gonzalezgranda2025karmic, title={Mathematical Modeling of Karmic Dynamics: An Epidemiological Approach to Buddhist Philosophy}, author={Gonz{\'a}lez-Granda, Eduardo}, journal={Preprint}, year={2025}, url={https://github.com/eduwardus/karma-dynamics} }

License

Apache 2.0 - See LICENSE

Owner

  • Login: eduwardus
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please cite this software using the following metadata:"
title: "Karmic Dynamics Computational Framework"
authors:
  - family-names: "González-Granda Fernández"
    given-names: "Eduardo"
    orcid: "https://orcid.org/0000-0002-6771-5145"
version: 1.1.0
doi: 10.5281/zenodo.15827996
date-released: 2025-07-07
license: Apache-2.0
repository-code: "https://github.com/eduwardus/karma-dynamics"
funding:
  - name: Fundación Himalaya Cultura de Paz
    identifier: FCHP-2025-01
    description: >
      Grant supporting interdisciplinary research in science, inner development, and cultural peace.

GitHub Events

Total
  • Release event: 2
  • Push event: 36
  • Create event: 2
Last Year
  • Release event: 2
  • Push event: 36
  • Create event: 2

Dependencies

requirements.txt pypi
  • matplotlib ==3.7.1
  • numpy ==1.26.0
  • scipy ==1.11.1