Labs / Afterlight
Original experiment Exactly reversible Particle-conserving

Afterlight

Six-colour rays move across a hexagonal lattice. When they collide they turn, flip one bit of memory in the cell beneath them, and change how the next collision will behave. Nothing is created, nothing is destroyed, and time runs both ways.

Write into the light. Plant six-way pulses, drag currents in any direction, or paint the hidden left/right memory that steers future collisions. Let a scene become complicated, reverse it, and watch it find its exact beginning.

A world with no forgetting

Most cellular automata throw information away. In Life, several different generations can collapse into the same empty field, so there is no unique way to discover what came before. Afterlight was designed around the opposite demand: every state must have exactly one predecessor.

That constraint changes the character of the world. There are no births and deaths, only particles changing direction. Apparent disorder is folded-up information, not destroyed information. The Reverse time control is not a recording and does not replay cached frames; it computes the unique previous generation from the state currently on the canvas.

The rule

Every hexagon contains six one-bit channels — one for a ray travelling in each direction — and one stationary bit of handedness. That is a 128-state cell, but its transition needs only three cases.

01

Pairs turn

Exactly opposed rays rotate 60° left or right, chosen by the cell's memory. Then that memory flips.

02

Triples invert

Three alternating rays change to the complementary three channels. The cell's memory flips here too.

03

Everything streams

After collisions, every ray advances one hexagon in its direction. Every other configuration passes unchanged.

Why the inverse is exact

A collision performed twice restores both the rays and the memory bit; mathematically it is an involution. Streaming is only a permutation of channels. To go backward, Afterlight unstreams once and applies the same collision table. The test harness exhaustively checks all 128 local states and runs every preset 1,200 generations forward and backward.

The medium remembers

A conventional lattice gas has particles and collisions, but the space they cross is passive. Here every qualifying collision flips the handedness of its hexagon. When another pair arrives later, it is deflected the other way. The traffic writes a one-bit fossil record into the substrate, and that record feeds back into future traffic. Select Memory view to see it directly.

The fading colour behind a ray is only a visual afterimage; it is not part of the rule. The actual automaton remembers through those left/right bits alone. Particle count beside the canvas is similarly not an estimate: the collision table preserves it exactly on every tick.

Experiments worth trying

  • Run The Loom for a few hundred generations, reverse time, and wait for the three immaculate families of threads to return.
  • Choose Orrery, switch to Memory view, and watch sparse collisions slowly write a sixfold map into an initially blank field.
  • Paint a stripe with the Memory tool. It acts like glass with the opposite chirality, bending later head-on traffic the other way.
  • Turn sound on for Aurora gas. The low chord follows collision density; reversing produces the same score in the opposite order.
  • Reverse a scene, intervene with a pulse, then run forward. You have changed the present, so the rule constructs a different but still valid past and future.

Original, with an ancestry

Afterlight's particular seven-bit cell and memory-flipping collision table were designed for this site. It would be irresponsible to claim that no one has ever written an equivalent rule: the space of cellular automata is enormous and the literature is older than the web. Its intellectual ancestry is the reversible lattice-gas tradition developed by Toffoli and Margolus, where computation and physical law are built from local, conservative collisions. Their Cellular Automata Machines established that laboratory; a later paper by Toffoli, Capobianco and Mentrasti makes the relationship between cellular automata and lattice gases precise. The new ingredient here is a collision that changes the local medium while remaining its own exact inverse.