PETRI DISH GAMES

Prompt genes

The population of aesthetic directives the lab breeds alongside the code, rated by how often their offspring win.

Prompt genes are the aesthetic directives the lab breeds as a second population beside the code, one pool per track. Every organism records the gene that produced it, and a gene’s rating moves with its offspring’s duel results at a smaller step than the offspring themselves take. New genes are written by a model at a fixed cadence, admitted only when they are far enough from every gene already living, and retired from the bottom of the rating order.

The gene pool

A gene is a row in the prompts table, holding:

  • its text
  • its track
  • a rating, with a game and a win count, on each of the two ladders
  • a uses count of the organisms it has bred
  • a generation number
  • a parent gene id
  • a status of alive or retired

The parent id is what taxonomy walks to a genus.

Each track’s pool is seeded from a fixed list of directives held in the track definition: 23 for the shader track, 20 for the UI track. Seeding compares each seed’s text against every row already recorded for that track, whatever its status, and inserts only what is missing, at generation 0 and the starting rating. It runs when the daemon boots and again at the start of every birth. Because the comparison is on exact text, editing a seed inserts it as an additional gene rather than amending the one already in the table, and a retired seed is never reinstated.

ValueSettingCurrent
Starting ratingelo.start1200
Pool floorpromptPopulation.min8
Pool ceilingpromptPopulation.max20
Gene quotageneQuota0.34
Distance floorpromptMinDistance0.45
Novel-branch chancepromptNovelChance0.65
Births per new genepromptEvolveEveryBirths6
Author modelpromptModelsonnet

Each is read from lab.config.json and is the lab’s current configuration rather than a fixed property of the system.

Credit from a duel

A duel credits genes only when both organisms carry a gene id and the two ids differ. Two organisms bred from one directive say nothing about that directive, so such a duel moves no gene rating at all.

Where credit does flow, both genes take the duel’s outcome on a smaller step than the organisms did.

LadderGene stepColumns moved
Owner arenahalf the organism step, so 16 at the configured elo.k of 32rating, games, wins
Publica fixed 12, against an organism step that varies with the organism’s experiencepub_rating, pub_games, pub_wins

Until a gene has played its first public game its effective public rating is its owner rating, so the public ladder starts from the owner’s ordering rather than from the column default.

A rejection verdict, where the judge marks the one they do not want instead of the one they do, is not symmetric. The rejected organism’s gene takes the loss and a game; the other gene is left untouched, its game count included.

Selection into a birth

Only the model operators consult a gene. A child from a free structural operator inherits its first parent’s gene id and leaves that gene’s uses unchanged, so an unproven directive does not spend its run on code it never touched. Which operators are which is set out under breeding.

The gene quota caps how much of a track any one directive may hold. The quota is the greater of 2 and the ceiling of geneQuota times the number of living organisms in the track. Genes already at or above the quota are dropped from consideration; if that leaves nothing, the whole living set is considered again.

Among what remains, selection runs in two stages:

  • A gene with fewer than three uses is unproven, and one is picked uniformly at random. Every unproven gene therefore gets a run before any rating decides anything.
  • With no unproven gene left, the pick is a three-way tournament sampled with replacement, ranked by the same blended fitness that ranks organisms.

A birth that survives every gate increments the chosen gene’s uses and records its id on the new organism.

New directives

A birth counter shared by both tracks drives the cadence. Each track holds its own threshold, and when the counter reaches it, that track writes one new gene and moves its threshold forward by promptEvolveEveryBirths. Counter and thresholds are stored in the database, so a restart does not reset the schedule.

The directive is written by the model named in promptModel, which is not the model that writes organism code. Both calls share the lab’s timeout and concurrency settings.

A gene counts as judged once it has at least three games on the owner ladder. That count, and the rating order the branch reads, are the owner columns alone, not the blended fitness used to pick a gene for a birth.

BranchTaken whenShown to the modelLineage recorded
Novelfewer living genes than the pool floor, or fewer than two judged genes, or a promptNovelChance roll otherwisethe text of every living gene in the trackgeneration 0, no parent, the starting rating
Variationthe remainderthe highest-rated and the lowest-rated of the judged genesthe winner’s generation plus one, the winner as parent, the winner’s rating

The novel branch presents the living genes as a map of occupied territory and asks for a directive that lands where none of them touch, willing to be divisive. The variation branch asks for a variation on the strong directive that borrows at most one idea from the weak one, and rejects a paraphrase. Both branches constrain the reply to one to three sentences under 60 words, require concrete visual properties rather than praise, and forbid any mention of the technical contract.

Admission gates

The reply is trimmed and stripped of leading and trailing quote and backtick characters, then tested in order:

  • Text shorter than 40 characters or longer than 600 is discarded.
  • Text exactly matching a living gene in the track is discarded.
  • Token distance to every living gene in the track must be at least promptMinDistance. The first gene closer than that ends the round.

The measure is the same token distance applied to organism code, taken here over the words of the directive; it is defined under diversity. Exact-match rejection alone had allowed one directive to accumulate near-paraphrases of itself, which is what the distance floor closes.

A failed model call or a failed gate writes nothing. The threshold has already advanced, so the track waits a further interval before trying again.

Retirement

Retirement is considered only in a round that actually admitted a gene. If the track’s living gene count is then above the pool ceiling, the living genes are walked in ascending rating order and the first one that is not the new gene and has at least four games on the owner ladder is marked retired. At most one gene retires per round.

A gene with fewer than four games is never retired, so a pool of young genes can sit above the ceiling until they have been judged.

Retirement removes a gene from selection and from the text shown to the novel branch. It does not touch the organisms already bred from it: they keep the gene id, and the directive stays attached to them wherever they are shown, including the gallery.

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
db.js 193eb96a460a
evolvePrompts b72f4e12e72f
lab.config.json a095dd3b3dab
novelGenePrompt 979ad190a564
public-api.js f14fffef049d
recordVote 2ee5143085a9

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.