Skip to content
Structural Selection
Part VAppendix2 min read·398 words

Appendix A: Full Simulation Code

Reading widthWidth
Text sizeText

Appendix A: Full Simulation Code

This appendix presents the full reference implementation used to generate all numerical results discussed in the paper. The code is written in a modular form to emphasize conceptual clarity over optimization. It can be translated directly into Python, Julia, C++, or similar languages.

A.1 Overview of the Algorithm

The simulation proceeds in four stages:

  1. Generate candidate parameter sets.
  2. Evaluate each set using the pre-physical selection functional Ξ\Xi.
  3. Evolve the informational field I(x,t)I(x,t) for selected parameters.
  4. Measure emergent observables (entropy, locality, cores).

Only parameter sets that pass the selection criteria are evolved dynamically.

A.2 Parameter Selection via Ξ\Xi

function Xi_evaluate(params):
    simulate_short_run(params)
    if divergence_detected:
        return -infinity
    if no_locality_emerges:
        return -large_penalty
    return alpha*C + beta*S + gamma*G - delta*D

Here:

  • CC measures internal consistency,
  • SS measures long-term stability,
  • GG measures structural richness,
  • DD penalizes unnecessary complexity.

A.3 Lattice Initialization

Nx, Ny = grid_size
I = random_noise(Nx, Ny, amplitude=epsilon)
D0 = initial_diffusion

Initial noise seeds symmetry breaking. No structure is imposed.

A.4 Time Evolution Loop

The core evolution follows the discretized form of:

tI=(DI)+αIβI3+η.\partial_t I = \nabla\cdot(D\nabla I) + \alpha I - \beta I^3 + \eta.
for t in range(T_max):

    D_eff = D0 * exp(-t / tau)

    laplacian_I = compute_laplacian(I)

    dI = D_eff * laplacian_I
         + alpha * I
         - beta * I**3
         + noise(t)

    I = I + dt * dI

    if max(I) > I_crit:
        mark_black_hole_region()

    record_observables(I)

A.5 Observables

Entropy:

S(t)=IlogIS(t) = -\sum I \log I

Locality measure:

L(t)=I2L(t) = \langle |\nabla I|^2 \rangle
entropy[t] = -sum(I * log(I))
locality[t] = mean(gradient(I)**2)

Dense cores are identified by thresholding:

I>Icore.I > I_{\rm core}.

A.6 Black Hole Identification

if I[x,y] > I_crit:
    diffusion[x,y] = 0
    freeze_local_dynamics()

This implements conditional singularities without divergence.

A.7 Termination Conditions

The simulation halts if:

  • entropy diverges,
  • II exceeds numerical bounds,
  • no locality emerges after TmaxT_{\rm max}.

Such runs are classified as failed worlds and excluded.

A.8 Output and Reproducibility

All simulations output:

  • entropy vs. time,
  • locality vs. time,
  • final I(x)I(x) distribution,
  • identified dense cores.

Random seeds are recorded to ensure reproducibility.

Note: All figures in the main text and appendices are generated directly from this code without post-processing or manual adjustment.

Source: latex/A01_Full_Simulation_Code.tex in the verified v2 revision. Found an issue with this section? Submit a criticism.
Cite this section

Plain text

Hassan, A. (2026). Appendix A: Full Simulation Code. In Pre-Physical Selection & Emergent Reality, The Complete Structural Selection Corpus. Nuronova Genix Corp. https://structuralselection.org/book/appendix/appendix-a-full-simulation-code

BibTeX

@incollection{hassan2026appendixafullsimulat,
  author    = {Hassan, Akram},
  title     = {Appendix A: Full Simulation Code},
  booktitle = {The Complete Structural Selection Corpus},
  publisher = {Nuronova Genix Corp},
  year      = {2026},
  url       = {https://structuralselection.org/book/appendix/appendix-a-full-simulation-code}
}

RIS

TY  - CHAP
AU  - Hassan, Akram
TI  - Appendix A: Full Simulation Code
T2  - The Complete Structural Selection Corpus
PB  - Nuronova Genix Corp
PY  - 2026
UR  - https://structuralselection.org/book/appendix/appendix-a-full-simulation-code
ER  -