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

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
Sexual Reproduction Focus Group
« Reply #30 on: August 11, 2006, 04:10:21 PM »
This is what I have been trying to say all along Elite ...
keep it simple. Do the basics. But let the bots ...
and their relationship with the enviornment evlove.
Let's go for evolution, not intellegent design!!!
And yes, sexual reproduction works, [at least in our world] ...
it's a good thing. I have no problem at all with that.
We do want to incorporate sexual reproduction.
What I object to is that folks think it is a 'choice' that organisms
make that is based upon something other than survival of the fittest.
The peacocks tail, and other such 'seemingly' nonutilitarian frills ...
continues to exist because it demonstrates that an organism has
prospered in the face of evolutionary pressure ...
that it can afford such luxuries. 'Look at me!"
No animal could afford such luxuries that serve no utilitarian
pupose unless it had indeed become proficient at survival ...
had evolved to become a healthy and viable organism.
It is something that worked. Period.
 
This same thing underlies why humans are unconsciously attracted  
to other humans, to what they find 'beautiful' and attractive in another.
It isn't so much a 'choice' as it is the organisim recognizing the
potential mate is healthy and strong.
If you want to call that 'choice' ... ok.  
But it is subconscious, not a conscious 'rational' choice.
These traits and attractions exist and continue to exist only because
they continue to work.
And it is something that has evloved ...
not something designed in from the beginning.
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sexual Reproduction Focus Group
« Reply #31 on: August 12, 2006, 01:51:09 AM »
First, none of you are getting the way sexrepro was programmed right, and so your conclusions are flawed.  This is classic sexrepro in a nutshell:

0.  Sex is performed between two bots.  The first bot is the one that initiated the sexual reproduction.  The next bot is the bot that's next in the reproduction array.  Who's next in the reproduction array?  The last bot that the initiating bot saw in eye5.  If this other bot is not sexually reproducing, sexrepro shouldn't occur.

1.  Both bots' centers must be within 2 robsizes of each other.  ie: they basically have to be within 1 robot length of touching.

2.  Both bots DO NOT have to be sexreproing at the same time.  sexrepro isn't cleared every cycle.  It's only cleared if the bot successfully sexrepros.  Thus an unwary bot could find itself forced to reproduce and contribute all of its energy to an offspring.  This could be used as a weapon.

3.  Properties are determined by how much each parent contributed during sex.  It handles poorly things like species lineage, generation, robot color, and other properties that would probably make more sense by remembering both parents.  This basically means that any person trying to figure out what's going on in their sexrepro sim is going to be very confused.

4.  The parents' DNA is shuffled every other gene.  That means 1st gene comes from mom, second from dad, third from mom, fourth from dad, etc.  Any leftover DNA (one parent has more genes than another) is either slapped on the end of the child or not (depending on a 50/50).

5.  Ties are formed between mom and child and dad and child.

The problem with the original sexrepro:

1.  Selection of mates is too limited.  Sexual reproduction needs to be a mostly consensual.  You need to be sure exactly who you're mating with.

2.  The code was a little sloppy, resulting in it not being maintained, and hence buggy.

3.  The code was gene-centric.  Post 2.4, the only gene centric DNA commands relate to viruses.  The gene structure is just too impossibly complex to do this anymore in a meaningful way.  Also simply lining up genes and picking one from either one DNA or the other won't work effectively when you begin to consider large insertions, deletions, and reversals (mutation types that do not cause catastrophic failure in real organisms).  If a bot is missing gene 2 you would hope that genes 3, 4, and 5 would still cross over effectively.  You hope that gene 2 might even be replaced by a sexual encounter.  This isn't possible if you just mindlessly shuffle the 1st genes followed by the second genes, etc.

4.  Fails to model any but the macroscopic version of sex.  By which I mean a mother and a father copulating to produce a new unique organism. As opposed to microscopic sex that involves two organisms fusing, their haploid DNA becoming diploid.  Both should evidently be very different.
----------------------------------------------------
The following is no longer necessarily fact, but is my own personal opinion:

Crossing Over:
The best solution is to line up the DNA based on similar sequences instead of similar positions.  You then "twist" the strands in a few random places to shuffle it a bit.  Very simple swapping.

This is not complicated.  It is in fact ingeniously simple when you consider the number of programatic hurdles to overcome.  Any complication people percieve is entirely in their minds.  It is in no way more complicated than "swap every other gene", or something similar.

There is a reason the mechanisms of sex have been maintained so well over the course of eukaryotic evolution.

Mechanics of Sex:
Sex needs to be 95% consenual.  By which I mean RAPE has a place evolutionarily speaking, but it should be a little difficult.  The current system models this reasonably well since sexrepro isn't cleared, but I think clearing it every cycle would be better.

Both bots should be tied to each other.  Shots are simply not personal enough.  Mating needs to be topologically close, both in time and space.  (both bots consent at the same cycle within a set distance boundary, preferablly in indirect or direct physical contact).

Sex should have at least two basic possible results:
1.  Both bots fuse, the resulting bots' DNA is an amalgamate of both parent bots.  Preferably this would be diploid, and thus keep both parent's DNA intact (so an intact seperation would be possible), but this is probably just wishful thinking.  This models the sort of sex we see in funguses and things like sperm and eggs.

2.  (Either one or both) bots produce a new unique child with an amalgamate of the two parent's DNA.

Other possibilities should be obvious (multiple parents, for instance), even if not practical to implement or based in reality.  But the two above would need to be both included for me to call it reasonable effort.
« Last Edit: August 12, 2006, 02:00:53 AM by Numsgil »

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Sexual Reproduction Focus Group
« Reply #32 on: August 12, 2006, 06:18:09 AM »
Quote
0.  Sex is performed between two bots.  The first bot is the one that initiated the sexual reproduction.  The next bot is the bot that's next in the reproduction array.  Who's next in the reproduction array?  The last bot that the initiating bot saw in eye5.  If this other bot is not sexually reproducing, sexrepro shouldn't occur.
1.  Both bots' centers must be within 2 robsizes of each other.  ie: they basically have to be within 1 robot length of touching.
This makes sense. Not only they have to physically near, they also have to be watching each other. Romantic, isn't it? This allows a bot to know exactly who is he mating with, even if there are other bots around.

Quote
2.  Both bots DO NOT have to be sexreproing at the same time.  sexrepro isn't cleared every cycle.  It's only cleared if the bot successfully sexrepros.  Thus an unwary bot could find itself forced to reproduce and contribute all of its energy to an offspring.  This could be used as a weapon.
This give bots more control. If they want, they CAN clear sexrepro at every cycle. It's a matter of choice.

Quote
3.  Properties are determined by how much each parent contributed during sex.  It handles poorly things like species lineage, generation, robot color, and other properties that would probably make more sense by remembering both parents.  This basically means that any person trying to figure out what's going on in their sexrepro sim is going to be very confused.
This isn't a problem of the simulation in itself, but of its framework. Simply, DarwinBots wasn't designed to keep track of two parents per reproduction. Same for generation, the very concept can't apply to a sexual reproduction. Robot colors can be mixed, or inherited randomly, but hey, who cares? Anyway, minor problems here.

Quote
4.  The parents' DNA is shuffled every other gene.  That means 1st gene comes from mom, second from dad, third from mom, fourth from dad, etc.  Any leftover DNA (one parent has more genes than another) is either slapped on the end of the child or not (depending on a 50/50)
.
This is the worst thing in sexrepro. It works as long as there aren't gene duplications or deletions, otherwise it is likely to shuffle off the genome some important gene shared by both robots. It should be substitued by an algorithm lining up similar genes in groups and then taking approximately half of the copies per group.

The problem with the original sexrepro:

Quote
1.  Selection of mates is too limited.  Sexual reproduction needs to be a mostly consensual.  You need to be sure exactly who you're mating with.
You can, if you take care of your .sexrepro. And the lesson is: if you give it around to everybody, you can't blame society for being a teen mother.


Quote
3.  The code was gene-centric.  Post 2.4, the only gene centric DNA commands relate to viruses.  The gene structure is just too impossibly complex to do this anymore in a meaningful way.  Also simply lining up genes and picking one from either one DNA or the other won't work effectively when you begin to consider large insertions, deletions, and reversals (mutation types that do not cause catastrophic failure in real organisms).  If a bot is missing gene 2 you would hope that genes 3, 4, and 5 would still cross over effectively.  You hope that gene 2 might even be replaced by a sexual encounter.  This isn't possible if you just mindlessly shuffle the 1st genes followed by the second genes, etc.
Well, the whole DarwinBots was gene-centric when I added sexrepro, and (to be honest) I don't even know what the actual dnas look like (or could look like). If genes aren't well separated anymore, then things get more complex. But the basic point should be the same: grouping similar sequences and then choosing randomly which to use in the new dna.

Quote
4.  Fails to model any but the macroscopic version of sex.  By which I mean a mother and a father copulating to produce a new unique organism. As opposed to microscopic sex that involves two organisms fusing, their haploid DNA becoming diploid.  Both should evidently be very different.
That's a different problem. There are many things the actual repro and sexrepro fail to model, being high level commands that just fire an automated process. But until we focus on organisms behaviour and leave out the details, I don't think that there's any need to model low level sexual haploidy and diploidy. Bots are well defined individuals, like sheep or ants, so they aren't expected to fuse, but to mate.

----------------------------------------------------
The following is no longer necessarily fact, but is my own personal opinion:
Quote
Crossing Over:
The best solution is to line up the DNA based on similar sequences instead of similar positions.  You then "twist" the strands in a few random places to shuffle it a bit.  Very simple swapping.

This is not complicated.  It is in fact ingeniously simple when you consider the number of programatic hurdles to overcome.  Any complication people percieve is entirely in their minds.  It is in no way more complicated than "swap every other gene", or something similar.
I'd start with this, which fixes the actual working of sexrepro without any major change at high level. Then you can add whatever you want, but before making great plans, I'd just fix what's broken.
« Last Edit: August 12, 2006, 06:21:20 AM by Carlo »

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Sexual Reproduction Focus Group
« Reply #33 on: August 12, 2006, 08:51:19 AM »
Anyway, I'm leavin' for holidays. Will be back in a week or so.
Good bye!

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sexual Reproduction Focus Group
« Reply #34 on: August 12, 2006, 11:01:59 AM »
Quote from: Carlo
This makes sense. Not only they have to physically near, they also have to be watching each other. Romantic, isn't it? This allows a bot to know exactly who is he mating with, even if there are other bots around.

Not exactly true, which is part of the peculiarity.

When a bot no longer sees any bot, the .lastopp (the bot it saw last) variable isn't reset.  Let's say that the bot it wanted to mate with managed to die before it could mate.  The other bot will still be pining away for bot #21, whose slot happends to be empty.  Since sexrepro isn't reset, it will keep trying to mate with bot #21.  Eventually, slot #21 will be filled again, and should that new bot be attempting to mate too, and happen to be relatively close, the bot will end up mating with that bot.

Likewise, it's possible that if bot A and B are mating, bot C could look at bot A and mate with it.  Or it could be that they form a threesome, with bot A taking DNA from bot B, who takes DNA from bot C who takes DNA from bot A.  Theres no code to deactivate a parent's sexrepro once another bot decides to mate with it until a child is formed, which means its possible a bot could find itself the parent of 5 or 6 children when it only mated once.

These peculiarities are only what I could see in the actual code.  There might be many others.

Quote
This isn't a problem of the simulation in itself, but of its framework. Simply, DarwinBots wasn't designed to keep track of two parents per reproduction. Same for generation, the very concept can't apply to a sexual reproduction. Robot colors can be mixed, or inherited randomly, but hey, who cares? Anyway, minor problems here.

Minor problems yes, but problems that should be addressed, especially if you want to study the ancestry of a bot (which would be important for studying group genetic drift, or something similar).

Quote
Well, the whole DarwinBots was gene-centric when I added sexrepro, and (to be honest) I don't even know what the actual dnas look like (or could look like). If genes aren't well separated anymore, then things get more complex. But the basic point should be the same: grouping similar sequences and then choosing randomly which to use in the new dna.

I'm not blaming you, it worked well when you first created it.  It's just outdated anymore.

Quote
That's a different problem. There are many things the actual repro and sexrepro fail to model, being high level commands that just fire an automated process. But until we focus on organisms behaviour and leave out the details, I don't think that there's any need to model low level sexual haploidy and diploidy. Bots are well defined individuals, like sheep or ants, so they aren't expected to fuse, but to mate.

Many organisms live half of their life as a haploid individual and the other half as a diploid individual.  Both existances are well defined.  The most everyday example of such an organism is the Fern.  This alternation of generations is fundamental to many life cycles.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Sexual Reproduction Focus Group
« Reply #35 on: August 22, 2006, 09:16:08 AM »
Horray I'm back  

Played around with sexrepro myself. The version I'm using has some benneficial changes though. I've increased the distance allowing the bots to mate with bots at a farther radius. I also added a protective feature to make the code check veggie population size before allowing reproduction(fixing a major bug allowing truly super massive plan populations).

I tend to think of it as more like a very primitive crossing over event rather than true sexual reproduction. Realisticly enough a bot that uses both sexrepro and normal repro does better in terms of genetic diversity than typical species. (.repro 1 rnd 2 mult add) ( ie. switches between repro and sexrepro).

Still has problems with weird plant-animal hybrids, these odd super animals kill off their own primitive plant ancestors and well eventually crash the ecosystem.

Been playing around with adding code to delete even or odd halves of a bot's dna, with the intention that then the bots could mix their half with anothers. Can't quite the code right though  

On sperm:

I'm guessing here but I think our and other higher animals' sperm is evolved/designed to live short times. The temperatures they survive at are lower than typical core body temeperatures. Still guessing but I think it may be to limit mobility within the body, just me but I wouldn't want one of them winding up interfering with my normal cells  .

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Sexual Reproduction Focus Group
« Reply #36 on: August 25, 2006, 06:41:05 AM »
Quote
When a bot no longer sees any bot, the .lastopp (the bot it saw last) variable isn't reset.  Let's say that the bot it wanted to mate with managed to die before it could mate.  The other bot will still be pining away for bot #21, whose slot happends to be empty.  Since sexrepro isn't reset, it will keep trying to mate with bot #21.  Eventually, slot #21 will be filled again, and should that new bot be attempting to mate too, and happen to be relatively close, the bot will end up mating with that bot.

Just a little bug. Very unlikely to happen, but, to fix it, you can just add to the internal value of lastopp the unique id of the seen bot. And before doing anything with the lastopp value, you should check that the bot in the array slot has the correct unique id. The lastopp stores the array slot instead of the unique id just for speed purposes.

Quote
Likewise, it's possible that if bot A and B are mating, bot C could look at bot A and mate with it.  Or it could be that they form a threesome, with bot A taking DNA from bot B, who takes DNA from bot C who takes DNA from bot A.  Theres no code to deactivate a parent's sexrepro once another bot decides to mate with it until a child is formed, which means its possible a bot could find itself the parent of 5 or 6 children when it only mated once.

Isn't necessary for bots to be both looking at each other in order to mate? And the .sexrepro value should be set to zero once a mating took place. If bot 1 mates with bot 3, bot 2 can't mate with 1 in the same cycle, since when the procedure examines bot 2, bot's 1 sexrepro has been set to zero (it may be that the code actually sets to zero the sexrepro after examining ALL the matings, but then we can just modify a little the code. By the way, yes, having a low slot in the bots array actually has some advantages, but since the slot is  chosen randomly, those advantages are equally distributed among all species).


Quote
(parents and generation tracking are) Minor problems yes, but problems that should be addressed, especially if you want to study the ancestry of a bot (which would be important for studying group genetic drift, or something similar).

Problems that would become even worse if we introduce diploidy, genes sharing, etc. So, they can't make you look for such kinds of alternatives. Anyway, a serious study of the simulation can be made ONLY through the database recordings, which should just record two parents instead of one to let you keep track of the complete genealogic tree. So, the only thing to do here is duplicating the parent field in the robot's data and record it in the database file. As for the generation data, we can give an indicative value like the mean of the parent's generations + 1 or something like that.

Bye,
Carlo

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Sexual Reproduction Focus Group
« Reply #37 on: August 25, 2006, 02:15:09 PM »
So currently with sexrepro not being reset it could see another bot that has it's sexrepro activated then effectivly it would "hold" that bot's dna until it can afford to reproduce.

This could actually be something of a bennefit in the bot's world. Trying to co-ordinate an exact timing would be pretty difficult otherwise. Still kind of problematic possible having it wind up being some other bot's dna, instead of the desired dna; but then again perhaps useful in it's own way.

Read what Nums wrote again and I had an idea  

Maybe add a random gene shuffling ability. This would randomize the gene structure enough that if the bot is missing a particular gene, it might get it back the next sexrepro attempt. (strangely we ourselves have something very similar to this, hmm...)

Perhaps have it be possible both within the bot itself, and make it automatic with the dna sexrepro'd. Maybe have an array of all the bot's genes then randomly pick from this array until there are no more genes.

Family Trees:

Is it really even possible/practical to do a complete dna trace anymore? I'll have sims going with sexrepro, repro and viruses; causing all kinds of gene swapping. Just try imagining creating a complete human dna tree going back through every single ancestor, including all dna picked up from every possible source including the retro-viruses and the animals they got their dna from... I think it's becomming impossible to keep tabs on every single thing going on.

I think Tierra has some sort of mode that turns off certain dna swappings, perhaps it'd be a good idea to add something similar.
« Last Edit: August 25, 2006, 02:38:24 PM by Endy »

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Sexual Reproduction Focus Group
« Reply #38 on: August 25, 2006, 05:21:34 PM »
So what have we agreed on so far?

Can we start to begin formulating a system?

So long as bots have to consent before reproduction, and it is possible to pick a partner with precision, then I see no problem in how the actual reproduction is acchieved. DB is an artificial life sim, and so there's potentially unlimited flexibility in how it maps to real life.

So do we want to acchieve partner selection through:
 - Ties?
 - Line of sight?
 - Shots?
 - Proximity/Physical contact?

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Sexual Reproduction Focus Group
« Reply #39 on: August 26, 2006, 08:11:44 AM »
I think the currently implemented rules for sexrepro are almost ok.
This is the way I think sexrepro should be implemented now:

1) Sexual reproduction can be performed by two normal bots through the use of the .sexrepro location, and results in the creation of children bots with a "good mix" (more on this later) of the dnas of the parents.
2) The partner for the mating has to be clearly identified: this is achieved by having bots looking each other.
3) The mating should be generally consensual: both bots should have their sexrepro location activated.
3.1) The .sexrepro location value should express the percentage of his own energy each bot would give to the child. This is particularly interesting because gives birth to a prisoner's dilemma game.
3.2) The .sexrepro location is not reset until a mating occurs (this makes easier to mate if no selection of the partner is made).
4) The mating bots should be in proximity of each other (no "action at a distance").
5) A bot may be involved in only one mating per cycle.
6) After the mating, parents and child are temporarily connected through a reproduction tie (for similarity with asexual repro).

and finally

7) The program should keep track of two parents, recording their IDs
8) The generation value should be discarded when sexrepro is used or substituted by an approx value like (gen par1+gen par2)/2+1 or whatever else

Ok. During the discussion we agreed on the fact that the current way of creating a "good mix" of the dnas of the two parents isn't good at all -it is flawed and, besides, it is gene centric. But Numsgil said he can implement a much more sophisticated dna mixing system, so this should be no problem.

Another point we should consider is how many children should be generated in a mating operation. As the operation of finding a partner is expensive in terms of time and energy, we may decide to allow the creation by the couple of many children at once. The only problem is to decide _how_ the bots may decide to create more children.  One possible solution is to allow robots to mate repeatedly with the same partner while the first mating operation isn't yet complete (that is, while the two parents and the children are still connected by reproduction ties); but we don't even have to explicitly allow it if we don't state that two bots can't mate until one of them is still in a mating operation with a third one. So, either we add two rules (robots can't mate until a previous mating is ended BUT they can do it with the same partner) or we simply let bots mate at every time (which is my preferred, I'm for deregulation).


Quote
So do we want to acchieve partner selection through:
 - Ties?
 - Line of sight?
 - Shots?
 - Proximity/Physical contact?
Couples of bots must be identified by a link of some form connecting them. Shots and proximity won't work since the first are difficult to use and synchronize, and the second is not a 1 to 1 relation. Line of sight and ties would be both ok, but surely the easiest way to identify with precision a couple is to have them looking at each other: it links the two bots, but at the same time leaves them completely free. A tie links two bots, but also has the annoying physical effect of keeping them together. If you consider that the linking operation should take place before bots express their consent to sexual reproduction, you can imagine what a mess would be having horny bots going around linking everybody.

So, who's gonna implement this?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sexual Reproduction Focus Group
« Reply #40 on: August 26, 2006, 12:59:42 PM »
Quote
3.1) The .sexrepro location value should express the percentage of his own energy each bot would give to the child. This is particularly interesting because gives birth to a prisoner's dilemma game.

I can see your point in this, but I have two points that should be considered:

A.  To bots that are mating under microscopic rules, sexual reproduction is really a fusing.  Two bots become one.  In such a system, the number in sexrepro doesn't really have a meaning.  Therefore I think that another variable should hold this information.  Leave .sexrepro to information such as relative amount of mixing, or something similar.  Something universal to the sexrepro process.

B.  Imagine bots that, like worms, cross fertilize each other.  So both end up having babies.  There should be a way of saying wether you're using repro nrg for your own kid or a kid the other bot makes.

Quote
3.2) The .sexrepro location is not reset until a mating occurs (this makes easier to mate if no selection of the partner is made).

The only danger I see is in two bots losing sight of each other and another bot swooping in and mating accidentally.  Losing sight of each other is very easy to do.  One of the bots could get hit by a flying veggy, or bounce against a wall.  It happens alot, even with bots that are designed to follow another bot.

I think it would make more sense to think of sexrepro as a request ("Will you have sex with me?") that must be repeated each cycle.  Like a mating call.  Sort of.

Quote
6) After the mating, parents and child are temporarily connected through a reproduction tie (for similarity with asexual repro).

I would connect only those bots who have contributed resources to the child.  The child should be placed such that the distance from child's perimieter to both parents' perimiter is equal.  If there is only one contributing parent, the child should be placed as .repro kids are.

Quote
7) The program should keep track of two parents, recording their IDs
8) The generation value should be discarded when sexrepro is used or substituted by an approx value like (gen par1+gen par2)/2+1 or whatever else

I think I can devise some sort of tree structure for keeping track of phylogenic trees.

Quote
...simply let bots mate at every time (which is my preferred, I'm for deregulation).

That would be my preference as well.

Quote
Couples of bots must be identified by a link of some form connecting them. Shots and proximity won't work since the first are difficult to use and synchronize, and the second is not a 1 to 1 relation.

I agree.

Quote
Line of sight and ties would be both ok, but surely the easiest way to identify with precision a couple is to have them looking at each other: it links the two bots, but at the same time leaves them completely free. A tie links two bots, but also has the annoying physical effect of keeping them together. If you consider that the linking operation should take place before bots express their consent to sexual reproduction, you can imagine what a mess would be having horny bots going around linking everybody.

And I can see your point here. My only point to point out is that maybe we should allow both line of sight and tieing, if for no other reason than that, should a bot couple wish to mate multiple times, the kid's going to get in the way! If the parents are still tied together, this problem is somewhat circumvented.

Quote
So, who's gonna implement this?

I think this is reallt two questions.  Where and who.

As to where, the C++ base would make the most sense. It's certainly complete enough for all the features listed here, and it has the two benefits of STL vectors to handle DNA swapping (and keeping that swapping code clean) and a relatively well organized code base. On the other hand, since the code hasn't really been released to general use, let alone properly debugged, the implementation would be little more than proof of concept.

As to who, I am personally of limited free time. I have school and work, and between the two I only really have 2 free days a week. So I can do it, it will just take a while, and take second precedence over finishing the tie code in the C++ version and finally releasing an install of it.
« Last Edit: August 26, 2006, 01:02:10 PM by Numsgil »

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Sexual Reproduction Focus Group
« Reply #41 on: August 27, 2006, 08:03:23 AM »
Quote
A.  To bots that are mating under microscopic rules, sexual reproduction is really a fusing.  Two bots become one.  In such a system, the number in sexrepro doesn't really have a meaning.  Therefore I think that another variable should hold this information.  Leave .sexrepro to information such as relative amount of mixing, or something similar.  Something universal to the sexrepro process.

Sexrepro was originally desgned to give the effect of a macroscopic sexual reproduction, and the rules we defined in this discussion are referred to a macroscopic type of sexual reproduction. Fusing (making two cells become one, with the complete dna of both parents) could be an useful and interesting mechanism, but has very little to do with sexrepro as it has just been defined. So I can't see the point in using the same sysvar both for sexrepro and fusing (other than a nominalistic question). Let's just create another sysvar (.fuse, for example) which does the job.

Quote
B.  Imagine bots that, like worms, cross fertilize each other.  So both end up having babies.There should be a way of saying wether you're using repro nrg for your own kid or a kid the other bot makes.
Why? I can't see the point. The sexrepro takes place between two cells, not two worms. The offspring doesn't belong to one or the other worm, but in equal measure to both parents. By the way, it is interesting to figure out some different reproduction schemas for multicellulars. For example, org A and org B could touch each other with a reproductive cell, and the sexrepro would give birth to the embryonic cell of a new individual, while leaving the reproductive cells intact. Or the reproductive cells may invest all their energy in the offspring, disappearing after the mating. The cells may also be released in the environment like sperms or spores, or the mechanism may be asymmetric, with one organism sending its reproductive cell towards the other waiting for it.

Quote
The only danger I see is in two bots losing sight of each other and another bot swooping in and mating accidentally.  Losing sight of each other is very easy to do.  One of the bots could get hit by a flying veggy, or bounce against a wall.  It happens alot, even with bots that are designed to follow another bot.
I'd call it a technique for rape. Obviously sexrepro requires some additional care compared with the "typical darwinbots life" that is just going around almost carelessly and bouncing everywhere. It is possible that sexrepro will require an environment a little bit less competitive and in some way more sluggish, to allow bots to have more control of their movements and their relative positions.

Quote
I think it would make more sense to think of sexrepro as a request ("Will you have sex with me?") that must be repeated each cycle.  Like a mating call.  Sort of.
Well, that's just a matter of taste. Basically, the only difference will be in how much energy the bot will spend to maintain its sexrepro on.

Quote
I would connect only those bots who have contributed resources to the child. The child should be placed such that the distance from child's perimieter to both parents' perimiter is equal.  If there is only one contributing parent, the child should be placed as .repro kids are.
Both parents will contribute to the child. The least contribution possible is 1% of their own energy, but it will be very rare: if both bots contribute for the 1%, they will simply lose the energy (that given to the child and that necessary for the sexrepro command) and the child.

Quote
I think I can devise some sort of tree structure for keeping track of phylogenic trees.
That would be interesting, but not really necessary. It is sufficient for each bot to be recorded in the database with both parent's IDs to rebuild that tree completely when analyzing data.

Quote
My only point to point out is that maybe we should allow both line of sight and tieing, if for no other reason than that, should a bot couple wish to mate multiple times, the kid's going to get in the way! If the parents are still tied together, this problem is somewhat circumvented.
To have them both seems useless, and ties are a problem because of what has been said. Anyway, when sexrepro occurrs, a tie is created between parents, but keeping in sight is an ability bots should show to make more children. Id' just take care of children appearing in some point at the left or right of both parents, not in between.

I think this is reallt two questions.  Where and who.

Quote
As to where, the C++ base would make the most sense. It's certainly complete enough for all the features listed here, and it has the two benefits of STL vectors to handle DNA swapping (and keeping that swapping code clean) and a relatively well organized code base. On the other hand, since the code hasn't really been released to general use, let alone properly debugged, the implementation would be little more than proof of concept.
I haven't seen a working version of the c++ version yet, and if you can work on it just 2 days a week, probably it will take a long time before a usable version is released. The algorithm for swapping dna portions seems trivial in any language (except for the procedure to compare the dnas and find similar portions), and most of the other rules are in the already implemented sexrepro. So maybe you could write out the most difficult part, while others could make up the rest. Any volunteers?

Offline Zinc Avenger

  • Bot Builder
  • **
  • Posts: 56
    • View Profile
Sexual Reproduction Focus Group
« Reply #42 on: August 31, 2006, 10:35:16 AM »
Hi, I've been using Darwinbots for a few months now but I haven't actually posted on this forum until now.

Sexual reproduction is something I've been wanting for a while now, simply because all the long-term evolution sims I've run have ended with extinction. As far as I can tell sexual reproduction is a way of diversifying the population - the offspring is not limited to a single parent's genome plus reproductive mutations. And as I've learned over the last few months of running sim after sim after sim, a diverse population is a healthy population; monocultures are fragile and in a closed environment, ultimately a dead end.

I apologise for coming in the middle of this discussion with some ideas, if they're not welcome (or just no good!) just say.

Instead of sexual reproduction allocating a portion of the bot's current nrg to the offspring, perhaps nrg could be allocated to a "sexual reproduction bank" in a similar way to body, slime, shell etc. In this way preparing for reproduction is an investment, requiring "healthy" reproduction-concerned genes as well as general fitness, and selection pressures will favour organisms which allocate an appropriate amount and punish those who do not allocate enough (fewer breeding opportunities), or too much (less nrg available for living). Other bots may be written with or evolve a way use the amount of nrg stored in the bot's sexual reproduction location to gauge its suitability for mating. When the bot is involved in sexual reproduction it converts the value stored in the sexual reproduction location to nrg and passes it to the offspring.

The way I envision the actual reproduction mechanism operating is if a bot passes this sexual reproduction energy to another then the other produces a new bot with blended dna. If the system is set up so that this sexual reproduction energy can be sent via shot and tie then we can allow bot writers and evolution to work out what is best for their particular bot. So a sexual reproduction shot would include an amount of this sexual reproduction energy and the bot's identifier, sexual reproduction via ties would pass sexual reproduction energy and the bot's identifier (or maybe the tie number? Perhaps that might work better from the system's viewpoint). Perhaps the active part (the actual firing of the shot or the tie function) might be best expressed as firing a percentage of the sexual reproduction fund rather than absolute figures. The system generates a new genome from the two bots (perhaps the earlier two-halves method from earlier in this thread) and the bot that recieves the sexual reproduction energy adds the sexual reproduction energy from the shot to its reserve of sexual reproduction energy, converts the total to nrg and gives it to the offspring.

Just my $0.02, and as I said, feel free to tell me to shut up  

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sexual Reproduction Focus Group
« Reply #43 on: September 01, 2006, 02:11:26 PM »
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.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Sexual Reproduction Focus Group
« Reply #44 on: September 02, 2006, 05:47:41 AM »
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%.

Maybe a system like:

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

It's also possible to ensure all your genes are carried by another bot by simply doubling your geneome.

Ie. AAbbCCddEE (with each letter representing two identical genes)

This bot will always have 1/2 of it's genome carried into the child.

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...

For those who like playing here are some genes I've come up with to use sexrepro (last vers)
Code: [Select]
cond
*.robage 0 =
start
.sexrepro .memloc store
stop

cond
*.memloc 49 >
*.nrg 3000 >
*.sexrepro 0 =
start
50 .sexrepro store
stop

cond
*.nrg 5000 >
*.sexrepro 0 =
start
50 .sexrepro store
stop