GOL-015 · technical companion

Rewind Life

Each position keeps a private occupancy history: local crowding can send it backward through its own past until another neighbor count, the oldest retained state, or a duration cap releases it.

At a glance

geometry
Square lattice + private per-position history
neighborhood
Moore · 8 adjacent cells
states
Dead / alive + direction + 32-state history + rewind age
update
Synchronous Life or destructive local history playback
renderer
Canvas 2D

What to explore

The experiment should make local time direction visible. Forward cells should still form a recognizable configurable Life field, while rewind triggers produce coherent flashes and trails of cells replaying states that no longer agree with their present neighborhood.

A correct implementation is not sufficient if rewind almost never occurs, if it immediately releases everywhere, or if history behaves like a decorative color instead of determining occupancy. The authored default must sustain both forward and rewinding positions and must exercise more than one release path.

Rules, update order and replay

The world is a square grid. Every position reads the eight-cell Moore neighborhood from one frozen current board, with either toroidal or bounded edges. Updates are fully synchronous and make no random calls after construction.

Each position owns visible occupancy plus a private stack of its last 32 forward states, a forward/rewinding mode, the number of history-controlled steps in the current rewind, and last-transition evidence. The stack includes the current occupancy. Once full, a new forward result discards the oldest retained state.

On each Step:

  1. A forward position whose current neighbor count matches the reverse-trigger mask and whose history contains an earlier state immediately enters rewind. It removes its current history entry and emits the new top entry. Ordinary Life is not evaluated for that position on that Step.
  2. A forward position without an actionable reverse trigger evaluates the configured birth or survival mask and appends that result to its history. A trigger at the oldest retained state cannot rewind and therefore falls through to ordinary Life.
  3. A rewinding position first checks the configured forward-release mask. A match releases it immediately; ordinary Life determines and appends that Step's result.
  4. If no forward condition matches but the position has already consumed the configured maximum number of rewind steps, it is released through the same ordinary-Life path.
  5. Otherwise it removes one history entry and emits the newly exposed prior occupancy. Reaching the oldest retained entry releases the position for the following Step.

The release checks use the current visible neighbors even though a rewinding position ignores ordinary Life. Reverse and forward masks may overlap: their meaning depends on the position's current direction, so an overlap can create a one-step rewind followed by release when the count persists. The duration is a maximum number of history-controlled Steps, not a guaranteed minimum.

Step advances this contract exactly once. Reset reconstructs the selected board, sets every private history to its one-entry initial occupancy, places every cell forward, clears rewind counters/evidence, and returns generation to zero. Exact replay requires the initial-condition ID or random seed/density, field profile, topology, four masks, duration, generation, occupancy, history bits and lengths, direction modes, rewind counters, and last-event evidence.

Reading the simulation

The normal color view uses lime for forward life, violet for rewinding life, indigo for a rewinding dead position, cream for condition release, blue for duration release, pale mint for arrival at the oldest history entry, and coral when reverse playback exposes a dead state. A simplified view shows only dead and alive.

Inspection pauses simulation, outlines the selected cell and its eight frozen neighbors, and reports current occupancy, current direction, neighbor count, history depth, rewind steps, the relevant trigger/release match, ordinary Life's hypothetical result, the exact next result, and the reason for it. The canvas label, legend, instructions, and written inspector repeat these meanings so color is never the only explanation.

Reproduce an opening

Download the example above, open the simulation, expand the controls, then use Share & reproduce → Import JSON. The example uses authored rules and a fixed seeded starting field; it is independent of the site’s editable default composition. Import starts paused at Step zero.

Share links and JSON reproduce the configured starting conditions, including hidden layers rebuilt by Reset. They do not save an evolved board, hand-painted cells, speed or display preferences. Determinism applies to the same rule version and Step sequence; real-time playback rates vary by device.

Larger fields and more involved rules can reduce playback speed. Read the configuration format and automated-access guide for compatibility details.