Pratt–Conway Cellular Automaton

2D Moore neighborhood, local MAX of FRACTRAN outputs, +2 offset. Mobile-friendly draw/touch.

PAUSE
Load photo into CA grid (Hilbert HSV palette)
Take a picture (mobile) or upload one. Auto-rotated (EXIF), center-cropped to the grid aspect, downscaled to 35×70. Each cell maps its pixel to the full Hilbert HSV palette (S from pixel saturation, V from pixel value).
20
1
Desktop: Space Run/Pause · N Step · R Random · C Clear · [/] t_max · ,/. steps/s · F Gridlines.
Mobile: choose a paint mode (−1 / +1), then drag/tap. Photo: load → Apply → Step/Run to watch it dissolve into patterns.

Rules (new local rule)

Given:
- Cells contain natural numbers n ≥ 0.
- Each number n determines a FRACTRAN program F_n (derived from the Pratt tree/forest of n).
- Global runtime bound: t_max.

Neighborhood (2D, Moore):
- Each cell reads its 8 neighbors.
- If wrap = off, out-of-bounds neighbors are treated as value 1 (boundary value).

Bounded FRACTRAN output:
- Run FRACTRAN starting with a:
    N0 = a
    for step < t_max:
      pick the FIRST fraction f in F_n such that Nt * f is an integer
      set Nt+1 = Nt * f
      if none applies: HALT with output r = Nt
- If it does not halt within t_max steps: output is 1.

Local synchronous update:
For each cell (x,y) with current value n:
1) For each neighbor value a:
     v = bounded_output(F_n, a)   (halts → r, timeout → 1)
2) best = max(v over the neighbors)
3) new(x,y) = best + 2

Interaction:
- Left click / Paint −1: n := max(0, n − 1)
- Right click / Paint +1: n := n + 1