A cellular automaton game where your only weapon is a plain-English strategy.
Two colonies of cells fight for control of a petri dish. Before the battle starts, each player writes a strategy — the AI converts it to rules — and then the entire game resolves in one shot. You watch it play out round by round.
Experimental hobby project — use at your own risk.
- Frontend: React + Vite, HTML Canvas
- Runtime: Cloudflare Workers
- Game state: Cloudflare Durable Objects (one per room, WebSocket hub)
- Database: Cloudflare D1 (users, games)
- Sessions: Stateless signed cookies (7-day expiry)
- KV: Cloudflare KV (balance config overrides)
- AI: Cloudflare Workers AI (
@cf/meta/llama-3.3-70b-instruct-fp8-fast)
Prerequisites: Node.js 20+, a Cloudflare account with Workers, D1, KV, and AI access.
npm installCopy .dev.vars.example to .dev.vars and fill in your values. Guest login works without Google credentials.
Create your own Cloudflare resources and update wrangler.jsonc with your IDs:
wrangler d1 create primordial-db
wrangler kv namespace create primordial-sessions
# Then update database_id and kv id in wrangler.jsoncApply migrations and start:
npm run db:migrate:local
npm run dev:worker # terminal 1 — worker on :8787
npm run dev:ui # terminal 2 — Vite on :5173Background server logs go to logs/ (gitignored).
shared/ Deterministic sim — runs identically on server and client
worker/ Cloudflare Worker: API, auth, Durable Object (GameRoom)
src/ React client
migrations/ D1 SQL migrations
docs/ GitHub Pages site
.claude/ Skills and settings for Claude Code contributors
See CONTRIBUTING.md. This is a solo project — best-effort responses.
For Claude Code contributors: CLAUDE.md has architecture invariants. Load .claude/skills/primordial-sim for the sim reference.
Report vulnerabilities privately — see SECURITY.md.
MIT — Thomas Dvornik, 2026