Technical Specification · v0.10.4 · measured 2026-06-16

Cosmogonic Quantum Mechalogodrom

A single-page TypeScript simulation — with an optional native C++/Jolt physics engine — that renders up to 50,000 morphogenic organisms (10,000 at 60 fps on integrated graphics; the 50,000 mega-tier ceiling on ≥16-core machines), governed by deterministic seeded physics and a pre-2016 classical-AI cognition stack. Bit-reproducible from one 32-bit seed. The intelligence is architectural, not parametric — every figure below was measured from the repository.

01 At a glance

69,365
lines of code
285
files · 29 folders
964
tests · 95.6% cov
50,000
peak entities
~3.5M
total AI params
~14 MB
of neural weights
0
NPU / AI-TOPS needed
2
languages · TS + C++

02 Languages — 70,661 lines

TypeScript 43,898 · 62.1%
Markdown (docs) 14,904 · 21.1%
HTML 8,015 · 11.3%
C++ (native engine · gl-core · Jolt physics) 1,296 · 1.8%
CSS (Tailwind src) 1,230 · 1.7%
JSON / lock / YAML / other 1,318 · 1.9%

Code (TS + C++ + HTML + CSS) = 54,439 lines · 77.0%. Web-app source 30,871 (89 files), native C++/Jolt engine 1,296 (6 files), tests 11,692 (79 files), docs 14,904 (58 files). The quantum mind ports three primitives from external quantum-research repos — the Eshkol qubit-RNG, the Moonlab/QGTL Quantum-Geometric-Tensor, and a Tsotchke spin-glass instinct — reimplemented in seeded TypeScript and wired into the apex creature (MIT © tsotchke; not vendored as binaries).

03 Stack & versions

Runtime / framework version
Bun (runtime + bundler + test) 1.3.14
TypeScript (strict) ^6.0.3
Three.js (WebGL2) ^0.184.0
Tailwind CSS ^4.3.0
HTMX ^2.0.10
Library role
graphology (+louvain, +metrics) connectome
d3-delaunay Voronoi sky
simplex-noise fields
simple-statistics telemetry
@noble/hashes · mermaid · htmx lore · docs · ui

22 declared dependencies → 106 resolved (725 MB) — a lean, facade-isolated tree. 10 dev tools: oxlint, prettier, tsc, mitata, bun-plugin-tailwind, @types/*.

04 Architecture — strict acyclic layering

math / constants   (leaves: rng · scalar · spatial-hash · quantum · heap · games)
       ▲
sim/*  (30+ systems: entities · titans · shoggoths · nhi · factions · environment …)
       ▲
core (engine · quality) ── world.ts  (composition root: builds SimContext, ticks all)
       ▲
ui / render (observatory · hud · viz3d · instanced-entities · postfx · cosmic-web …)
       ▲
server.ts ──serves──▶  /  (app)   /docs   /spec   /lab

Aesthetic law: every system reads AND writes another — the frame loop is an explicit feedback web. The non-deterministic LLM copilot is structurally fenced out of the seeded simulation. 6 ADRs record binding decisions. Verified acyclic across 50+ modules.

05 The intelligence — measured model sizes

Mind Network parameters
Organism brain (× up to 50,000) TinyMLP 6→6→4 · heritable genome 70 weights
Faction brain (× 8) TinyMLP 6→6→4 70 weights
NHI intuition gene TinyMLP 5→6→7 85 weights
NHI alien voice Markov 12×12 144 weights
Wingman swarm (× 100) TinyMLP escort controllers ~250 weights ea
Super Creature mind (V45) composite · 12 sub-nets · 5 stages × 25 variants ~10,081 weights
Super Creature quantum mind (V75) 6-qubit statevector · RY/RZ + controlled-RY 64 amplitudes
Quantum register (puppet-master) 5-qubit statevector 32 amplitudes
Population total (at the 50k mega tier) the 50,000 organism brains dominate ~3.5 M weights

Built from pre-2016 AI: FSM · GOAP planning · utility AI · tiny perceptrons · Markov chains · episodic memory · game theory (best-response, Axelrod strategies, regret-matching). The NHI super-mind composes all of it and writes to the world — spawns mutated swarms, manipulates factions, plans a multi-step GOAP scheme toward dominion, hallucinates an alien dialect. The always-active Super Creature goes deeper still: a ~10,081-parameter composite consciousness (a Thaler creativity machine over 12 sub-nets, 5 stages × 25 thought variants) plus a real 6-qubit quantum-computing mind (src/sim/super-qubits.ts — its statevector + RY/RZ + controlled-RY gate set with the Eshkol qubit-RNG (the Born sample), the Moonlab quantum simulator, its Quantum-Geometric-Tensor (QGTL) module (thought-space curvature), and a Tsotchke spin-glass instinct — all ported from those quantum-research repos and wired in) whose Born-sampled "thought collapse" feeds the unified 4-tab neural observatory — all deterministic on dedicated seeded streams.

The cast (measured counts). Up to 50,000 organisms across 100 morphotypes (250 in phylum mode), each carrying a 70-weight brain + a 10-gene genome · 100 Shoggoths · 100 Puppet-masters (a 5-qubit quantum register each) · 10 Titans (4D freak-geometry) · 8 faction archetypes · Leviathans, singularities + weather (the environment) · one always-active Super Creature trailed by a 100-drone wingman swarm · and the apex NHI super-mind that perceives, plans (GOAP), and manipulates them all.

06 Contrast — this world vs. LLMs

This entire 50k world ~3.5M · 1×
BERT-base 110 M · 31×
Llama-7B 7 B · 2,000×
GPT-3 175 B · 50,000×
~14 MB of neural weights · 1/50,000th of GPT-3 · 0 TOPS · runs on a single CPU thread.

The entire emergent intelligence of a 50,000-agent cosmos is ~14 MB — about one high-resolution photo's worth of weights, for fifty thousand thinking minds. Depth here is engineered — architecture, determinism, discipline — not downloaded.

07 Render & compute

Concern Specification
Renderer Three.js WebGL2 · ACES tone-mapping · InstancedMesh pools (≤80 pools, 1 draw call per geometry×transparency — not 50k draws)
Shaders owned fresnel + thin-film glass sheen · 7 render modes · GPU vertex-melt · optional ?fx=1 bloom + PMREM env-map
Sim loop single-thread · allocation-free steady state · seeded mulberry32 · perf-budget gated
Determinism same seed → identical run, bit-for-bit · Math.random/Date.now banned in sim

08 Hardware footprint

Resource Requirement
GPU Any WebGL2 device — integrated Intel/Apple/Android; tiers auto-scale to phones. No discrete GPU needed.
NPU / AI-TOPS Zero. No transformer inference. All organism brains ≈ 0.08 GFLOP/s — negligible on one core.
CPU Any modern CPU; the single-thread sim is the bottleneck at 50k, not the GPU.
RAM ≈ 300–600 MB resident at full population.
Download App initial payload ≈ 960 KB entry + Three.js (~1–1.5 MB gzipped). The heavy Mermaid bundle loads only on /docs.

09 Build, CI/CD & quality

Gate (every commit): prettier → tsc strict → oxlint → 964 tests → bun build. Coverage ≥ 90% line / 85% function (measured 95.6 / 90.5). Build: Bun bundles 3 HTML entrypoints (index.html, docs.html, specs.html) → dist/. CI/CD: GitHub Actions runs the gate + builds and deploys the real app to GitHub Pages on every push to main; tagged releases ship a tarball + CycloneDX SBOM. Three governing "master" personas encode the discipline: the Executor, the Architect, the Physicist.

10 The inhabitants — measured roster

Inhabitant Count (mega tier) What it is
Morphogenic organisms up to 50,000 100 morphotypes · 10 phyla · 26 behaviour fields · 7 render modes; each carries a 70-weight TinyMLP brain as a heritable genome
Factions 8 Watchers · Weavers · Wardens · Heralds · Leviathans · SwarmMinds · Oracles · Devourers — each a DIFFERENT pre-2016 technique (FSM · behaviour-tree · utility · GOAP · rule · boids · Markov · MLP)
Titans 10 colossal 4D-tesseract beings; proxy-war pairs; a drag/hue aura warps the field
Puppet-masters 100 (14 mobile) NPC schemers driven by a 5-qubit quantum register + GOAP/utility; their plots toast
Shoggoths 100 (16 mobile) amorphous 8-tendril horrors; utility / threat-prey AI
Leviathans 4 apex roaming megafauna
NHI beings user-summoned non-human intelligences: 85-weight intuition gene + 144-weight alien-voice Markov + 7-action GOAP; a 9-view neural observatory
Super Creature (+ twins) 1 (+ up to 3) the apex mind: 1,444-weight spine + ~10,081-weight composite consciousness + a real 6-qubit quantum-computing mind
Wingman swarm — the "minis" 100 / creature escort mini-robots ringing the Super Creature; ~250-weight TinyMLP brain each
Singularities event-driven black-hole / gravitational-lens wells that dilate time and bend space
Monoliths · dioramas · gold-lattice 16 · 8 · 7 scene megastructures + the Catmull-Rom data-pipeline web
Environment & fields 26 + 6 26 behaviour fields + 6 weathers, plus connectome · reaction-diffusion · chaos (Lorenz) · quantum + gold lattices · cosmic web · atmosphere · constellations

Counts are the desktop / mega-tier ceilings — phone and laptop tiers scale down (e.g. 14 puppet-masters, 16 shoggoths on touch). Every figure measured from src/sim/* + src/core/quality.ts.