# GOL-017: Switchboard

Permanent distant pairs exchange their present dead/alive states on a configurable beat or local-neighbor trigger, then ordinary Life reacts to the fully mixed field.

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

## What to explore

The experiment should isolate the consequence of moving occupancy through a
permanent random perfect matching immediately before normal Life. Periodic mode
tests a synchronized field-wide exchange cadence. Neighbor-trigger mode makes
the same exchange conditional on local crowding and lets one member's local
environment alter both members' inputs to Life.

Success is not merely a correct random permutation of states. A visitor must be
able to see when a pair was commanded, whether unlike states actually crossed,
which endpoint caused a neighbor-triggered exchange, and how the swapped
intermediate state then survived, died, or gave birth under Life. Long-run tests
must record whether the authored regimes sustain activity and produce abrupt
changes rather than assuming that they will.

## Rules, update order and replay

The world is an even-sized square binary lattice. A seeded Fisher-Yates shuffle
divided into adjacent shuffled entries creates one symmetric, self-excluding
perfect matching. Every position has exactly one counterpart, every pair is
disjoint, and the matching persists until Reset, field-size change, initial-
condition reconstruction, or a new world seed.

Each Step has two synchronous stages:

1. The exchange stage reads one frozen current board. In **Periodic** mode every
   pair is commanded on Steps `N`, `2N`, `3N`, and so on, where `N` is the
   configured interval. In **Neighbor count** mode each endpoint independently
   compares its frozen Moore-neighbor count with the configured exact-count
   mask. If either endpoint matches, the pair is commanded.
2. Every commanded pair exchanges its two occupancy values exactly once. If
   both endpoints match, that is one exchange, not two cancelling exchanges. If
   both occupancies are equal, the command is retained as causal evidence even
   though it produces no effective state movement.
3. Ordinary configurable Life then reads the complete exchanged intermediate
   board and commits all final occupancies simultaneously. Life never reads a
   mixture of pre-exchange and post-exchange values.

The local Moore counts used to trigger an exchange come from the original frozen
board. The counts used by Life come from the exchanged intermediate board. Both
respect the current toroidal or bounded-edge view. A selected cell's trigger is
reported as **Selected**, **Counterpart**, **Both**, **Periodic**, or **None**;
there is no priority between endpoints and no iteration-order tie-breaker.

Step performs this complete exchange-then-Life transition once. Reset rebuilds
the selected occupancy field, seeded perfect matching, generation zero, and
empty event evidence while preserving the authored transition configuration.
Manual painting preserves the matching and generation but clears old event
evidence. Exact replay requires configuration, selected initial condition or
occupancy, density when random, topology, world seed, generation, partner
indices, board occupancy, and all retained last-Step evidence. Evolution makes
no random calls.

## Reading the simulation

The diagnostic renderer uses lime for established living cells, cream for Life
births from a dead intermediate state, and gold for an alive state received from
the counterpart that survives Life. Simplified Color mode reduces occupancy to
dead/alive without removing written evidence.

Pair inspection pauses painting, outlines the selected cell's current Moore
neighbors, draws one line to its only counterpart, and outlines that counterpart
separately. Written evidence reports both coordinates and occupancies; both
frozen trigger counts; whether Selected, Counterpart, Both, or Periodic commanded
the pair; whether unlike occupancies would effectively cross; selected occupancy
before and after exchange; its Life neighbor count on the fully exchanged board;
the ordinary Life result; last-Step command/effective-swap evidence; and the exact
next result. The canvas label states the same sequence so color and geometry are
not the only explanation.

## Reproduce a starting configuration

[Download example JSON](https://100gol.com/api/experiments/017/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).
