Caution
This Python-based engine is now LEGACY. Due to Python execution bottlenecks in high-density causal graphs (Phase 10+), core development has migrated to the high-performance hcsn-rust engine.
Note: Features are only backported to this repository if specifically required for cross-validation. For active research and the latest Phase 12 results, please use the Rust Core.
HCSN explores the hypothesis that the universe is fundamentally computational β built from discrete events and directed causal relations, with no assumed background space, time, or quantum framework.
πΊ Watch the overview on YouTube β π Read the paper on ResearchHub β
- π Local rewrite rules drive the evolution of a causal hypergraph
- π Geometry, time, and dimensionality emerge β they are not assumed
- π§² Particles appear as persistent topological defects in the network
- π¬ Reproducible experiments test emergence of Lorentz invariance, mass, and interaction
- π₯ Built-in visualizer and Blender importer for 3D cinematic rendering
- Overview
- Repository Structure
- Quick Start
- How to Run Experiments
- Diagnostics Explained
- Visualization
- Current Research Focus
- Contributing
- Citation
- License & Contact
HCSN proposes a discrete, causal, and computational substrate for physics:
- Events are vertices in a hypergraph; causal relations are directed hyperedges
- Dynamics are local probabilistic rewrite rules β no global clock, no background metric
- Time is the count of irreversible rewrites (rewrite depth)
- Geometry, dimension, and particles emerge from what statistically persists
The long-term goal is to identify the minimal rule set that produces universes consistent with:
- Lorentz invariance (emergent attractor)
- 4D spacetime-like structure
- Holographic scaling of information
- Quantum probabilistic behavior (Born rule from causal ignorance)
The companion theory repository is at hcsn-theory.
hcsn-sim/
βββ engine/ # Core simulation engine
β βββ hypergraph.py # Vertices, hyperedges, causal ordering
β βββ rules.py # Rewrite rules
β βββ rewrite_engine.py # Acceptance dynamics and rewrite scheduling
β βββ observables.py # Physical diagnostic measurements
β βββ physics_params.py # Shared physics parameters
β
βββ sim-exp/ # Reproducible experiments
β βββ run_simulation.py # Main simulation runner
β βββ exp_critical_scan.py # Phase transition scan
β βββ exp_phase_diagram.py # Omega phase diagram
β βββ exp_long_critical_run.py
β βββ exp_worldline_interactions.py
β βββ scattering_experiment.py
β βββ measure/ # Measurement scripts
β βββ plot/ # Plotting scripts
β βββ tests/ # Test suite
β βββ json/ # Experiment output data
β
βββ multiverse/ # Multi-variant universe runs (universality tests)
β βββ baseline/
β βββ variant_1/ β¦ variant_4/
β
βββ analysis/ # Legacy analysis scripts
βββ visualizer.html # Interactive browser-based visualizer
βββ visualizer_server.py # Local server for the visualizer
βββ blender_importer.py # Import cinematic frames into Blender
βββ export_cinematic.py # Export simulation to cinematic frame format
βββ export_csv.py # Export simulation data to CSV
βββ cinematic_frames.json # Pre-exported cinematic data
βββ hcsn_sample.csv # Sample simulation output
βββ simulation.log # Latest simulation log
βββ requirements.txt # Python dependencies
Requirements
- Python 3.10 or later
- Dependencies:
pytest,websockets,asyncio
pip install -r requirements.txtClone and run:
git clone https://github.com/hcsn-theory/hcsn-sim.git
cd hcsn-sim
python3 sim-exp/run_simulation.pyThis runs a toy universe and prints diagnostics periodically.
The sim-exp/ directory contains all reproducible experiments:
| Script | Purpose |
|---|---|
run_simulation.py |
Main simulation runner |
exp_critical_scan.py |
Scan Ξ© values to locate phase transition |
exp_phase_diagram.py |
Map defect rate across Ξ© regimes |
exp_long_critical_run.py |
Extended run at critical Ξ© |
exp_worldline_interactions.py |
Two-particle interaction experiment |
scattering_experiment.py |
Scattering geometry test |
Key printed diagnostics (periodic):
- average coordination β¨kβ©
- causal depth (L)
- interaction concentration (Ξ¦)
- closure density (Ξ¨)
- hierarchical stability (Ξ©)
| Symbol | Name | Meaning | Target Range |
|---|---|---|---|
| β¨kβ© | Avg coordination | Controls effective dimensionality | β 7.5β8.5 for spacetime-like geometry |
| L | Causal depth | Maximum causal chain length β emergent time | Grows with rewrites |
| Ξ¦ | Interaction concentration | Hub dominance (lower = more uniform) | Small Ξ¦ preferred |
| Ξ¨ | Closure density | Redundancy in causal closure | Non-zero = error correction |
| Ξ© | Hierarchical closure | RG-like stability across scales | > 1.0 for persistent structure |
Phase interpretation:
| Ξ© Regime | Behavior |
|---|---|
| Ξ© < 1.0 (subcritical) | Transient defects, no stable transport |
| Ξ© β 1.08β1.18 (critical) | Phase transition, marginal stability |
| Ξ© > 1.2 (supercritical) | Persistent worldlines, stable emergent structure |
HCSN includes a browser-based visualizer and a Blender pipeline for cinematic rendering:
Browser Visualizer:
python3 visualizer_server.py
# Open visualizer.html in your browserBlender 3D Import:
- Run
export_cinematic.pyto generatecinematic_frames.json - Import into Blender with
blender_importer.py
CSV Export:
python3 export_csv.pyActive directions:
- Prevent metric collapse under coarse-graining
- Implement logarithmic information metrics (holographic scaling tests)
- Enforce holographic bounds dynamically during evolution
- Search for Lorentz-invariant fixed points of the rewrite dynamics
- Derive quantum probabilistic behavior (Born rule) from causal ignorance
We welcome contributions from physicists, mathematicians, and programmers.
Getting started:
- Fork the repo, create a feature branch
- Add reproducible experiments under
sim-exp/ - Document new rules, diagnostics, and observed behaviors
- Open a PR with clear description, expected behavior, and reproducibility notes
Guidelines:
- Seed all RNGs for reproducibility
- New rules or observables belong in
engine/ - Keep experiments modular and self-contained
If you use HCSN in your research, please cite both the paper and the software:
Saif Mukhtar. HCSN: A Hierarchical Causal Structure Network Framework for Emergent Physics. ResearchHub, 2026. DOI: 10.55277/researchhub.fvahxvpt.1
BibTeX:
@article{mukhtar2026hcsn,
author = {Saif Mukhtar},
title = {HCSN: A Hierarchical Causal Structure Network Framework for Emergent Physics},
year = {2026},
doi = {10.55277/researchhub.fvahxvpt.1},
url = {https://doi.org/10.55277/researchhub.fvahxvpt.1}
}Published under the Apache 2.0 licence.
For collaboration or questions, open an issue or contact via GitHub: hcsn-theory
The HCSN Research Group is maintained by @hcsn.
"The universe may not be described by computation β it may be computation."
HCSN treats this as a testable hypothesis: build minimal computational rules and examine what emerges.
Enjoy exploring! π§©