GOL-040 · technical companion

Pursuit Balance

Each cell chases one unique target and avoids one unique enemy. Equal distance weights guide single-square moves; a rotating compass settles ties and frees stalled cells.

At a glance

geometry
Square lattice
neighborhood
Eight adjacent squares + fixed one-to-one target and enemy links
states
Living identities + target/enemy permutations + private rotating compasses + stalled-turn counters + movement evidence
update
Frozen distance scoring or timed compass escape, synchronous unique-claim movement, compass rotation
renderer
Canvas 2D

Objective

Explore equal attraction and repulsion. Every cell has a fixed unique target and a fixed unique enemy. Observe movement, neutral flanking and congestion without an avoidance radius or adjustable weights.

Local rule

Score the eight empty adjacent squares by Euclidean distance to target minus Euclidean distance to enemy. Prefer the lowest score if it is no worse than staying. Neutral moves are allowed. Resolve equal scores by scanning from the displayed compass direction in its fixed clockwise or counterclockwise sense. Numerical differences within 1e-10 count as ties. Distances use shortest wrapped separation when wrapping is on.

Update and boundaries

All proposals read the same beginning-of-turn snapshot, including target and enemy positions. Occupied squares, including departing cells, are unavailable. Competing claims make all contenders wait; there is no retry, swap or capture. Commit accepted one-square moves simultaneously, then rotate every compass by 45 degrees. Bounded edges exclude off-field candidates. Population and relationships remain fixed.

Inspection

Click a cell to pause. Inspect its target and enemy identities, compass and rotation sense, current and neighboring distances and scores, exclusions, proposal, destination claims and exact next position. Follow target and Follow enemy navigate relationships. Cyan marks improving moves, amber neutral moves, violet the selected target and rose its enemy. The simulation remains the main workspace. Cream marks compass escapes. Inspection includes motionless turns, remaining wait, eligibility and whether the score is being ignored.

Reproducibility

Version two saves equal-distance-balance and escapeAfter with the complete opening: profile, pattern, density, field/target/enemy/angular seeds and wrapping. Random valid permutations give exactly one incoming edge in each relationship map; they can contain several cycles. Self-links and overlapping target/enemy roles are excluded for three or more cells. With two cells, the other identity fills both roles; a lone cell has no ordinary pursuit but can make a timed compass escape. Default: 10% wrapped 160-square, field/target/enemy/angular seeds 3800038/3800039/4000040/3800040, paused at 16 Steps/second, escape after 8 motionless turns. Reset repeats all state. Scoped opening randomizers preserve the escape wait, angular seed, size and topology. Randomize escape wait preserves the complete opening. Exact version-one links explicitly adopt escapeAfter 8; current-version imports must include the threshold. Changing targets can also change enemies to preserve their exclusion. Complete saved defaults and shared links restore paused at Step zero; links take precedence.

Compass escape

After X completed consecutive turns without movement, the next turn ignores distance scoring. Start at the displayed compass and scan all eight directions immediately in the fixed rotation sense. Propose the first empty in-bounds neighbor; fully enclosed cells wait. Escape and ordinary proposals share frozen occupancy and the same all-claim collision rejection. Any successful move resets the counter. Failed escapes keep their eligibility; the compass rotates once per turn regardless. The counter saturates at 65,535. A lone cell can also escape. Escape after ranges from 1 to 32, default 8. Editing it pauses and preserves accrued waiting; Reset clears all waiting.

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.

Large fields, dense populations and large interaction radii increase the work per Step. Start with a small field and radius, then increase them while paused. Read the configuration format and automated-access guide for compatibility details.