Moore Bool-Bitword CA

Each cell is a bitword (BigInt, masked), update uses Moore neighbors with AND/OR/XOR chosen by self % 3, then +1.

PAUSE
Load photo into CA grid (Hilbert HSV palette)
Upload a photo. Center-cropped to the grid aspect, downscaled to GRID_W×GRID_H. Each cell maps its pixel to the Hilbert HSV palette (3D Hilbert).
24
1
Desktop: Space Run/Pause · N Step · R Random · C Clear · ,/. steps/s · F Gridlines.
Mobile: choose a paint mode (−1 / +1), then drag/tap. Photo: load → Apply → Step/Run.

Rules (this CA)

State: each cell holds a natural number n ≥ 0, treated as a bitword (BigInt).
Mask: keep only the lowest MAX_BITS bits (here 24).

Neighborhood: Moore (8 neighbors). Wrap can be on/off (here: WRAP=true).

Local synchronous update:
1) op = n mod 3
   op=0: AND over neighbor bitwords
   op=1: OR  over neighbor bitwords
   op=2: XOR over neighbor bitwords
2) new = fold_op(neighbors) + 1
3) apply mask

Paint:
- Paint −1: n := max(0, n − 1)
- Paint +1: n := n + 1