Skip to content
LIFE · Cellular Automaton logo
R&D · Zero DependenciesLive in production

LIFE · Cellular Automaton

Conway's Game of Life, with rules that evolve and patterns it discovers itself

gameofliveevo.com

This one is a side project, and it is the clearest demonstration in the portfolio of what happens without a client brief. It began as a Conway's Game of Life renderer and became a piece of amateur cellular-automaton research tooling — with a genetic algorithm that evolves the rules themselves, and a discovery engine that can tell whether the pattern it just found is already known to science.

24K
Lines, zero dependencies
13
Soup-search strategies
23
Patterns in the library
5
Edge API routes

The problem

Conway's Game of Life has been implemented thousands of times. A renderer with a play button is a weekend exercise and proves nothing. The only interesting version is one that asks a question the standard implementation can't.

Two questions turned out to be worth building: what happens if the rules themselves are subject to selection pressure rather than fixed at B3/S23, and can the simulator recognise what it has found rather than just drawing it?

What we built

Evolution Mode — the rules are the genome

Birth and survival conditions mutate, and surviving rulesets are scored on population growth, stability and diversity. Variants compete, lineage is tracked as species, and the system reverts when a mutation collapses the board. The classic rules become one point in a searchable space rather than the definition of the game.

Soup search that classifies what it finds

Thirteen random-soup generation strategies — symmetric, sparse, catalyst, collision and others — run forward until the board stabilises, and the engine then classifies the result: exact oscillator period, measured spaceship velocity, methuselah lifespan.

Speaking the field's actual notation

Discoveries are encoded as apgcodes in Catagolue's extended Wechsler format and cross-referenced against the live global database, so the simulator can flag when something appears genuinely novel rather than being the ten-thousandth rediscovery of a glider.

A leaderboard on a static host

The site is static on GitHub Pages. A Cloudflare Worker provides five API routes for board sharing, pattern submission, scores and leaderboards, with server-side score validation that caps generation counts to reject tampered submissions.

Engineering highlights

The parts that were genuinely hard — and how they were solved.

Tests that check against published research

The test suite validates classification against known values from the literature — the R-pentomino stabilising at 1,103 generations, apgcodes matching published Catagolue entries. A browser-API shim lets the engine run under Node, so the simulation logic is testable without a headless browser.

Zero dependencies is a constraint, not a boast

There is no runtime dependency in the entire project — no framework, no canvas library, no build step. The one dev dependency renders icons. Every render loop, every spatial optimisation and every piece of UI is written and owned, which is why 24,000 lines still start instantly.

Installable and offline-capable

Full PWA support with maskable icons and standalone display, so it installs to a phone home screen and runs without a network — the simulation never needed a server in the first place.

The stack

Core
Vanilla JavaScriptHTML5 CanvasCSS custom properties
Algorithms
Genetic rule mutationCycle detectionapgcode encoding
Backend
Cloudflare WorkerJSONbinServer-side score validation
Platform
GitHub PagesPWACustom domain
Testing
Node test suiteBrowser API shimCatagolue fixtures
Third-party services wired in
Catagolue pattern databaseCloudflare WorkersJSONbin