Code center > Darwinbots Program Source Code
How is the children's color decided?
Peksa:
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.
EricL:
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.
Numsgil:
Does the child of a sexrepro get its DNA mutated, too?
Peksa:
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.
EricL:
--- Quote from: Numsgil ---Does the child of a sexrepro get its DNA mutated, too?
--- End quote ---
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.
Navigation
[0] Message Index
[#] Next page
Go to full version