How tnsr-q/pqrg-theory works
Project type and purpose
• This is a research-oriented Python project combining:
– Theoretical frameworks and derivations (in “theory/”, “calculations/”, DERIVATIONS.md)
– Numeric simulations of φ⁻¹ emergence (in “simulations/” and “Simulations/”)
– Data assets and experiment protocols (in “data/” and “experiments/”)
– Visualization pipeline (in “figs/”, generate_visuals.py, VISUALIZATIONS.md)
– Applications and demos (in “applications/”)
– Validation and testing (validate_theory.py, “tests/”)
File structure
• Top-level modules:
– theory/, calculations/, DERIVATIONS.md → core mathematical framework
– simulations/, Simulations/ → code and Jupyter notebooks for numerical experiments
– data/ → raw and processed CSV data plus README
– figs/, generate_visuals.py, VISUALIZATIONS.md → figure-generation scripts and gallery
– applications/ → demonstration scripts and notebooks using core code
– tests/, validate_theory.py → automated validation and unit tests
– docs/ → project documentation and whitepapers
– CI/CD: .github/workflows/generate_visuals.yml
– Dockerfile, requirements.txt
• Patterns: Modular pipeline—Theory → Calculations → Simulations → Data → Visualizations → Applications → Validation/CI.
README insights
• The README outlines:
– Core theory (link to theory documents)
– Simulation entry points (python simulations/phi_convergence.py)
– Visualization commands (generate_visuals.py)
– Validation step (validate_theory.py)
• Dependencies: Python, QuTiP, SymPy, plotting libraries, Docker.
Main components & interactions
a. Components:
1. Theory Engine
• theory/ (Markdown with equations)
• calculations/ (algorithmic derivations)
• DERIVATIONS.md
2. Simulation Engine
• simulations/ (Python scripts & notebooks implementing physics simulations)
• Simulations/ (parallel directory of specialized scripts)
3. Data Layer
• data/ (CSV files & README)
• experiments/ (protocol definitions for physical tests)
4. Visualization Pipeline
• figs/ (plot source code)
• generate_visuals.py, VISUALIZATIONS.md
5. Application/Demo Layer
• applications/ (demo scripts & notebooks for AGI oracle and ethics demos)
6. Validation & Testing
• validate_theory.py (end-to-end checks)
• tests/ (unit tests)
7. Infrastructure
• Dockerfile (containerization)
• .github/workflows/generate_visuals.yml (CI for auto-generating visuals)
• requirements.txt (Python dependencies)
b. Relationships:
– Theory Engine → drives Calculations
– Calculations + Theory → feed parameters into Simulation Engine
– Simulation Engine → outputs raw data to Data Layer
– Data Layer → consumed by Visualization Pipeline and Application/Demo Layer
– Visualization Pipeline → produces figures for docs and README
– Application/Demo Layer → leverages Simulations + Visualizations for interactive demos
– Validation & Testing → pulls from all code directories to ensure correctness
– CI/CD Infrastructure → orchestrates tests, visual generation, and Docker builds
Architectural patterns and principles
• Modular, staged pipeline (akin to ETL):
Extract (Theory/Calculations) → Transform (Simulations) → Load/Present (Data/Visuals)
• Clear separation of concerns: theory vs. simulation vs. visualization vs. application
• Test-driven and CI-integrated research workflows