Waves move sand. The moved sand bends the next wave. This page runs the same simulation as the ComputingBeachClaude repository, live in your browser. Play a swell and watch it write the floor. Send a faint ping and hear what the floor says back.
New: Beaches as attention, a crossbar of sand basins that stores key-value pairs, and shows why linear attention and the delta rule are what sand with a habit does.
Darker blue is deeper water, where waves run faster. Light swirls are the waves. Magenta marks sand the waves have already moved.
The ping is heard at the south harbour. A ping is too weak to move sand.
Each swell leaves bars spaced half its wavelength apart: long swells write coarse print, short swells write fine print. On real coasts, bars like these reflect the very wave that made them (Bragg reflection by sandbars). The shortest swell here is at the limit of this 96-cell grid.
Two identical beaches get the same two storms, in opposite order. Then a third storm hits both (optional). Then both are pinged. In the experiments, the sand tells the orders apart on 98 % of unseen beds, and still 99–100 % after the third storm. Read through a ping, it is 70–75 %.
Navy: the first beach's echo. Grey: the second's. Magenta: their difference, magnified 50×.
This bed was shaped by gradient descent so that the low note reaches the north harbour and the high note the south harbour. The waves didn't learn this by themselves; that part failed in the experiments.
Pick a note. The bars settle after a few seconds.
Every number above has a pre-registration, a script and a results file in the
repository. The sister repository is
ComputingBeachSol; the cavity reader is from
WallMemoryLaw. This page's physics is checked against the
Python to 5e-13 (tests/check_js.mjs).