DarwinBotsManual
Open the app EspañolES

Species and lineage

What a species is for the engine (an inherited name), what happens to it when bots mutate, how parentage and genetic distance are recorded, and where you can see all of that in the app.

To the DarwinBots engine, a species is above all a name. Every bot you seed from a given library bot carries its name, and all of its descendants inherit it, however much they mutate. The app builds the species record, the family tree and the measures of how far the DNA has changed on top of that simple idea.

This page separates three things that are easy to mix up: the species (the name), the lineage (who is whose child) and genetic similarity (how alike two DNAs are).

What a species is

When you set up a simulation, each species you add under “Species to seed” (see Experiment) is a library bot with a quantity, a color and a vegetable or animal mark. When you seed it, the world registers the species under that name, and every seeded bot and every child born afterwards carries it.

The engine uses that name to decide who is “one of its own”:

That doesn't mean a bot knows the name of the others: the DNA can't read it. To recognize a relative, a bot compares the signature of its DNA with that of the bot it sees (Its own signature (my*) and What it sees (ref*)), which is an approximation. The tutorial A bot that recognizes its own species goes into it.

When bots mutate

With mutations turned on (see Mutations), children are not exact copies of the mother and, over time, a species' DNA drifts away from the original. In this version the name does not change: the descendants are still the same species even when their DNA no longer resembles the founder's. They still count in .totalmyspecies and are still immune to the venom of their relatives.

What does change, in every bot that mutates:

New species by mutation

The original DarwinBots engine can also split a species in two: self-speciation. When a bot accumulates more mutations than a certain percentage of the length of its DNA (a setting that is saved with the simulation), it is renamed and founds a new species. The new name is the old one with a number in parentheses in front: (12)Mi bicho. The number comes from a world counter that goes up with every new species; if the name already had a number, it is replaced, so parentheses never pile up. The renamed bot starts counting its mutations again from 0, and its children inherit the new name. No new species are created if the world already has 49 registered.

From that moment on it is a different species for everything above: its .totalmyspecies counts separately and the venom of the mother species no longer spares it.

The lineage

Besides its species, every bot has a number that is never repeated in the whole simulation, and the engine records for each one:

In sexual reproduction (see Reproduction), the “mother” is the bot that has the child. The other one only supplied the sperm with a shot, and is not recorded: the lineage follows the maternal line.

Genetic distance

How alike are two bots? The engine measures it by aligning the two DNAs word by word: it looks for the stretches they have in common and counts what fraction of the words ended up without a match. 0 is two identical DNAs; 1, two that share nothing.

That measure decides two things in the world:

What forThreshold
Having a child with the sperm received (.sexrepro)If the distance is over 0.6, there is no child.
Sharing chloroplasts through a tie (.sharechlr)If it is over 0.25, nothing is shared.

So even if the species name doesn't change, two branches that drifted far apart can no longer interbreed: the species splits in practice even though the record doesn't say so.

Where you see it in the app

In Observe (see Observe), the color of the bots can follow the species (the usual setting) or other measures: generation, mutations, DNA length and genetic distance, which paints each bot according to how much it resembles the selected bot. With the enriched view, the inspector (see The inspector) shows a bot's species, mother and living children and, with “Family”, highlights all of its descendants in the world.

In Analyze (see Analyze) there are four tabs for this:

The Genetics tab is the most direct way to watch evolution in action: in Your first evolution experiment there is a step-by-step experiment.