{"id":51423220,"url":"https://github.com/ikkeseb/vivarium","last_synced_at":"2026-07-05T01:02:27.251Z","repository":{"id":366180323,"uuid":"1275136670","full_name":"ikkeseb/vivarium","owner":"ikkeseb","description":"Client-side artificial-life sandbox: a deterministic, seedable gallery of cellular-automata and life systems. TypeScript + Vite, no backend, no GPU.","archived":false,"fork":false,"pushed_at":"2026-06-20T16:59:36.000Z","size":1053,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T17:17:51.519Z","etag":null,"topics":["artificial-life","canvas","cellular-automata","conways-game-of-life","lenia","simulation","typescript","vite"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikkeseb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-20T09:48:36.000Z","updated_at":"2026-06-20T16:59:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ikkeseb/vivarium","commit_stats":null,"previous_names":["ikkeseb/vivarium"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ikkeseb/vivarium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikkeseb%2Fvivarium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikkeseb%2Fvivarium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikkeseb%2Fvivarium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikkeseb%2Fvivarium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikkeseb","download_url":"https://codeload.github.com/ikkeseb/vivarium/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikkeseb%2Fvivarium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35140189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-life","canvas","cellular-automata","conways-game-of-life","lenia","simulation","typescript","vite"],"created_at":"2026-07-05T01:02:25.651Z","updated_at":"2026-07-05T01:02:27.222Z","avatar_url":"https://github.com/ikkeseb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vivarium\n\nA client-side **artificial-life sandbox** — a gallery of deterministic\ncellular-automata and life systems, each a self-contained module with a seedable\ninitial state and a deterministic step function. Pure TypeScript (strict) + Vite,\nno backend, no GPU, no runtime dependencies. Light runtime, heavy build.\n\n**[▶ Live demo](https://vivarium.nuez.no)**\n\n![vivarium running Conway's Life](screens/_hero.png)\n\n## Systems\n\nEight distinct systems, each with deep parameter control, presets, seeding, and\ncanvas painting:\n\n| System | What it is |\n| --- | --- |\n| **Conway's Life** | The original `B3/S23` automaton, with a hand-verified pattern library (glider, Gosper gun, spaceships, pulsar, pentadecathlon, acorn). |\n| **Life-like Rules** | Any two-state `B/S` rule, live-editable: HighLife, Day \u0026 Night, Seeds, Replicator, Maze, Coral, Anneal, Diamoeba… |\n| **Generations** | Multi-state life with refractory \"dying\" states (`S/B/C`): Brian's Brain, Star Wars, Frogs, Bombers. |\n| **Cyclic CA** | States on a cycle; cells advance when enough neighbours hold the successor state → spiral waves and \"demons\". |\n| **Elementary 1D** | All 256 Wolfram one-dimensional rules; history scrolls upward. Rule 30, 90, 110, 184… |\n| **Langton's Ant** | Agent-based turmites with `L/R/U/N` turn-string rules and multiple ants. |\n| **Lenia** | Continuous CA — a smooth `[0,1]` field convolved with a radial bump kernel and a bell-shaped growth function. |\n| **Particle Life** | Thousands of coloured particles driven by a per-species attraction/repulsion matrix; emergent cells and predators. |\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"screens/elementary.png\" alt=\"Elementary 1D — Rule 30\" width=\"380\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"screens/cyclic.png\" alt=\"Cyclic CA\" width=\"380\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"screens/lenia.png\" alt=\"Lenia\" width=\"380\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"screens/particle-life.png\" alt=\"Particle Life\" width=\"380\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Architecture\n\nEverything talks to two interfaces in [`src/core/types.ts`](src/core/types.ts):\n\n- **`SystemDef`** — static metadata, a declarative parameter schema, presets, and\n  a `create(params, seed, preset)` factory.\n- **`Simulation`** — mutable state with a deterministic `step()`, a `render()`\n  returning one of three render models (`cells` / `field` / `particles`), a\n  `hash()` of the full state, and optional `paint()` / `clear()`.\n\n```\nsrc/\n  core/      types (the contract), mulberry32 PRNG, FNV-1a state hash, registry\n  systems/   one self-contained module per system (+ a shared Life-like engine)\n  render/    canvas-2D renderer: typed arrays → ImageData, nearest-neighbour blit\n  ui/        framework-free gallery, auto-generated controls, transport, painting\n```\n\n**Determinism** is enforced: all randomness flows from a seeded `mulberry32`\nPRNG, never `Math.random`. The same seed + step count always produces the same\nstate hash — pinned per system and at the registry level in the test suite.\n\n**Cheap rendering**: grid/field systems paint into an offscreen `ImageData` at\nnative cell resolution and blit it scaled with nearest-neighbour; particle\nsystems draw squares grouped by species. No per-frame allocation. The whole app\nis ~46 kB of JS (~15 kB gzipped).\n\n## Develop\n\n```bash\npnpm install\npnpm dev          # Vite dev server\npnpm typecheck    # tsc --noEmit (strict)\npnpm test         # Vitest: known-outcome + determinism tests\npnpm build        # static bundle into dist/\npnpm screens      # build + Playwright screenshots into screens/\n```\n\n## Tests\n\nEach system pins a **known outcome** (a glider returns to itself shifted by\n`(1,1)` after 4 steps; Rule 30 matches its verified triangle; Langton's ant draws\na 2×2 block and returns home after 4 steps; Brian's Brain's isolated cell dies in\n2; Lenia's empty field stays empty; particles stay in bounds) plus **determinism\nsnapshots** (seed + N steps → grid hash). 129 tests in total.\n\n## Controls\n\nPick a system from the gallery, then play/pause/step, adjust speed, randomize the\nseed, choose a preset, edit parameters live, and click-drag on the canvas to\npaint cells (or particles). Keyboard: `space` play/pause, `s` step, `r` reset,\n`n` randomize, `c` clear.\n\n## License\n\n[MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikkeseb%2Fvivarium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikkeseb%2Fvivarium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikkeseb%2Fvivarium/lists"}