Cohere.org.uk

Made of Maths

Understanding CRR

Stability Through Change: Markovian Agents in a Non-Markovian Field

Featured: Coherence, Rupture & Regeneration Explained

Exploring CRR in Contemporary Contexts

A CRR Philosophical Enquiry

How Memory, Rupture and Renewal Shape Identity

A Coherence, Rupture, Regeneration & FEP Lens on Erikson and Piaget

Coupled Oscillators: The Foundation

CRR builds upon a simple and well-known mathematical phenomenon of coupling, where independent systems influence each other through gradient decent. Like metronomes on a wobbly shelf, individual components synchronise through a common substrate.

Sine Wave Coupling

Two oscillators (black circles) interact through a shared field function. The gradient descent in the script acts as the "wobbly shelf" for the metronomes, a field coupling medium that enables synchronisation.

$$f(x) = \sin(t + x \cdot 0.1) \cdot \cos(t \cdot 0.5 + x \cdot 0.2)$$

This simple coupling demonstrates how a shared mathematical substrate creates interdependence between autonomous agents.

Markovian Oscillators

Independent Evolution:
// Each oscillator evolves independently
a.x += a.velocity * deltaTime;
b.x += b.velocity * deltaTime;
// No shared memory or coupling

Traditional approach: oscillators evolve independently based only on current state.

Field Coupling

Shared Field Coupling:
// Shared field function couples oscillators
let fx = x => Math.sin(t+x*.1)*Math.cos(t*.5+x*.2);
let da = fx(a.x) - fx(b.x);
let move = da * 0.5;
a.x -= move; b.x += move;

CRR approach: oscillators couple through shared mathematical fields that preserve interaction history.

The Mathematical Framework

This coupling behaviour forms the foundation for more complex CRR systems. The shared field acts as a primitive coherence accumulator:

$$\text{Coupling Force} = \alpha \cdot (f(x_a) - f(x_b))$$ $$f(x,t) = \text{Field Function} = \sin(t + \phi(x))$$

Where alpha controls coupling strength and phi(x) creates spatial variation. This simple relationship scales to encompass the full CRR framework through field memory accumulation.

CRR Swarm: Non-Markovian Memory Dynamics

The CRR swarm demonstrates how simple coupling principles extend to complex multi-agent systems. Particles accumulate positional histories and interact through memory-dependent force fields.

Non-Markovian Swarm Behaviour

Each particle maintains a trajectory history and experiences forces based not only on current position but on its complete accumulated path. This creates emergent clustering and memory-dependent dynamics.

$$C(x,t) = \int_0^t L(x,\tau) \, d\tau$$ $$\mathbf{F}_{\text{memory}} = \alpha \cdot \left(\frac{\sum_{i=0}^n w_i \mathbf{p}_i}{\sum_{i=0}^n w_i} - \mathbf{x}_{\text{current}}\right)$$

Where L(x,tau) represents memory denisty, w_i are tunable temporal weights that decay or amplify past positions, {p}_i are historical positions. Alpha controls how strongly the particle is drawn to its memory centroid.

Launch CRR Swarm Simulation

Traditional Swarm

Memoryless Forces:
// Only current neighbor positions matter
for (neighbor of neighbors) {
    force += attraction(particle.pos, neighbor.pos);
}
particle.velocity += force;

CRR Memory Swarm

Historical Integration:
// Entire trajectory history influences motion
p.history.push([p.x, p.y, time]);
let memoryCenter = weightedAverage(p.history);
let memoryForce = (memoryCenter - p.pos) * coherence;
p.velocity += memoryForce;

Reaction-Diffusion with Memory

The most sophisticated example combines classical PDE dynamics with non-Markovian memory coupling. Gray-Scott reaction-diffusion patterns are augmented with memory fields that influence pattern formation.

Memory-Augmented Pattern Formation

Standard reaction-diffusion follows the Gray-Scott equations. Our enhancement adds memory terms that accumulate pattern history and create feedback coupling:

$$\frac{\partial u}{\partial t} = D_u \nabla^2 u - uv^2 + F(1-u) + \beta(m-u)$$ $$\frac{\partial v}{\partial t} = D_v \nabla^2 v + uv^2 - (F+k)v$$ $$\frac{\partial m}{\partial t} = \lambda(u - m)$$

Where m is the memory field, lambda controls memory integration rate, and beta couples memory back to the reaction term.

Memory-Augmented Gray-Scott RD
Click+Drag to disturb | 'R' to reset
λ=0.02 | β=0.18

Classical Gray-Scott

Standard RD:
// Classical reaction-diffusion
const dU = Du*laplacian(u) - u*v*v + F*(1-u);
const dV = Dv*laplacian(v) + u*v*v - (F+k)*v;
u += dU * dt;
v += dV * dt;

Patterns emerge from local interactions only, with no system memory.

Memory-Coupled RD

Non-Markovian Enhancement:
// Memory accumulation
const mem = m + lambda*(u - m);
// Memory-coupled reaction
const dU = Du*laplacian(u) - u*v*v + F*(1-u) + beta*(mem-u);
u += dU * dt;

Patterns influenced by accumulated history, enabling learning and adaptation.

Key Mathematical Innovation

The memory field m(x,t) acts as an exponential moving average of the activator concentration:

$$m_t = (1-\lambda)m_{t-1} + \lambda u_t$$

This creates a temporal smoothing that remembers past activator states. The coupling term beta (m-u) then pulls the current state toward this historical average, creating pattern stability and enabling complex adaptive behaviours.