Author Topic: How is the children's color decided?  (Read 3934 times)

Offline Peksa

  • Bot Destroyer
  • ***
  • Posts: 118
    • View Profile
How is the children's color decided?
« on: May 01, 2008, 06:35:04 PM »
With .repro and .mrepro it seems to change a tiny bit with mutations, but how is it determined when using .sexrepro? I've got a long running sim with more than hundred averagemutations, but the colour of the bots hasn't really changed from the original red.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
How is the children's color decided?
« Reply #1 on: May 01, 2008, 06:58:09 PM »
Color is inherited down the maternal line and both non-reproduction time and reproduction time mutations should tweak the color over time as with asexual reproduction.

Note that virus infections and (I think maybe) sexual reproduction may bump the mutation count, giving a false indication of the number of actual mutations.  The logic here is that I write to the mutation details and bump the counter anytime the genome is changed.   I should probably do the same when .delgene does something for consistency, or perhaps invent a new catagory for this non-mutation genome changing occurances.   But at the momnent, color isn't changed when these things happen - only when actual mutations occur.  

And of course, I could always have a bug.  Open one if you think so.
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
How is the children's color decided?
« Reply #2 on: May 01, 2008, 07:00:01 PM »
Does the child of a sexrepro get its DNA mutated, too?

Offline Peksa

  • Bot Destroyer
  • ***
  • Posts: 118
    • View Profile
How is the children's color decided?
« Reply #3 on: May 01, 2008, 07:09:22 PM »
No the colour has changed, but very little. About half of the bots are reddish brown and the rest slightly lighter red than the default. Theres also small number of other shades of red.

Sexual reproduction in itself doesn't increase the mutation count. Mutation details show more than 400 lines, most of them info on .sexrepro, and the bot's mutation counter is at 135. Actually 4 to 1 ratio seems to fit the mutation details list.

I'm a bit against adding a new category for non-mutation genome changing stuff. I don't know if the info is really relevant and it could be dug from mutation details. I'm all for including .delgene in mutation counter if it shows up in mutation details too.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
How is the children's color decided?
« Reply #4 on: May 01, 2008, 07:19:12 PM »
Quote from: Numsgil
Does the child of a sexrepro get its DNA mutated, too?
Yes.  In fact, only the child is mutated.  As with asexual reproduction, offspring are mutated when born, parents are not mutated when they reproduce.  There is code to mutate parents as well as offspring when they reproduce, but that has been disabled since before I took over the code.
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
How is the children's color decided?
« Reply #5 on: May 01, 2008, 07:33:26 PM »
I didn't mean child mutating in addition to parent mutating, but child mutating in addition to child getting crossed over.  The parent not mutating I was aware of before.  I think shvarz was the primary proponent of that, actually, so I'm sure there's some good reasoning for it

Offline Peksa

  • Bot Destroyer
  • ***
  • Posts: 118
    • View Profile
How is the children's color decided?
« Reply #6 on: May 01, 2008, 08:10:11 PM »
I looked at mutation details from a brown bot and a red bot and discovered that their last common maternal ancestor was 700 kc ago! After looking at a couple of different bots I found the last common maternal ancestor with different colours to be 300-700 kc in the past. That's only maternal line, but I still think it's quite neat.

DNA's were actually quite different, but the core functions almost the same. Number of eyes was the same as it's used for conspec recognition, but there were some differences in conditions for different genes.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
How is the children's color decided?
« Reply #7 on: May 01, 2008, 09:37:50 PM »
Quote from: Numsgil
I didn't mean child mutating in addition to parent mutating, but child mutating in addition to child getting crossed over.  The parent not mutating I was aware of before.  I think shvarz was the primary proponent of that, actually, so I'm sure there's some good reasoning for it
Ah.  Yes.  The offspring DNA from sexual reproduction is generated by crossing over the two parent's DNA and then mutating the resulting genome.  The process is identical to asexual reproduction with the exception that the offspring's genome is generated via the crossover.   Note that mutation probabilities are also inherited down the maternal line.
Many beers....