Back to all work

petricellular automata puzzle

"Four rules, fifty years of catalogued patterns, infinite emergent behavior. The challenge was turning that into a game."
RoleProduct Designer, Design Engineer & Game Developer
TeamSolo — research, design, code, playtest
Duration~1 year in concept · ongoing build
Toolsv0.app, Claude Code, Next.js, Framer Motion, Vercel
01 Overview

I've been circling this idea for about a year. Conway's Game of Life has four rules, infinite emergent behavior, and a fifty-year catalog of named patterns built by researchers and enthusiasts since the 1970s. The question I kept coming back to: can that mathematical object become a game with real strategic depth, something you can pick up in under a minute but spend years actually learning?

That's what PETRI is trying to be.

PETRI — Live specimen · Beacon oscillator, p2
live · running Conway
SPECIMEN ACTIVE ⊹ 40× GEN 0

petri— Cellular Automata Puzzle

agar · 8 × 8 · warm paper, emerald life
Warm agar, emerald cells with glow halos, rim ticks every 10°. The beacon oscillator runs live at ~750ms per generation.
<1 min
Target time to first play
8
Patterns in starter vocabulary
12×12
Optimal grid, validated by simulation
Next.js 15 React 19 SVG + rAF Framer Motion Node simulator Vercel v0.app (prototype) Claude Code
02 Research

Before building, I mapped the landscape. Two genres shaped how I thought about the problem.

Daily puzzle games reach wide audiences because the mechanic is immediately legible. One puzzle, one attempt, shareable result. Complexity can deepen over time, but the first experience has to be clear enough that you know whether what you did was good or bad.

Strategy games work differently. Their depth comes from a learned vocabulary, not from on-the-fly calculation. Players don't compute every consequence. They recognize named patterns and deploy them. The game becomes learnable because the pieces have names and behaviors you can internalize.

Conway's Game of Life gives PETRI something unusual: an inherited strategic vocabulary from day one. Fifty years of enthusiast research has named and documented hundreds of patterns — Blocks, Gliders, Eaters, Spaceships, each one with known behavior. That's what the game is built on.

Reference Depth source Accessibility hook Virality layer
Daily puzzles Escalating challenge catalog Clear win/lose in 30 sec Shareable emoji grid
Classical strategy Named opening theory Named pieces with roles Community, tournaments
Conway sandboxes Pattern catalog (50yr) None — educational only Screenshots, math community
PETRI Inherited Conway vocabulary Named patterns + 1-min onboarding Daily challenge + shareable result
The cellular automata space has depth but no game. The puzzle genre has accessibility but no depth. PETRI lives in the gap. Research framing — 2025
03 Diagnosis

The first prototype worked. It was also visually identical to a debug view: flat grey squares in a column, two timers, Player 2 rotated 180° with no spatial language of its own. No identity, no tension. A debug tool pretending to be a game.

Before touching the visuals, I audited the mechanics against Salen and Zimmerman's meaningful play framework. Two criteria. Both failing.

BEFORE — v0 PROTOTYPE
P1 · 30sGEN 3
Flat colored squares. No spatial zones. No identity. No escalation. Debug view with a timer.
AFTER — PETRI
Same cells. Clinical lab identity. Emerald life on warm agar. Legibility at a glance.

The harder problem was structural. Toggling a single cell per turn on an 8×8 board of evolving Conway chaos fails both pillars:

Discernible?
The player can't see what their move did.
Humans can't mentally simulate Conway for 20+ cells. Every move feels like pulling a slot machine lever.
toggle cell Conway runs outcome unclear
Integrated?
The action doesn't matter to the outcome.
One toggle on a 24-cell board with a territory win condition. The system does the work. The player watches.
select pattern deploy territory shifts

The fix came from asking why strategy games work despite having the same problem: no one can compute every consequence in advance. Strategy players recognize named patterns and deploy them. The game is learnable because the pieces have names and known behaviors — not because players simulate the system.

Conway's community built exactly this vocabulary over fifty years: Block, Blinker, Glider, Eater. Switching from cell-toggle to pattern deployment changed the cognitive model entirely.

Old mechanic
Toggle one cell. Predict Conway.
Cognitively impossible. Move feels like a slot machine. The system wins, not the player.
New mechanic
Deploy a named pattern. Orchestrate Conway.
Players think in objects with known behaviors. Consequence is legible before placing.
04 Design System

Three directions explored before committing. Each had a consistent worldview: palette, cell shape, motion vocabulary, timer treatment. The test was simple: which one reads as an artifact, something you'd want to carry on your phone?

selected
Direction 1
PETRI
Clinical lab. Warm off-white paper, circular dish, emerald cells with glow halos. Mono typography. Frames Conway as biology.
Direction 2
SLAB
Brutalist board-game. Concrete cells with noise texture, terracotta vs indigo, slab serif, physical press/lift motion.
Direction 3
PULSE
Neon arcade. True black, magenta vs lime, shockwave rings, flicker deaths, giant LED timers.

The clinical lab direction won because it makes the game photogenic. A dish is something you want to screenshot. Warm paper reads on any phone wallpaper. Emerald glow halos survive dark mode. And it frames Conway's chaos as science — which changes what a player expects from every interaction.

Space Mono
STILL LIFE · P1
Classifications, data labels, specimen tags, cell metadata
Space Grotesk
A 2×2 square that never moves. Your immortal territory marker.
Body text, descriptions, onboarding copy, game instructions
Instrument Serif
petri
Wordmark, pull quotes, pattern focus names
Color tokens — semantic scale
BG · PAPER
#FAFAF7
Base surface, dish agar
INK
#0A0A0A
Borders, labels, deadcells
LIFE · P1
#059669
Player 1 cells, active state
AMBER · P2
#D97706
Player 2 cells, active state
BIRTH · VIOLET
#7C3AED
Born cells — one generation flash
WARN
#DC2626
Low time, extinction risk
Six tokens. Birth flashes violet for one generation before settling into owner color — a choreography that teaches the rule as you play.
Cell states — interaction model
Dead
No owner
Alive · P1
Emerald
Alive · P2
Amber
Born
One-gen flash
Dying
Next gen dead
Selected
Pattern preview
Six states. Every visual treatment is a semantic signal, not a stylistic choice. Birth violet teaches the Conway rule in real time.
05 Pattern Library

Eight starter patterns, chosen for variety of role: two still lifes, four oscillators, two spaceships. The mix was validated through simulation before being locked. Defense-only palettes produced mutual extinction by turn 7. Offense-only became visually unreadable. A mixed palette was the only configuration that produced genuine momentum swings with both players leading at different points.

Every pattern is canonical Conway. Click any tile to watch it run in the dish.

Starter palette — 8 Conway patterns · click to deploy
interactive
STILL LIFE · P1
Block
CELLS · 4 PERIOD · 1 ROLE · Fortress

A 2×2 square that never moves, never dies. Your immortal territory marker. Place it to claim a corner without risk.

Every pattern in this palette is canonical Conway: named, documented, and studied across five decades of enthusiast research. The dish runs the real step function — gliders actually travel, R-pentominos actually explode for hundreds of generations.
06 Onboarding

The biggest risk for a game with rules this unfamiliar is losing players before they understand why it's interesting. If the first experience is confusion, they leave and don't come back.

Five steps, each teaching one Conway rule in isolation. Every step has its own live dish showing exactly that rule in action — one concept per screen, nothing doubled up. Language is clinical: Starved, Suffocated, Born. The dish stays pinned so it never jumps during transitions.

01
Life & Death
A single cell. Alone. Watch it fade.
02
Isolation
Fewer than 2 neighbors — always fatal.
03
Overcrowding
More than 3 neighbors — suffocation.
04
New Life
Exactly 3 neighbors — birth from nothing.
05
The Standoff
Two players. Shared dish. Most territory wins.

After the five steps, players land in the lab: an open dish where they can deploy any pattern from the vocabulary and watch it interact freely. The lab is where understanding turns into curiosity. Players experiment with combinations, build intuition, and arrive at the first match with a genuine sense of what they're doing.

Tap targets use Voronoi click detection — any pixel in the dish maps to the nearest cell, so there are no missed taps. The skip button is a visible bordered pill. Every one of those decisions came from watching people use the phone version and bouncing on exactly that surface.

07 The Engine

The whole game runs on a 30-line Conway step function. Patterns are encoded as coordinate arrays, parsed from the canonical plaintext format the community has used for fifty years. The sim.js headless simulator that validated every design decision is the same step function — no graphics, no state management, just cells and neighbors.

Pattern encoding — plaintext → dish
animated
Conway plaintext · .cells format

                  
decoding…
Each pattern is stored as its canonical plaintext, decoded on load into coordinate pairs. The same arrays feed sim.js, the dish renderer, and the tile previews — one source of truth.
sim.js — Conway step function (~2kB total) headless · Node.js
// Four rules. The entire cellular automaton lives here.
function stepConway(grid) {
  const rows = grid.length, cols = grid[0].length;
  const next = [];
  for (let r = 0; r < rows; r++) {
    const row = [];
    for (let c = 0; c < cols; c++) {
      let n = 0;
      for (let dr = -1; dr <= 1; dr++)
        for (let dc = -1; dc <= 1; dc++) {
          if (!dr && !dc) continue; // skip self
          const nr = r + dr, nc = c + dc;
          if (nr >= 0 && nr < rows && nc >= 0 && nc < cols
              && grid[nr][nc]) n++;
        }
      // Survive: 2–3 neighbors · Born: exactly 3
      row.push(grid[r][c] ? n === 2 || n === 3 : n === 3);
    }
    next.push(row);
  }
  return next;
}

// Pattern definitions — canonical coordinate pairs
const GLIDER  = [[0,1],[1,2],[2,0],[2,1],[2,2]];
const EATER   = [[0,0],[0,1],[1,1],[2,1],[2,2],[3,2],[3,3]];
const LWSS    = [[0,1],[0,2],[0,3],[0,4],[1,0],[1,4],[2,4],[3,0],[3,3]];
08 Timeline

The game didn't happen in a straight line. Here's how the decisions actually stacked up.

2023
First research — game design theory
Reading Salen & Zimmerman's Rules of Play. Conway appeared as a canonical generative system. Question formed: can a cellular automaton become a game with real strategic depth?
game theory research
Early 2025
Decision to build · v0 prototype
Committed to building after two years of thinking. v0.app rapid prototype delivered two-player Conway with territory scoring — working, but visually a debug tool. First playtest note: "it seems hard to play."
concept locked v0.app prototype
!
April 2025
Design sprint — identity · diagnosis · pivot · sim
Clinical lab identity locked (three directions explored). Meaningful play audit found both pillars failing. Mechanical pivot: cell-toggle → named pattern deployment. sim.js built to validate everything headlessly. 12×12 grid, 4 steps/turn, 8-pattern mixed palette — all locked by simulation data.
identity locked key pivot sim.js mechanics locked
?
Late April 2025
Open question — format & multiplayer cold-start
Async multiplayer requires two players available simultaneously. Daily puzzle format under exploration: one puzzle per day, compete against a target state. All assets transfer. Build is live and ongoing.
open question in progress
09 What's next

The mechanics are validated. The visual system is cohesive. The onboarding works. What's open is the container — the format that determines how people discover and return to the game. Three directions are being explored.

exploring
A
Solo · Daily
Daily challenge
One puzzle per day. Reach a target state in N moves or fewer. Shareable grid result. Streak tracking. Zero multiplayer cold-start problem. Every asset built so far transfers.
B
Solo · Run-based
Roguelite
A hand of patterns drawn each run. Progressive challenge catalog with escalating spatial constraints. Pattern unlocks between runs. Long engagement, replayable without opponents.
C
Async · Competitive
Open play
Async multiplayer with a rating system. Community matches, lobby mode, real-time option for desktop. The original two-player standoff — resolved with a matchmaking layer rather than a cold-start.
The bet isn't "invent a new puzzle game." It's "re-surface one of the most beautiful mathematical objects of the 20th century as something anyone can play in under a minute." The vocabulary already exists. The work is packaging it. Project thesis · ongoing

The game is shipped as a development preview. Build is live. Commits keep coming.