# GOL-026: Density Layers

Local crowding chooses the law: two nested neighborhood counts select among three Life rules. Compose the radii, thresholds, births and survival.

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

## What to explore

Let density change the local law without adding another occupancy field, temporal
phase, forecast, or global coordination. Make both nested tests and the chosen
birth/survival clause directly inspectable. Higher levels may be rare in sparse
fields; preserve that consequence rather than artificially forcing promotion.

## Rules, update order and replay

Binary square lattice, 80/120/160 square, default torus; bounded exterior is dead.
Count living cells within Chebyshev radii r1 and r2, excluding the center.
Allowed pairs are (1,2), (1,3), (2,3), with capacities 8, 24 and 48.
If small count <= threshold 1, use level 1. Otherwise, if large count <= threshold
2, use level 2. Otherwise use level 3. Both gates must pass for level 3.
All three B/S masks count the same eight immediate neighbors (0–8).
A dead cell uses birth, a live cell survival. All reads use the frozen previous
board and one Step commits synchronously. No randomness occurs during evolution.
Minimum engine dimension seven avoids duplicate wrapped samples at radius three.

Occupancy determines the future. Full replay includes occupancy, generation,
previous occupancy, immediate/small/large counts, applied level, evidence validity,
configuration, dimensions and topology. Reset rebuilds the selected seeded or
composed opening and clears generation/evidence. Clear empties the field. Painting,
rule and topology edits pause, preserve generation, and invalidate old evidence.
Seed/density changes take effect on Reset. Colors describe the rule that produced
living cells in the last Step; initial cells have no applied level yet.

## Reading the simulation

Canvas 2D. Initial living cells are neutral cream; last-Step level 1 lime, level 2
cyan, level 3 violet. Dead cells remain background. Color off shows binary life.
Paused selected-cell inspection reports immediate count, both cumulative counts,
both gate results, chosen level and B/S rule, exact next state, and prior evidence.
Small-neighborhood inputs have solid cyan outlines; the remaining larger inputs
have dashed violet outlines. Text labels preserve the distinction without color.
Arrow keys select, Enter paints, P plays/pauses, S steps. All randomizers live in
the Randomizer section, alongside the rule controls.

## Reproduce a starting configuration

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