Skip to content

kunalb541/CA

Repository files navigation

Local Topological Fragility in Game of Life and HighLife

Kunal Bhatia · Independent Researcher, Heidelberg, Germany
ORCID: 0009-0007-4447-6325


Core result

Future fine-scale connected-component loss in GoL and HighLife is controlled by local topological fragility: the initial density of weakly-connected or isolated live cells. A topology-baseline battery of 16 statistics identifies a predictive hierarchy from initial component count down to embedded isolates — the most mechanistically transparent motif in the family.

Specifically:

  1. Topology hierarchy. Initial component count C(0) is strongest (mean residual R² = 0.352); small components (≤4 cells) next (0.330); singleton/orth-degree-zero cells (0.274); embedded isolates (0.234) as the mechanistically transparent motif.
  2. Prestate prediction. t=0 iso_count alone explains a substantial fraction of residual fine-component change: mean prestate R² ≈ 0.241, minimum R² ≈ 0.175 at k=200.
  3. Target-specific selection. iso_count gives a selective incremental lift for the fine-net target; both iso-shuffle and target-shuffle nulls are near zero (ΔR² < 0.001).
  4. Negative temporal response. β_iso(k) ≈ −0.70 to −0.80 across all tested horizons k ∈ {1,5,10,25,50,100,200}, two rules (GoL + HighLife), two grid sizes (L=64,128), four density bands. All 112 condition-horizon slopes are negative.
  5. Mechanism: local component-context loss. Any orth-degree-zero cell with Moore degree 0 or 1 dies exactly under S23; multi-diagonal isolates often survive-connected. Local-window loss CV R² = 0.538 vs iso_count alone = 0.355.
  6. Two-layer amplitude structure. Standardised mechanism is transferable; raw amplitude is predictable from (L, ρ) with LOO R² = 0.970 (size+ρ model).

Repository structure

ca.py                    # Core simulation engine (GoL/HighLife BFS, isolate classifier)
test_regression.py       # 93 regression tests covering all results + artifact generator
scripts/                 # Analysis scripts (run from repo root)
  ca_selection_principle_test.py
  ca_horizon_response_test.py
  ca_isolate_fate_mechanism.py
  ca_isolate_transition_classes.py
  ca_lgds_bridge_test.py
  ca_mechanism_transfer_test.py
  ca_mechanism_transfer_standardized.py
  ca_mechanism_amplitude_law.py
  ca_prestate_class_horizon_test.py
  make_response_law_artifacts.py      # generates all figures, macros, tables
  ca_topology_baseline_controls.py   # topology baseline controls (16 statistics)
outputs/                 # All simulation outputs (pre-computed)
  selection_principle/
  selection_principle_horizon/
  isolate_fate/
  isolate_transition_classes/
  ca_lgds_bridge/
  mechanism_transfer/
  mechanism_transfer_standardized/
  mechanism_amplitude_law/
  prestate_class_horizon/
  topology_baselines/    # 16-statistic baseline battery (112 condition-horizon cells)
  data/                  # Per-figure source CSVs (fig1–fig7) + Study A–D stats JSON
paper/                   # Manuscript sources
  paper.tex              # Lean journal version (19 pages)
  paper.pdf
  paper_full_preprint.tex  # Full preprint (23 pages; adds Fig. 8 + background appendix)
  paper_full_preprint.pdf
  appendix_background.tex  # Background Appendix C (included by full preprint only)
  refs.bib
  macros.tex             # auto-generated LaTeX macros (letters-only names)
  build.sh               # compiles both paper.pdf and paper_full_preprint.pdf
  figures/               # 8 flagship figures + 4 background lineage figures
  tables/
paper.pdf                # Lean journal version (root copy)
paper_full_preprint.pdf  # Full preprint with Fig. 8 + background appendix (root copy)
build.sh                 # Root build script

Paper structure

Lean journal version — paper.pdf (19 pages)

Section Content
I Introduction
II Definitions and Protocol
III Target-Specific Selection and Non-Leaky Prestate
IV Temporal Response Curve
V Mechanism: Local Component-Context Loss
VI Robustness: Transfer, Amplitude, and Local Baselines
VII Discussion
VIII Conclusion
App. A Regression Details and Null Definitions
App. B Transition-Class Coding

Full preprint — paper_full_preprint.pdf (23 pages)

Same main text plus Fig. 8 (task-direction coherence diagnostic) in the Discussion and Appendix C: Background Observer-Scale Diagnostics (Figs E1–E4).

Background lineage figures (full preprint only)

Earlier observer-scale diagnostics motivated the target-specific framing. Generated by the artifact script and kept in paper/figures/ and outputs/data/ for reproducibility; included in paper_full_preprint.pdf only.

Figure File Data source Content
E1 figE1_disagreement_scatter.pdf fig1_studyA_scatter_source.csv Observer gap G vs early fine change, r = −0.765
E2 figE2_trajectories.pdf fig2_studyA_traces_source.csv Fine/coarse cumulative trajectories for max/min G worlds
E3 figE3_scale_R2.pdf fig4_studyB_r2_vs_B_source.csv R² vs block size B per target
E4 figE4_old_slopes.pdf fig6_studyD_slope_summary_source.csv Old GoL-only β ≈ −1.52 slopes (different protocol; not comparable to new β ≈ −0.70)

Requirements

Python 3.11 (tested). Install dependencies with:

pip install -r requirements.txt

Dependencies: NumPy, SciPy, pandas, Matplotlib, seaborn, scikit-learn, tqdm, pytest. Compiling the PDFs additionally requires a LaTeX distribution (pdflatex + bibtex).


Reproducing paper artifacts from existing outputs

./build.sh

This runs scripts/make_response_law_artifacts.py (reads outputs/, writes paper/figures/ — 8 flagship + 4 background lineage figures — and paper/tables/), then compiles both paper.tex and paper_full_preprint.tex, producing paper/paper.pdf (19 pages, lean journal version), paper/paper_full_preprint.pdf (23 pages, with Fig. 8 + background appendix), and root copies of both.

No simulations are re-run. All pre-computed outputs are committed to outputs/.


Rerunning individual analyses

All scripts are in scripts/ and should be run from the repo root:

source /path/to/env/bin/activate   # activate your Python environment
python scripts/ca_selection_principle_test.py
python scripts/ca_horizon_response_test.py
python scripts/ca_topology_baseline_controls.py   # ~45 min full run; --quick for smoke test
# etc.

Outputs are written to outputs/<module>/.


Running tests

pytest test_regression.py -v

93 tests cover:

  • BFS component counter and isolate classifier correctness
  • Selection principle: target-specific incremental lift, both shuffle nulls near zero
  • Temporal response: all 112 slopes negative, bootstrap CIs negative, R² above floor
  • Mechanism ordering (local-window > iso_count > coarse)
  • Standardised transfer (frac R²-positive = 1.0)
  • Amplitude-calibration LOO R² thresholds
  • LGDS / task-direction coherence (Fig. 8; full preprint only)
  • Prestate non-leakiness across all horizons
  • Artifact generator: no NaN macros, no digit macro names, all figure PDFs present
  • Background lineage figures E1–E4 present and source data non-empty

License

MIT — see LICENSE.

About

Local topological fragility controls future fine-scale structure loss in Conway's Game of Life and HighLife — a predictive and causal study of cellular-automata dynamics.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors