Author Topic: Recombination mechanism  (Read 10548 times)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Recombination mechanism
« Reply #15 on: June 10, 2005, 11:26:59 AM »
Nums:

Here is what you are missing: Both parental genotype and the genotype with insertion are viable genotypes, tested by natural selection.  The genotype with insertion is more fit than parent's genotype.  We don't know what the fitness is for genotypes with insertion and additional mutations (they don't have to be lethal, I just gave it as an example, but they are very likely to be less fit).  The goal of sexual reproduction is to allow spread of the beneficial mutation in the population, so that it could get combined with another beneficial mutation.  At this point you want to reproduce the mutated region of DNA faithfully, you don't want to introduce additional mutations.  

Carlo:  I am all for shortcuts as long as programmers actually want to spend their time on it.  Does not look like Nums is too excited about doing double-work, though  <_<   It is a valid substitute for now and it will fix sexrepro to some degree.  As Nums pointed out, it has its weaknesses too - it is still gene oriented.  Also, it is not fool-proof for genomes that got significantly diverged during parallel evolution.  The UID system has its ups and downs too.  The major down is that it makes it more difficult to look at DNA with all those numbers getting in the way.  Here are the pluses:
1. Recombination
2. Backwards-compatible (all previous DNA's can still be used).
3. Allows alignment of genotypes to look for evolution patterns. Have you seen my file tracking evolution of Dom ternia?  I had to do all that alignment manually - major pain in the ass.
4. Can be optional - turn it off and the program removes all UIDs and keeps using the old notation.  UID system is really only useful for evolution sims, everyone else can still use the old system.
5. It automatically prevents cross-breeding between different species (even if they have exactly the same DNA).  Yet it still allows occasional breeding between organisms that evolved from common ancestor.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Recombination mechanism
« Reply #16 on: June 10, 2005, 11:30:12 AM »
If you can find a link on how real organisms line up their chromosomes (I looked but didn't find anything), that would rock!  I know it's some sort of polymerase, I just don't know how it works.

Offline Ulciscor

  • Bot Destroyer
  • ***
  • Posts: 401
    • View Profile
Recombination mechanism
« Reply #17 on: June 10, 2005, 11:32:33 AM »
I have read this repeatedly tring to understand it all but I'm starting to think I can't lol.

I get you need to swap only similar genes for offspring not to be messed up. But my first thought was that similar genes would share activation conditions only. Does it matter what the body of the gene contains? Two genes with the same activation conditions will probably not be the same but will probably do the same sort of thing. So can't you just compare the conditions for genes?
:D Ulciscor :D

I used to be indecisive, but now I'm not so sure.

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Recombination mechanism
« Reply #18 on: June 10, 2005, 11:47:16 AM »
Quote
Does not look like Nums is too excited about doing double-work, though dry.gif It is a valid substitute for now and it will fix sexrepro to some degree.
I can assure you is a rapid work. By contrast, all other proposals seems much more difficult to realize, still are rather undefined, and involve much rework of the code in the rest of the program.

Quote
As Nums pointed out, it has its weaknesses too - it is still gene oriented.
You can even split the coupled genes inside them, if you want, instead of chosing one or  another.

Quote
Also, it is not fool-proof for genomes that got significantly diverged during parallel evolution.
This is correct, because individuals which have diverged too much should not interbreed. That's speciation.

On the other hand, your system
Quote
5. It automatically prevents cross-breeding between different species (even if they have exactly the same DNA). Yet it still allows occasional breeding between organisms that evolved from common ancestor.
Which is a blatant violation of one of the principles of DB, that is, that species name is just a comfortable label and has no meaning inside the simulation.

As for the pluses of your system, probably there is something that you should know: that is, that there are standard and well known routines to calculate the common parts and similarities between to texts. And they are relatively fast. So, UID in principle is useless. Programmers commonly use text editors which are able to highlight the differences between two source codes. There are many bioinformatic tools that calculate the differences between two or many textfiles or genefiles.

For example:
gendistance: this is free:
http://monod.uwaterloo.ca/downloads/gencompress/
calculates the distance matrices between a number of textfiles. Then you can build a phylogenetic tree. I used it once for DarwinBots (in conjunction with phylip I think). (oops.. now that I remember... I even made a tool to automatically build archives to pass to gendistance... )
And here you can find a wide list of free tools for comparing text files:
http://www.thefreecountry.com/programming/...omparison.shtml

Offline Carlo

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Recombination mechanism
« Reply #19 on: June 10, 2005, 11:58:42 AM »
By the way, this is an example of a phylogenetic tree generated with the data from an internet shared simulation (about one year and a half ago, maybe). Each leaf of the tree is a robot (all of the same species), the numbers stand for generation and mutations number. The tree is unrooted (every leaf can be taken as root). The starting data were the pure and simple dnas of the robots.
Code: [Select]
                                       +---------------------1  
                           +------------8                     +1c-145-95
                           !            !  
                           !            +---------------------1c-119-77
                 +--------15  
                 !         !                     +-----------1c-154-102
                 !         !   +-----------------4  
                 !         !   !                 +-----------1c-156-103
                 !         +--13  
      +---------20             !             +----------------1c-164-107
      !          !             +-------------7  
      !          !                           +----------------1c-168-120
      !          !  
      !          !               +---------------------------1c-189-118
      !          +--------------11  
      !                          +---------------------------1c-198-139
  +--24  
  !   !                                               +---------1c-225-155
  !   !                +------------------------------2  
  !   !          +----19                              +---------1c-229-156
  !   !          !     !  
  !   !  +------21     +---------------------------------------1c-233-162
  !   !  !       !  
  !   !  !       !                                   +---------1c-235-150
  !   +-23       +-----------------------------------3  
  !      !                                           +---------1c-235-156
  !      !  
  !      !                 +-----------------------------------1c-236-156
  !      +----------------16  
  !                        +-----------------------------------1c-238-165
-26  
  !                             +-----------------------------1c-201-138
  !                   +--------12  
  !                   !         +-----------------------------1c-218-154
  !         +--------18  
  !         !         !                          +------------1c-211-142
  !         !         +--------------------------5  
  !         !                                    +------------1c-212-148
  !   +----22  
  !   !     !                 +------------------------------1c-242-172
  !   !     !           +----14  
  !   !     !           !     !                +-------------1c-245-176
  !   !     !           !     +----------------6  
  !   !     +----------17                      +-------------1c-254-185
  +--25                 !  
      !                 !         +--------------------------1c-257-178
      !                 +--------10  
      !                           +--------------------------1c-265-189
      !  
      !                            +--------------------------1c-265-192
      +----------------------------9  
                                   +--------------------------1c-266-180

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Recombination mechanism
« Reply #20 on: June 10, 2005, 12:02:34 PM »
Quote
f you can find a link on how real organisms line up their chromosomes (I looked but didn't find anything), that would rock!

As far as I can tell, this is still unknown!  The general feeling is that DNA sequences are somehow aligned alonside each other in a very accurate manner (down to a base).  We know only one way to accurately align DNA strands - unwind the double helices and allow base-pairing of homologous regions (do you understand me here?  sounds a bit too technical).  There is some evidence that this happens, but no definite proof.  Google for synaptonemal complex and recombination to find some pages that talk about this.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Recombination mechanism
« Reply #21 on: June 10, 2005, 12:16:14 PM »
Quote
Which is a blatant violation of one of the principles of DB, that is, that species name is just a comfortable label and has no meaning inside the simulation.
Sometimes you don't want it to be just a label.  Say you want to compare fitness of two closely related organisms that reproduce sexually - then you don't want them to inter-breed.

Quote
there are standard and well known routines to calculate the common parts and similarities between to texts. And they are relatively fast.

Well, in my lab there are people who study evolution of viruses and they often need to build phylogenetic trees for them.  They are using the best software available and thier alignments usually take overnight and sometimes go for several days.  Which makes me think that any program that does this in a fraction of a second is a sham.  Well, maybe it can do some half-assed job, but I am sure it will stumble over some of the things that evolution does.
BTW, I don't know about text editors that programmers use, but Word gets totally fucked up when you try to compare documents with several parts moved around.  I tried it, it does not work :)

Basically, if you can do it - great!  I won't complain.  But I don't see why UID system can't be implemented - it is very powerful and yet it is very easy to add...
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Recombination mechanism
« Reply #22 on: June 10, 2005, 12:19:47 PM »
Okay I understand the problem a bit better now.

A ID system would work, but you're right, it makes DNA messy.  Instead we could define a particular series of commands, something that's likely to be "Junk", and have the program "zip" up homolgous chromosomes starting at these points.  When an inconsistancy occurs, you stop.

Or instead of Junk DNA, we could use a special command.  Either works (although a command just for this seems overkill to me).

If you have enough such commands, every inconsistancy is effectively isolated.  If not, you suffer from problematic unequal crossovers.  Benefit is that the DNA still becomes readable without alot of fluff.

We could even have the DNA 'correct' itself if it finds an inconsistancy.  We could also change how large the inconsitancy needs to be to stop the 'zipping' up.

Only zipped up regions can have a crossing over event occur.

That's consistant with everything I understand about crossing over.  Tell me how well that works shvarz.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Recombination mechanism
« Reply #23 on: June 10, 2005, 12:23:27 PM »
Quote
Sometimes you don't want it to be just a label.  Say you want to compare fitness of two closely related organisms that reproduce sexually - then you don't want them to inter-breed.

The best way to solve this problem is to require a kind of 'handshake' signal that both bots want to mate.

I was thinking of implementing sexual reproduction through ties.  So both bots would have to set a variable to true to allow the mating to occur.  No rape in DB!

Quote
BTW, I don't know about text editors that programmers use, but Word gets totally fucked up when you try to compare documents with several parts moved around.  I tried it, it does not work :)

He's right, I haven't found a good document comparing utility that can recognize that I moved text segment A from the top of the document to the bottom.  Windiff just tells me they're different in those places, which isn't particularly useful beyond a point.
« Last Edit: June 10, 2005, 12:23:36 PM by Numsgil »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Recombination mechanism
« Reply #24 on: June 10, 2005, 12:27:11 PM »
yea I was looking for a better program then windiff too , no luck yet. I need binary compare though.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Recombination mechanism
« Reply #25 on: June 10, 2005, 12:30:04 PM »
I made a modification to Windiff and put it on the FTP a while ago.  It ignores capitalizational differences.

But that's sort of off-topic, isn't it.  :rolleyes:

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Recombination mechanism
« Reply #26 on: June 10, 2005, 12:41:12 PM »
Quote
Only zipped up regions can have a crossing over event occur.

This is a possibility...  We can align very short stretches of DNA to zip them up.  What we can do is this: At some point during copying the DNA, program decides to cross-over.  It then takes N next commands (5-10 should be enough; make it user-definable?) and searches for exact same pattern in the DNA of the other parent - if it finds a match, it switches over.  If it does not - sticks with DNA from the same parent.  If it finds several matches, then it picks one of them randomly.

This would solve the problem of sexual reproduction, it would also allow recombination that is command-oriented, not gene-oriented.  The downside is that it still would not be possible to track evolution of whole genomes and build phylogenetic trees.  But it would be a good start anyway.  It actually would also allow turning off cross-species breeding - just set the "homology" level very high and it will never find exact match :)

Yeah, I kind of like that!
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Recombination mechanism
« Reply #27 on: June 10, 2005, 12:43:35 PM »
Quote
If it finds several matches, then it picks one of them randomly.
I was thinking of that too, but shouldn't distance from current location matter too?

That is, if there's a closer match you're more likely to use it than a match on the opposite side of the centromere.
« Last Edit: June 10, 2005, 12:48:02 PM by Numsgil »

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Recombination mechanism
« Reply #28 on: June 10, 2005, 12:53:40 PM »
More likely?  Sure, why not...

Can you explain the whole centromere again or post a link?  I am not 100% sure what you want to do there.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Recombination mechanism
« Reply #29 on: June 10, 2005, 12:55:49 PM »
Here's the most recent post.

Any questions that doesn't answer (I don't remember all of what I said) go ahead and ask in that thread.