Marine Ecosystem Simulation (Optimised)

High-Fidelity Coherence-Rupture-Rebirth Dynamics • 60 FPS

Computational Optimisations

Spatial Hash Grid: O(n²) → O(n) for neighbor queries. Each entity stored in grid cell for constant-time lookup.

Object Pooling: Reuse plankton objects instead of GC thrashing. ~90% reduction in allocations.

Staggered Updates: Environmental fields update 1/3 per frame. Not all entities update simultaneously.

LOD System: Distant/small entities use simplified rendering. Detail scales with coherence.

Typed Arrays: Float32Array for fields provides ~2x faster access than standard arrays.

Cached Calculations: Pre-compute expensive operations (sin/cos, sqrt) and reuse.

Core CRR Framework

Non-Markovian dynamics with full memory integration:

dx/dt = f(x,t) + ∫₀ᵗ K(t-τ)·x(τ)·exp(C(τ)/Ω) dτ

where C(t) = ∫₀ᵗ L(x,τ) dτ accumulates over entire history.

Environmental Coupling

All agents couple through shared environmental fields:

L_total = L_intrinsic + Σⱼ κⱼ·Φⱼ(x,t)

Φⱼ: nutrient field, current field, temperature field, oxygen field

Performance Metrics

• Spatial hash: 60×60 cells, O(1) insertion/lookup

• Object pool: 500 pre-allocated plankton, zero GC during runtime

• Field updates: 33% per frame (20ms budget), full refresh every 3 frames

• LOD thresholds: coherence < 20 = low detail, > 80 = high detail

• Cache lifetime: 5 frames for expensive trig operations

FPS: -- | Entities: --

Environmental Processes

Physical
Biological
CRR Dynamics
Exchange
Coral Polyps
0
Avg coherence: 0
Fish Population
0
School coherence: 0
Plankton Density
0
Active particles
Water Temperature
26°C
Stratification: Low
Dissolved Oxygen
8.2
mg/L (Normal)
Ecosystem Coherence
0
Rupture events: 0