CRR Framework: Moss Biology (Bryum capillare)

d/dt(∂L/∂ẋ) - ∂L/∂x = ∫₀ᵗ K(t-τ)φ(x,τ)e^(C(x,τ)/Ω)Θ(t-τ) dτ + Σᵢ ρᵢ(x)δ(t-tᵢ)
Complete CRR Mathematical Implementation & Code Mapping
DIRECT MATHEMATICAL IMPLEMENTATION:
This simulation explicitly computes:
Lagrangian density L(x,t) from biomass, carbon, reproduction, stress memory
Coherence C(x,t) = ∫₀ᵗ L(x,τ)dτ via temporal integration
Memory kernel K(t-τ) = λe^(-λ(t-τ)) via exponential relaxation
Rebirth weight exp(C/Ω) directly in growth calculations
Rupture conditions as threshold crossings → δ(t-tᵢ) events
1. LAGRANGIAN DENSITY L(x,t)
Mathematical Definition:
L(x,t) = L_biomass + L_carbon + L_reproduction + L_memory

where:
L_biomass = (protonema + gametophore + buds + rhizoids) × w_biomass
L_carbon = carbon_density × w_carbon
L_memory = growthMemory × w_mem
Code Implementation:
computeLagrangian(idx) {
  const biomass = this.protonema[idx] + this.gametophore[idx] +
                this.buds[idx] + this.rhizoids[idx];
  const carbon = this.carbon[idx];
  const memory = this.growthMem[idx];
  return biomass * 1.0 + carbon * 0.8 + memory * 0.3;
}
Physical Interpretation: The Lagrangian measures "organized biological activity" - higher L indicates more structured, energy-rich, reproductively capable moss tissue.
2. COHERENCE FUNCTIONAL C(x,t) = ∫₀ᵗ L(x,τ)dτ
Mathematical Definition:
C(x,t) = ∫₀ᵗ L(x,τ) dτ
Accumulated "action" or "organized complexity" over system history
Discrete Time Integration:
C(x, t+Δt) = C(x,t) + L(x,t) × Δt
Code Implementation:
updateCoherence(dt) {
  for (let i = 0; i < this.cells; i++) {
    this.lagrangian[i] = this.computeLagrangian(i);
    this.coherence[i] += this.lagrangian[i] * dt;
    if (this.coherence[i] > 10) {
      this.coherence[i] = 10 + Math.log(1 + this.coherence[i] - 10);
    }
  }
}
Key Property: C is monotonically increasing between ruptures (dC/dt = L ≥ 0), and only resets/jumps at rupture events. This accumulated history exponentially weights future dynamics.
3. MEMORY KERNEL K(t-τ) = λe^(-λ(t-τ))
Mathematical Form:
K(t-τ) = λ exp(-λ(t-τ))
Exponential memory decay with characteristic time 1/λ
Integral Form (what appears in CRR equation):
∫₀ᵗ K(t-τ) × signal(τ) dτ
Equivalent Differential Form:
dmemory/dt = λ(signal - memory)
This first-order ODE has the same solution as the integral form
Code Implementation:
updateMemory(lambda) {
  for (let i = 0; i < this.cells; i++) {
    const totalBiomass = this.protonema[i] + this.gametophore[i] +
                        this.buds[i] + this.rhizoids[i];
    this.moistureMem[i] += lambda * (this.moisture[i] - this.moistureMem[i]);
    this.nutrientMem[i] += lambda * (this.nutrients[i] - this.nutrientMem[i]);
    this.growthMem[i] += lambda * (totalBiomass - this.growthMem[i]);
  }
}
Default λ = 0.025: This gives memory timescale τ_mem = 1/λ = 40 timesteps. Past signals decay to ~37% after 40 steps, ~13.5% after 80 steps.
4. REBIRTH WEIGHTING exp(C/Ω)
Mathematical Definition:
R_χ(x,t) = ∫₀ᵗ φ(x,τ) exp(C(x,τ)/Ω) Θ(t-τ) dτ
Regeneration/growth weighted exponentially by accumulated coherence
Code Implementation:
// Growth rate calculation (simplified example):
const coherenceWeight = Math.exp(fields.coherence[idx] / this.omega);
const baseGrowthRate = nutrientSignal * moistureSignal * (1 - stress);
const effectiveGrowthRate = baseGrowthRate * coherenceWeight;
Physical Meaning: Regions with high accumulated coherence (C) regenerate/grow exponentially faster. This creates positive feedback: successful regions become more successful, leading to self-organized patterns.
⚠️ Numerical Stability: Since exp(C/Ω) can grow unbounded, we cap coherence or use soft saturation: exp(C/Ω) → tanh(C/Ω) for large C, or enforce rupture before explosion.
5. RUPTURE δ(t-tᵢ) IMPLEMENTATION
Mathematical Definition:
Σᵢ ρᵢ(x) δ(t-tᵢ)
Discrete discontinuous jumps at rupture times {tᵢ} with amplitudes ρᵢ(x)
Rupture Condition:
Rupture occurs when: stress(t) > θ_effective(x,t)
where: θ_effective = θ_base × (1 + μ × stressMemory)
Code Implementation:
// Check rupture condition:
const stress = this.sim.env.getStress();
const adaptiveThreshold = STRESS.RUPTURE * (1 + cell.stressMemory * 0.3);

if (stress.combined > adaptiveThreshold && Math.random() < ruptureProb) {
  // RUPTURE EVENT
  cell.energy *= 0.7; // amplitude ρᵢ = -0.3 × energy
  fields.coherence[idx] *= 0.5; // partial coherence loss
  // This is the δ(t-tᵢ) discontinuity
}
Biological Mapping: Cell death (energy → 0), tissue damage (biomass reduction), reproductive dispersal (spore release) are all rupture events with different ρᵢ amplitudes.
COMPLETE IMPLEMENTATION MAPPING:
CRR Mathematical Term Code Implementation Status
L(x,t) computeLagrangian() from biomass + carbon + memory ✓ Direct
C(x,t) = ∫₀ᵗ L dτ coherence[i] += L(i) × dt each timestep ✓ Direct
K(t-τ) = λe^(-λ(t-τ)) memory += λ(signal - memory) ✓ Exact (differential form)
exp(C/Ω) Math.exp(coherence / omega) ✓ Direct
ρᵢ(x)δ(t-tᵢ) Threshold crossing → discrete state jump ✓ Discrete approx
φ(x,τ) moisture × nutrients × (1-stress) × (1-density) ✓ Phenomenological
Key Point: This is not an analogy or metaphor. The CRR mathematical objects (L, C, K, exp(C/Ω), δ) are explicitly computed in the simulation code. The moss behavior emerges from these CRR dynamics.

Visualisation Mode

Showing moss colony structure with photorealistic rendering
Click: Add spores • Right Click: Add water • Shift+Click: Add nutrients • R: Reset • S: Trigger spores • Space: Play/Pause

Environmental Parameters

Temperature: 22°C
Humidity: 80%
Light: 35%
CO₂: 400ppm
pH: 6.5

Colony Metrics

Protonema: 0 µm
Gametophores: 0
Carbon: 0 µg
Sporophytes: 0

CRR Metrics (Computed)

⟨L⟩ (avg Lagrangian): 0.000
⟨C⟩ (avg coherence): 0.000
⟨exp(C/Ω)⟩: 1.000
Memory influence: 0%

Environmental Health

Temperature
Humidity
Light
CO₂
pH

CRR Parameters

λ (memory decay): 0.025
Ω (temperature): 2.0
β (coupling): 0.15
Speed: 1x