Sandpile

Abelian · 19 × 19 · open edges

Toppling
0Grains
0Topplings
0Escaped
Ready
Your browser needs canvas support to display this sandpile.

Tap to add · Drag any direction to orbit

Square 10, 10

3 grains · 4 to topple

Sandbox board

Start a fresh board at this size. Random fills each square with 0–3 grains; Blank starts empty. Reset repeats this choice, with fresh grains for Random.

Play levels

Tutorial

Abelian sandpile

A little grain. A big reaction.

01

Pour some sand.

Choose a drop size in the toolbar, then tap a square or the Drop button. Hold the button to keep pouring onto the highlighted square. New drops arrive while the pile is toppling.

02

Four is the tipping point.

A stack with four or more grains turns red and gives one grain to each of its four neighbors per topple. Large stacks topple in batches. Tall stacks are drawn shorter, with a label showing their exact grain count.

03

Watch it settle.

The reaction continues until every stack has fewer than four grains. Escaping grains arc over the edge and fall away. Turn the board to see the other sides.

04

Turn it around.

Drag to turn around the board and tilt from a low angle to straight overhead. The table always stays upright. The curved arrows make a quarter turn; tap the angle between them to reset the camera. Isometric and Top down move the camera to those positions. Turning the camera never changes the pile.

05

See every square.

As you look down from above, grain-count colors and numbers fade in automatically. Tilt away and the sand-colored blocks return. Shades distinguish 0, 1, 2, and 3 grains; unstable cells use red shades that darken as the count grows. Bright red borders mark the current toppling wave. Top down aligns the square with the screen and locks the camera overhead while still letting you rotate. Choose Isometric to unlock the tilt. Scroll over the board to zoom, or use the − and + buttons.

Why “abelian”?

For the same starting pile and added grains, every legal toppling order reaches the same stable configuration. Here, topplings happen in simultaneous waves.

Play levels starts with a three-step tutorial. Complete it to unlock Avalanche and Match the Pattern. Trigger the biggest avalanche with a limited supply, or match a target within the move allowance shown above the board. Each grain is one move. Boards at the limit cannot accept more sand; choose an earlier board to try another path. Retry any challenge. Tutorial completion, completed levels, and best scores are remembered on this device when browser storage is available. Sandbox keeps your pile, counters, settings, and view when you switch modes; unfinished reactions pause until you return. Board setup chooses the sandbox size and a Random, Blank, or Center pile start. Start new board applies the settings and resets the counters. Reset repeats the selected start, generating fresh grains for Random; Clear empties the board at its current size. With a keyboard, use arrow keys to choose a square, Space or Enter to drop, Q or E to rotate, and W or S to tilt.

Match the Pattern: explore the paths.

Tap a square on any board to drop a grain onto a new copy. The old board stays. Matching states join together. Drag inside a board’s box to turn every board and the target together; drag outside the boxes to pan. Pinch or scroll to zoom, and tap the zoom percentage to see all boards. At a small overview scale, tap a board to zoom in first. With the canvas focused, [ and ] select a board, arrow keys select a square, and Space drops a grain. Each cascade settles before the next branch; your score is the shortest path you discover to the target. You can keep exploring after a win.

Versus: red against blue.

Start with an empty 3 × 3 board. Red goes first, then take turns adding one grain to an empty square or your own pile. Four grains topple as usual. A grain arriving from a toppling pile captures the whole neighboring pile, and any chain reaction keeps the mover’s color. Gold outlines mark toppling piles. Grains still fall off the edges. Once both players have played, the first player to leave all the sand their color wins after the cascade settles. New match starts again; switching modes pauses your match.

For the facilitator

For the facilitator

Ready for someone new?

This clears all level progress, best scores, and the current boards, then returns to the welcome screen.