Two-Parent Programs
Every creature here has a genome of bytes, and every child has exactly two parents: mix(A, B) → C. On the left, parents' genomes are cut and glued at random. On the right, genes are lined up first, the parents' own mix genes decide what the child gets, and children whose pieces do not fit are never born.
Click a creature in either world.
Click a creature to see its parents, grandparents and great-grandparents.
The genome is bytes
A genome is a few hundred bytes. Each gene starts with 47 45 ("GE") and ends with 4E 44 ("ND"); the bytes between genes are junk and do nothing. After the start marker, the top four bits of one byte say what kind of gene it is (the low four are ignored), and the bytes after it are its settings. There are no instructions: genes describe a body (size, speed, metabolism), senses (an eye and a nose, each with a range and a key byte) and rules (eat when energy is below X, look for a mate when it is above Y, flee from bigger creatures), each rule with a lock byte. Use Save .bin in the inspector to open a genome in a hex editor.
Two parents, one child
Naive splicing cuts each parent at a random byte and glues the front of one to the back of the other, even in the middle of a gene. Life's way lines the genes up by kind, the way chromosomes pair gene against gene. A coin flip picks which parent's mix gene rules the mixing: its cuts say how many crossover points there are, its share is the chance that each gene (or each block between cuts) comes from that parent, and its rate says how often bytes mutate. The child inherits that mix gene, so ways of mixing can evolve too. In mammals the gene PRDM9 plays a similar part, deciding where chromosomes cross over.
Lock and key
A rule only works if its lock byte is within 8 of a key on the matching sense: forage needs a nose, mate and flee need an eye. In life's way a child is not born if any rule has nothing to bind to: a failed conception, like the checks that cells and early embryos go through. Genes that work in their own lineage can fail together with genes from another (Dobzhansky–Muller incompatibility). The three founder lineages are built so that Sniffer and Saver fit each other and Runner fits neither.
Gentle mutation
Rare and mostly harmless: a setting moves by 1 to 3, the silent low bits of a type byte flip, junk changes freely. Rarely a gene is copied, deleted, or loses a marker byte and switches off.
The world and the garden
A 64 × 64 field with a few walls. Food grows in three patches that circle the field with the seasons. Each tick costs energy (more for big, fast or wasteful bodies, and a little for every byte of genome, which can be at most 512 bytes), food gives energy, and creatures die when they starve or reach age 600. To see whether creatures get better, the charts use a common garden: a creature is put alone on four sparse plots and the score is how long it survives (up to 1500 ticks). The score depends only on the genome, not on how crowded the world is. A quarter of all children are also compared with both parents this way.
Yes, in several forms, and it works better when the parents are lined up so that matching parts are swapped.
- Genetic programming (John Koza, 1992) swaps random subtrees between two parent programs. Peter Angeline (1997) found that swapping in a random subtree did about as well as using the other parent's, so the second parent added less than hoped.
- Avida: Dusan Misevic, Charles Ofria and Richard Lenski (2006) gave self-copying digital organisms sexual reproduction, and their genomes became more modular.
- NEAT (Kenneth Stanley and Risto Miikkulainen, 2002) lines up neural-network genomes gene by gene before crossing them over.
- Genetic algorithms (John Holland, 1970s) have used two-parent crossover on bit strings for fifty years.
- Language models as recombiners: Evolution through Large Models (2022) and DeepMind's FunSearch (2023) ask a model to combine parent programs.
The look of this page is our own, made in the spirit of 1990s computer games about little creatures.