Darwinbots Forum

Code center => Bugs and fixes => Bug reports => Topic started by: Billy on July 27, 2014, 03:29:11 PM

Title: Is sexual reproduction broken?
Post by: Billy on July 27, 2014, 03:29:11 PM
I've been writing a bot (Rapeseed) that's supposed to shoot sperm at other bots when attacked and force sexual reproduction, and if its gene appears in the child bot then it deletes the other genes, becoming a clone of Rapeseed, if you see what I mean. It isn't working. The attacker bot is fertilized and .sexrepro is set to 99, but it refuses to undergo sexual reproduction. The memory locations .fertilized and .sexrepro then become fixed at (usually) 9 and 99 respectively after Rapeseed is dead. To my knowledge, that isn't meant to happen.

Is this a bug, or does sexual reproduction perhaps only work between bots of the same species?

Edit: Here's the DNA of Rapeseed so far, just in case it's something to do with that.

Code: [Select]
'Rapeseed


def forcerep 100

start
*.thisgene 2 sub -1 mult 0 floor 2 mult *.thisgene 1 sub sgn add *.genes 1 sub sgn mult .delgene store
16000 *.chlr sub abs .mkchlr 16000 *.chlr sub sgn 0 floor mult .rmchlr *.chlr 16000 sub sgn 0 floor mult add store
*.nrg *.body sub abs .strbody *.nrg *.body sub sgn 0 floor mult .fdbody *.body *.nrg sub sgn 0 floor mult add store
.aimdx inc
*.nrg 5000 sub sgn 0 floor 50 mult .repro store
*.shang *.shflav sgn abs mult .aimshoot store
*.forcerep 1 sub abs .forcerep store
-8 *.forcerep 1 sub abs mult .sexrepro *.forcerep mult add *.shflav abs sgn mult .shoot store
99 *.forcerep mult .shootval store
stop
Title: Re: Is sexual reproduction broken?
Post by: Botsareus on July 27, 2014, 06:45:13 PM
Been a while Billy, welcome back.
Robots must be similar enough to reproduce, if a robot is less then 40% similar then the mother has a 'birth defect' and can not get prego again for 8 cycles.
Attached is two robots I love to test sexrepro with.
Title: Re: Is sexual reproduction broken?
Post by: Panda on July 28, 2014, 12:35:55 PM
BILLLLLLLLLLLLLLLYYYYYYYYYYYYYYYYYYYYYYYYY! Hey! :D
Title: Re: Is sexual reproduction broken?
Post by: Botsareus on July 29, 2014, 06:39:25 PM
Billy, try a virus...
Title: Re: Is sexual reproduction broken?
Post by: Billy on July 30, 2014, 03:26:05 PM
Hi Panda. :)

Thanks for the welcome, and the bots, Botsareus. I was not aware of that feature of sexual reproduction, perhaps it was added since I was last active here. I have made similar bots using viruses before now.
Title: Re: Is sexual reproduction broken?
Post by: Panda on July 30, 2014, 06:33:09 PM
I think it might have been, to be honest! I cannot remember now, though.
Title: Re: Is sexual reproduction broken?
Post by: Billy on July 31, 2014, 10:04:04 AM
I think it might have been, to be honest! I cannot remember now, though.

I'm pretty sure it was, I seem to remember "rapebots" existing before.
Title: Re: Is sexual reproduction broken?
Post by: Botsareus on July 31, 2014, 03:12:04 PM
I ended up doing a complete overhaul of sexrepro last year and writing a paper on it. It is based on 'find longest common sequences' (an idea from Numsgil) Now how to publish?  :)
Title: Re: Is sexual reproduction broken?
Post by: Billy on July 31, 2014, 06:01:41 PM
I ended up doing a complete overhaul of sexrepro last year and writing a paper on it. It is based on 'find longest common sequences' (an idea from Numsgil) Now how to publish?  :)

Right, yeah, that explains it. Brings it slightly closer to sexual reproduction IRL, but I suppose in this case, a bot represents and entire multicellular organism, rather than a single cell.
Title: Re: Is sexual reproduction broken?
Post by: spork22 on August 01, 2014, 12:28:42 PM
Maybe that's why multibots aren't very common. It's kind of like a three-legged race. The bots can function on their own, so why tie them together?
Title: Re: Is sexual reproduction broken?
Post by: Botsareus on August 01, 2014, 09:48:01 PM
Robots tend to de-evolve sexrepro very often as well. I actually had to put a check called "Disable asexual reproduction for un-repopulating robots" on the edit menu to force robots to reproduce sexually. I conclude that it takes a long time and millions of mutations for multibotness and sexual reproduction to become useful, just like in real life.
Title: Re: Is sexual reproduction broken?
Post by: Botsareus on August 02, 2014, 10:12:13 AM
Here is a counter argument that Numsgil is supposedly addressing with DB3. Robots in DB2 do not need unique ability to move and to see. While in real life, single celled bacteria can not swim really fast and needs to form an organism to swim faster. Travel on land is the same issue, but is even harder to accomplish as basic swimming motion does not work. Finally, an eye organ needs to form to be able to see. An advantage being that you can see reasonably far away. Which is impossible to do in DB2.

However, all this requires very smart logic and powerful hardware to get a responsible frame rate.