Abelian Sandpile — Group Identity Element

The abelian sandpile model on an N×N grid forms a group under addition+toppling. The identity element is the unique recurrent configuration that, when added to any recurrent config, leaves it unchanged. Computing it reveals stunning fractal self-similar patterns.

Controls

Click "Compute Identity"
Sandpile group G = Rec/~
Toppling: if z[i]≥4, z[i]-=4,
neighbors += 1 (with sink bd)
Identity e: a⊕e = a ∀ recurrent a
|G| = det(Δ) (Matrix-Tree thm)
Identity ≈ 2·max_stable - (2+max_stable°2)
where ° = abelian sandpile group op