Author Topic: Sexual Reproduction Focus Group  (Read 12100 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7725
    • View Profile
Sexual Reproduction Focus Group
« Reply #45 on: September 02, 2006, 12:41:47 PM »
That brings up a good point.  We have to be very careful that any mating between non plants and plants becomes a non plant, or you'll end up with a simulation of immortal bots running around, which isn't good.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Sexual Reproduction Focus Group
« Reply #46 on: September 07, 2006, 06:56:10 AM »
The good news:

I've gotten sexrepro working beautifully and seemed to have found every nrg related bug it can cause.

The bad news:

Mutations [you]don't[/you][/b] spread.

The story:

Ran DB for an entire day de-bugging it in VB, every so often it'd find a bug. I figured out what was going wrong, fixed it, and it continued on it's merry way.

After the sim reached some 5,000,000 cycles(1000+ bots) I went and took a look. On the plus side no canni's, on the downside no evolution... It appears the half and half system works too well on error correction, the bots would occasionally mutate but the odds were annoyingly high against any mutant dna spreading.

Anyhow I'm working on a version of recombination that will hopefully correct this. Preferably it'd work by switching genes with the nearest neighbors something similar to how it works in real life. I'm guessing this is better than truly random mixing since several interesting/useful mutations require a linear order to have an effect.

The bugs I found during the run mainly concerned huge negative nrg values causing crashes in pain/pleas and refnrg. I borrowed the code:

If Abs(x) > 32000 Then
x = 32000 sgn(x)

To correct the problems.

I also modified the sexrepro code to allowparents to regain some of their gift nrg in cases where the child's nrg exceeds 32000.

Alrighty, gotta get going. I'll send the latest vers of 2.37.7 when I can.

Endy

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7725
    • View Profile
Sexual Reproduction Focus Group
« Reply #47 on: September 07, 2006, 07:23:02 AM »
It would be good to see if you could merge your changes into the current version Eric's working on, since I don't think that sexrepro is even activated.  Eric seems a little AWOL at the moment, so I don't think he'll mind you tinkering in his code

If you like I can take a look and see if I can get my idea for recombination working in the current version.  Shouldn't be too terrible.
« Last Edit: September 07, 2006, 07:24:16 AM by Numsgil »

Offline Zinc Avenger

  • Bot Builder
  • **
  • Posts: 56
    • View Profile
Sexual Reproduction Focus Group
« Reply #48 on: September 07, 2006, 07:59:32 AM »
Quote from: Numsgil
Not at all, feel free to put in up to and including $0.86

My only counterpoint is this question: does it add a new ability?  If it's just a segmenting of nrg, it doesn't do anything nrg by itself couldn't do.  Body, for instance, is used as a way to increase power.  Venom adds a new ability to the bot (venom shots).  etc. etc.  What does sex nrg do other than exist?

If you can think of a good reason for it to exist, then I wouldn't see any reason for it not to.

I was trying to come up with something that fitted in with the other features of the darwinbots system. If sex nrg is tracked separately as a "substance" like body, venom, slime etc. it could be transferred, shared and stolen by any of the means which are normally used for those substances, and reproduction would be linked to movement of sex nrg instead of calling an arbitrary function.

This allows the actual form the reproduction takes to be designed into genes using existing commands leading to more flexibility.

I'd say that this method does add a new ability to a bot - a bot which stores sex nrg will be able to initiate sexual reproduction. A bot which doesn't would still be able to participate, with weaker offspring because it wouldn't contribute sex nrg to the offspring's nrg total.
« Last Edit: September 07, 2006, 08:00:36 AM by Zinc Avenger »

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Sexual Reproduction Focus Group
« Reply #49 on: September 08, 2006, 09:47:54 AM »
Quote
Been playing with this on and off myself. I'll agree that's its way too easy to abuse the current system.

Some issues:

I've made species of bots that keep track of the other's sexrepro location then mate only if the other's nrg contributation is higher than their own. One bot will be giving 50% and the other a miserly 1%.
Well, you should think at it in an evolutionary way. If a bot can reproduce successfully giving only 1% of its energy, its genes will spread fast. And therefore it will soon be in competition with other bots which adopt the same strategy. Two bots adopting this strategy wouldn't be able to mate (each one is looking for the other having more energy) so that eventually being able to mate with everybody becomes an advantage again. Seems to produce an ESS (evolutionary stable strategy). Anyway, that's not an issue: observing this kind of effects is precisely what alife simulators are made for.
It would be nice to know the details of such a simulation. Can you tell us more about that? Maybe the graphs of the two populations, the "good guys" and the "higher than my own" guys? (Though probably there isn't a suitable tool for doing that in DB... something to watch for the spreading of a certain portion of dna in the population... good idea...)

Anyway, in real life thing seem to go pretty much this way. Everybody's looking for a partner which he considers to be at least as fit as himself... that's why we often fall in love with people who don't love us, and that's why, as years go on, we are content with something less


Quote
BotA: I'm willing to give X nrg
BotB: Well then, I'm willing to give Y nrg
Result: Both parents agree and a baby is formed
People seem to be much less sensible than that. You're way too optimistic about life

It's also possible to ensure all your genes are carried by another bot by simply doubling your geneome.
Quote
Ie. AAbbCCddEE (with each letter representing two identical genes)
This bot will always have 1/2 of it's genome carried into the child.
Yes, very important genes could be present in the dna in multiple copies to make the bots sure that they will be present also in the offspring; but having each one of your genes present in the offspring doesn't make the offspring more fit - if those genes arent' good genes. In other words: the only plausible effect is that very important genes are duplicated to ensure their presence in the offspring.

Quote
One last problem is the geneome size mismatch problem. A SG bot can take the majority of another's dna during sexrepro. Which explains these infernal plants we wind up with...
Obviously, the result of a mating between a veg and a non-veg has to be a non veg.
« Last Edit: September 08, 2006, 09:49:44 AM by Carlo »

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Sexual Reproduction Focus Group
« Reply #50 on: September 11, 2006, 03:25:24 AM »
Good points  

I re-ran the sim again and it turns out to be something of a draw. The 1% bot technically won, but the offspring are actually a hybrid species of the two.  

Developed this gene to counter the lack of mutation:

cond
*.sexrepro 0 =
*.nrg 5000 >
start
'Approximatly every 10 reproductions, bot mrepro's instead of sexrepro's
50 .sexrepro -10 rnd 1 add 0 floor sub store
stop

Coincidentially this is one of the transfered genes in the hybrid