# GOL-027: Wandering Memory

Living and dead entities wander with private compasses and rolling memories. Shared codes and repeating segments in their life histories trigger travel or settlement.

[Open simulation](https://100gol.com/experiments/027) · [Directory](https://100gol.com/experiments)

## What to explore

Make identity persist through travel, death and revival. Let exact shared life-history
patterns and repeated segments switch entities between inertial movement and settled Life. Movement need
not locate better community: direction is internal, not a global search. No
sustained-life or flocking outcome is promised.

## Rules, update order and replay

Square 80/120/160 grid, toroidal by default, optional bounded edges. A location is
vacant or holds one entity, alive or dead. Only living Moore neighbors count.
Every entity owns an ID (inspection only), life, mode, compass, seeded permanent
rotation sense, compass clock, travel heading, one eight-bit alive/dead history register
and valid history length, plus a 64-bit repetition register, valid length and
one-shot match latch. Mobility and settlement codes belong to the shared rule
configuration, not to individual entities. Each location owns a seeded compass
birth stream, which stays there. Initial compasses use seeded random headings among all eight directions; initial mode is settled and no
completed history is invented. Empty locations have no entity memory.

Each Step freezes the old world. On an entity's first update only, the community
minimum chooses its starting mode. Thereafter exact suffix matches against its
completed alive/dead history choose mobile or settled; neither or both matching
retains the existing mode unless a fresh repetition match overrides it. A match requires the full configured length (2–8),
including leading zeroes. Every entity compares against the same two codes in the
rule configuration. Each code has its own length of 2–8 digits and is directly
editable with binary buttons. Defaults are mobility 1110 and settlement 1111,
both four digits: recent death can release a settled entity, while repeated life
can stop a traveler. Shortening a
code drops its oldest digits; lengthening prepends zeroes. Pattern edits preserve
the board and entity histories, pause playback and invalidate previous evidence.
Mode history is not
recorded. Mobile entities preserve life, so mixed settlement codes can leave them
traveling indefinitely after old mixed history rolls away. No hidden Life update
is added to prevent that outcome.

Settled entities apply B3/S23 to frozen living Moore counts at their current
location. Death preserves the entity; birth revives it without replacing identity.
Mobile entities preserve life/death and capture their current compass on entry.
Existing mobile entities retain heading even through blocks. Every Step, propose
one adjacent location in that heading. Movement cadence is fixed at one.
Frozen occupied locations (alive or dead, staying or departing) block; off-field
bounded moves block. Multiple claims on an empty destination all fail. No retries,
swaps, follow-through, arbitrary winners or evolution randomness. Crossing paths
are allowed. A unique arrival has priority over a proposed birth there.

Vacant locations at or above the community minimum use the birth mask. Successful
birth creates a fresh settled entity with seeded random heading and sense; departed
origins remain vacant this Step. Arrivals are not retested until the next Step.
All actions commit simultaneously. Existing entities tick their compass after
acting, in either mode; interval zero freezes it, otherwise rotate one eighth-turn
at that many private Steps. A new birth has timer zero and one completed alive
record. Every retained entity appends its resulting alive/dead state,
keeping eight records for exact codes and 64 records for repetition. Travel carries every entity field and last action
explanation. The compass never steers an existing mobile run.

Reset recreates the selected opening, all entities, streams and hidden state.
Clear removes all entities and restarts streams. Paint Alive or Dead entity changes
life at an existing entity without erasing its memory; painting a vacancy creates
fresh identity. Erase removes identity. All edits pause; rule/topology/paint edits
invalidate prior evidence. Changing compass cadence resets clocks only. Pattern and length edits preserve the field
and recorded histories. Generation
and remaining entity memory persist under edits. Full replay includes every entity
array, site stream, next ID, generation, evidence, dimensions, topology and rules.

Repetition adds a shared optional override: choose segment width X (1–8 bits)
and threshold Y (1–7 copies). The most recent X-bit block must occur in Y+1
consecutive, non-overlapping blocks ending at the newest completed record. Any
binary segment qualifies; it need not equal either authored code. Equality at Y
copies does not fire. Each entity retains a separate 64-bit rolling register and
valid length for this detector, while the original eight-bit history remains the
source for the two exact codes. No mode history or periodic timer is introduced.

A newly satisfied repetition condition flips the committed mode, taking priority
over both exact-code triggers for that Step. A per-entity latch suppresses another
repetition flip until a completed-history comparison fails; the regular exact
codes remain active on intervening Steps. Changing X, Y or enablement rearms this
latch without erasing histories. All repetition state travels with identity,
including through death/revival and blocked movement. Reset/Clear/new entities
start with empty repetition history and an unlatched detector; vacancy births
start with one alive record. Defaults enable X=2, Y=3 (four copies/eight records).
Version-five presets include these settings; older complete records adapt with
repetition disabled to preserve their former behavior.

## Reading the simulation

Canvas 2D: filled living entities; cyan mobile and lime settled life. Dead entities
are invisible by default. The independent Show dead entities checkbox reveals
hollow blue mobile dead and gray settled dead marks in Color view. Toggling it
changes no engine state. Color off shows living occupancy only and preserves the
reveal preference; inspection always retains written evidence. Paused inspection reveals
identity, alive/dead history oldest-to-newest, both headings, sense/timer, living
count, both shared binary patterns with warmup/match status, next mode
and its reason, repetition segment/copy count/grouped history/latch, proposed destination, claims, exact block or
move result, next entity fate and next site occupancy. Previous action travels
with identity; site outcomes are labeled separately. Arrow keys select, Enter
paints, P plays/pauses, S steps. Randomizers stay in their own rail section, per
the collection's convention.

## Reproduce a starting configuration

[Download example JSON](https://100gol.com/api/experiments/027/configuration). Import it using Share & reproduce in the simulation controls. It starts paused at Step zero. Files contain rules and initial conditions, not evolved boards or manual edits. See [format, limitations and automated access](https://100gol.com/agents).
