Code center > Suggestions

Genetic Distance

<< < (3/3)

shvarz:

--- Quote ---I don't get that. Seems to me genetic distance is the only way to define a species when we are talking about asexual reproducers since the fuzzy definitions we use for sexually reproducing species such as "can successfully mate with each other" don't apply.
--- End quote ---

Sorry, you are correct here. I'm getting a bit sick, so I'll blame my lack of judgment on that .  I guess what I meant was that "can successfully mate" is an easy litmus test for genetic divergence. With asexual organisms every mutant is its own species. Which means that we will have to set an artificial limit on how far genetically a bot has to be from another bot to be called a new specie. Which is fine, it should work.

A couple of concerns/questions:

You are going back 100 generations to look for MRCA and then calculate genetic distance from that MRCA. What are you going to do if bots don't have a common ancestor over 100 generations? Automatically call them different species?

How can you deal with gradients of diversity? What if bots A and B are different enough, but there is a bot C that is in between them and is not different from either A or B?  

Anyway, let's try it and see how this works on practice. It's much easier to spot things that work and don't work on something specific, rather than on an abstract idea.

Suggestion: Now bots change color as they mutate. If we implement this system, it would be neat to change bot color only when a new specie is formed. Would make it much easier to track these events.

EricL:

--- Quote from: shvarz ---You are going back 100 generations to look for MRCA and then calculate genetic distance from that MRCA. What are you going to do if bots don't have a common ancestor over 100 generations? Automatically call them different species?
--- End quote ---
100 is just an arbitrary nubmer I choose.  I could bump it to 1000 or more if needed.  Just takes memory.

I don't know what we should do when no MRCA is found.  Depends on the feature that is utilizing these underlying data structures I guess.  For phylogenetic trees, I'd just have multiple trees.  For speciation, well, yea, I assume the UI will expose some knob that allows the human to specify the speciation distance up to the limit.


--- Quote from: shvarz ---How can you deal with gradients of diversity? What if bots A and B are different enough, but there is a bot C that is in between them and is not different from either A or B?
--- End quote ---
An excellent question!  I have no idea!  Perhaps we don't speciate unless there is clear clumping of populations with no intermediataries.  My plan is first just to take a look at what there is to see.  Do we see well defined clusters with short distances among them?  Or do we see gradients?  Our sims may just be too small...  


--- Quote from: shvarz ---Suggestion: Now bots change color as they mutate. If we implement this system, it would be neat to change bot color only when a new specie is formed. Would make it much easier to track these events.
--- End quote ---
I like it.

Sprotiel:
Last time I was active in DB, I created a script to get phylogenetic trees from saved sims (see this thread). Eric, I believe you should reuse my algorithm, it needs in the average case only O(m*n log(n)) direct comparisons of mutations.

Basically, each node in the phylogenetic tree corresponds to a genome. The node stores the mutation history from its parent to itself and the number of living bots having the corresponding genome. To add a new bot, you compare recursively its mutation history with that of the nodes, starting from the root. When there's a full match with a node, you try to match the bot with the node's children. If there is no match (or no children), you create a new child. In the case where there's only a partial match (I'm not sure it can happen in your setting), you need to create a new node for the common ancestor of the bot and the node being matched. When a bot dies, you decrement the counter and prune nodes if it falls to zero.

Testlund:
Great ideas all over!   Hope to see it!

Navigation

[0] Message Index

[*] Previous page

Go to full version