Abelian sandpile four grains and it topples

Each cell of an n×n grid holds grains. A cell with 4 or more topples: it gives one grain to each of its four neighbours, and grains pushed off the edge are lost. Bak, Tang and Wiesenfeld (1987) used this toy for self-organised criticality; Dhar (1990) noticed the end result never depends on the order of topplings, so stable piles can be added — and the recurrent ones form a finite abelian group with as many elements as the grid has spanning trees.

Colour = height: 0 1 2 3. Click the grid to drop a grain.

grid

heights of the driven pile — centre window, vs the exact infinite-lattice law

bigger than a browser tab wants to compute

identity element of the 512 by 512 sandpile
identity of the 512×512 grid
2 to the 20 grains dropped on one site
2^20 grains on one site

the group — order and invariant factors of Zn² / Δ Zn²

checks

single-source piles