PETRI DISH GAMES

The gallery

The Rorschach Lab's published population, served best-first with each organism's source, prompt gene and taxonomy under Apache-2.0.

The gallery is the published population of the Rorschach Lab: a best-first slice of the live shader organisms, served at /rorschach/gallery from the lab’s public API and rendered live in the browser. Each item ships its shader source, the prompt gene that bred it and its full taxonomy, under Apache-2.0. The response carries no rating and no game count, so the order is published without the numbers that produced it.

Admission

An organism appears only when every condition holds:

  • Its track is published. shader is the only member of the published set, and a request for any other track is denied rather than answered empty.
  • Its status is alive.
  • It is render-proven: a client has reported that it compiled and drew.
  • It carries no recorded error.

A visitor-bred child is born unproven, so a cross reaches no gallery view until the owner’s arena has seen it draw.

The page also carries a pool selector, populated from the same pool list the vote page uses and stored across visits. A pooled request narrows the population to one phylum; the unpooled ecosystem request is the whole track.

Views

Three buttons switch the ranking. The view is sent as the by parameter, and the route accepts crowd and visitor literally and treats every other value as best.

ControlbyPopulation shownOrdered by
top ratedbestJudged at least once by either judgeBlended fitness, owner and public games weighted together
crowd pickscrowdJudged at least once by the publicThe public rating alone, with no owner seed in the order
visitor bredvisitorBred by visitorsBlended fitness

The default view excludes an organism nobody has judged: an unjudged organism is unknown rather than best, and selection reads the same blended figure the order does.

An empty result is answered with a view-specific message and a reload twenty seconds later. A failed fetch is answered the same way.

The dealt slice

The route serves a default slice, and a caller-supplied limit is floored and clamped to a ceiling above it, because the response carries a whole shader body per item. The page asks for more than the ceiling allows and takes what the clamp returns, so the size of a deal is the route’s to decide and not the page’s. Both figures are raised as the population grows and neither is a constant worth carrying here.

Three passes shape what the slice holds, in order:

  1. Near-duplicate culling. Candidates are walked best-first and one is kept only if its token-set Jaccard distance to every already-kept candidate exceeds the clone threshold, held in lab.config.json as diversity.cloneNN and currently 0.05. The pass stops once it has kept twice the limit. This caps what one screen shows of a clone family; the pool-wide cap is diversity’s.
  2. The per-lineage cap. On an unpooled request no phylum may hold more than max(2, ceil(limit / 6)) slots, so the cap rises with the size of the deal. Overflow is benched, and the bench is appended only if the capped deal came up short of the limit. A pooled request is one phylum already and skips this pass.
  3. Truncation to the limit.

The page then groups the items it received by phylum, in order of first appearance, and keeps the best-first order inside each group. Each group is headed by its phylum name; each card is captioned with the organism’s species, its generation and the operator that bred it.

The specimen overlay

Clicking a card, or pressing Enter or Space on it, opens the specimen overlay on that organism. It discloses four things:

PanelContents
StageThe same shader, mounted live in a context of the overlay’s own
RanksKingdom, phylum, class, genus, species and generation, each labelled
DirectiveThe prompt gene that produced the organism, quoted whole. Hidden when the item carries none
SourceThe full shader body, with a copy button and the licence the response declared

The overlay closes on its close button or on a click landing on the backdrop itself. A click inside it does not dismiss it, so the source can be scrolled by touch.

Disclosure and licence

The gallery is the one surface that publishes a prompt gene. A gallery item carries id, code, prompt and taxonomy; a pair dealt for judging carries id and code and nothing else, so the same organism’s directive is readable in the gallery and withheld while it is being voted on. Neither surface publishes a rating, a game count or the prompt population.

Every gallery response declares Apache-2.0, which is the licence in the lab repository, and the overlay prints whatever string the response declared rather than a constant of its own. It covers the code and the prompt alike.

Renderer budget

Every card is a live WebGL2 context, and a page of them is more than a browser will carry, so a card is mounted only while it is near the viewport. An IntersectionObserver with a 120px margin mounts a frame on entry and unmounts it on exit.

CapPhone (viewport 899px or narrower)Otherwise
Mounted contexts kept warm38
Absolute simultaneous contexts616

The two caps do different work. Eviction runs down to the warm figure but may drop only an off-screen frame, oldest-mounted first, and stops when none is left: a visible card is never torn down, because the observer reports edges rather than states and an unmounted visible card would never be retried. The absolute ceiling is what bounds the page when many cards are visible at once. A mount refused by that ceiling leaves a queued note in the frame, and a freed slot is offered by hand around the on-screen frames rather than waited on.

Unmounting cancels the frame loop, disconnects the resize observer, forces the context loss extension and removes the canvas. The overlay’s stage holds one context outside both caps. Hiding the tab pauses every live card and the overlay; showing it resumes them, re-measuring first.

A card that cannot render is replaced by a legible note in place of its canvas, reading no webgl2, shader error or link error, so a failure does not read as an organism that draws black. Sound is off by default and is voiced from the card the pointer is over.

Bound to

The source this page's claims were read against, named by symbol and pinned by the digest of the file it lives in.

SymbolDigest
/api/pub/gallery 2ee5143085a9
gallery.astro 005d7b298795
lab.config.json a095dd3b3dab
publicGallery f14fffef049d

Near this subject

These are the subjects this one is joined to in the field. Step out of this card and they are the wells around the one you are standing in.