Author Topic: time share  (Read 4270 times)

Offline viplex

  • Bot Neophyte
  • *
  • Posts: 45
    • View Profile
time share
« on: February 06, 2007, 12:30:07 PM »
Hello
Does ONE global cycle in the simulation mean that in that time all of the robots ALL DNA will be executed once (independent of lenght)? Or is there a predefined amount of operations per robot in one global cycle?
The reason I'm asking this is: in my simulation my robs tend to reduce their DNA lenght. It's been 2,7 million global cycles now, and the average DNA lenght has gone down to half that of the original avg lenght.
thanks: Viktor

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
time share
« Reply #1 on: February 06, 2007, 12:36:22 PM »
It executes the whole DNA each cycle, as far as I know.

Shorter DNA means lower costs. Evo bots survive with a small amount of basic genes, so they often throw away everything else.
Sometimes you win, and sometimes you lose...

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
time share
« Reply #2 on: February 06, 2007, 01:09:50 PM »
Correct.  All DNA for every bot executes each cycle (subject to conditions coded in the DNA of course).

I never use DNA costs in my evo sims as I do not want any cost-based selective pressure towards smaller DNA.  Maca is exactly correct - such costs will serve to shrink DNA length over time all else being equal.

I should ponint out that even without any DNA costs, selection pressures still operate indirectly on DNA length.  A longer genome will mutate more often (mutations are proprotional to genome length).  Since most mutations are deleterious, having a longer genome means your functionality is more likely to degrade due to mutations.  Thus, selection tends to place slight downward pressure on genome length even without costs, all else being equal.  Of course, this gets balanced out by useful adaptations which by definition must utilize DNA.  So, if there is selection pressure to aquire new traits in your sim, the genome will grow in length all else being equal.  If not, it will shrink, to the point where the code for critical adaptations starts to be impacted.  Ignoring viruses, the average genome length in a sim without DNA costs will be the balance point of these two opposing forces.
« Last Edit: February 06, 2007, 01:14:06 PM by EricL »
Many beers....

Offline viplex

  • Bot Neophyte
  • *
  • Posts: 45
    • View Profile
time share
« Reply #3 on: February 06, 2007, 01:36:12 PM »
Thanks, I see the point now. Because I had set all DNA costs to 0, yet DNAs are still shrinking.
It occured to me.. would it happen like this in nature? I mean, if we suppose there is no selectional effect on DNA lenght, would the size of the Active DNA be shrinking due to similar mutations? Or we can never know...
To put it another way: is there such mutation in nature as lenght-dependent deletion or an equivalent one?

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
time share
« Reply #4 on: February 06, 2007, 04:10:44 PM »
Actually, I don't think Eric is right here.  There is no pressure to keep genomes shorter.  

Say you have two genomes.  Their functional parts are the same, but one genome has a lot of junk DNA.  The second genome will get mutated more often, but these excess mutations will happen to the junk DNA and so will not affect fitness of the offspring.  Thus having a longer genome has no disadvantage.

That is actually what I see in my simulations - most genomes tend to get longer during evolution, acquiring junk. I once saw a situation where most mutations appeared to be deletions, but that was only once and I had some (very-very low) DNA costs.  I am actually suspecting that it was some kind of bug in a program, because I saw no other mutations but the deletions.  So that could have been just a fluke.  

Make sure you disable all DNA-associated costs, including all the costs on the left side of custom costs panel and the "DNA upkeep" cost on the right side of the panel.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
time share
« Reply #5 on: February 06, 2007, 08:56:57 PM »
I stand by my argument.

Mutations to junk DNA can still be deleterious as occasionally a mutation will enable some new hunk of DNA via the insertion of a start command or the deletion of a stop command.  The longer the genome, the higher the probability of this happening.  One is then left with the question that when it does happen, is the result benificial or deleterious?  Most changes of any sort, including the sudden expression of new logic, are deleterious - stores to sysvars get overridden by the new code and so on.  Additionally, point mutations are more common than indel events.  Thus, noncoding junk DNA within a coding sequence (such as boolean operators within a start-stop block) represent increased surface area for mutations that can turn non-coding sequences into coding sequences.  Thus, in my opinion, having a longer genome  - even if all that additional length is noncoding - all else being equal increases the chances of a deleterious mutation and therefor will be slightly selected against.

I actually see this in my sims quite often, but (and this is key) only when there are no viruses.  Over time, the DNA becomes more compact for the same function.  Non-coding interons such as boolean operators outside conditional blocks get selected against.  But as I mention above, if there are any viruses in the sim, my argument does not hold or rather, it becomes moot.  The selection pressure favoring virus propagation utterly and completely swamps any downward selection pressure on bot genome length.  I suspect that most people who witness increasing DNA lengths in their evo sims are seeign the effects of viruses.  I am actually to the point of wondering whether given the current mutation logic and default settings, anything but the most modest increases in DNA length are even possible in reasonable time frames without virus involvement.

By way of example, below is an evolved zerobot from my long running sim now at 21.4M cycles and 1250 hours run time.  The organism in question is of generation 2681 and is the product of 514 mutations from the starting zerobot organism which consisted of 30 0's.  After I posted my sim at 1000 hours, I made some slight changes to settings and veggies such that they died out faster than the mean virus infection rate, which effectively removed them as viable virus propagation hosts.  Over time, the virus that had evolved in the sim died out.  Since then, there has been downward selection pressure on genome length even though I have no DNA costs.   The average genome length in the sim is now 57 base pairs (the length of the guy below) down from around 130 when I posted the 1000 hour sim.  Note in the DNA below that start is now the first base pair.  Remember, the first ancestor was a pure zerobot, no start command.  This guy's more recent ancestors had junk ahead of that first start but there has been selection pressure to remove all non-coding crap prior to the start and elsewhere.   The DNA is actually starting to look more and more like hand coded DNA with regard to it's structure.  Isn't that interesting?


 start
 %=
 =
 pyth & dec
 1 .setaim store
 *.dx ~ -8 >
 rnd ++ 1 1 xor
 *566 -800 dist -25 !%=
 start
 not
 1 1 dup 38 56 pow << store
 and
 4 ^ ^ or
 21 dist mult store
 store
 pyth 12 *.robage * store
 *.aimright *.shootval ~ store
 917 xor
 store
 div

With respect to the question on biological seleection pressures on genome length, I'm no biologist, but there must be some morphological carrying cost associated with longer DNA.  DNA lengths are not infinite.  For one thing, longer DNA means you need more necleotides to divide, more raw material.  I can imagine it might impact rates of transcription, impactign cell function effeciency and perhaps have a large effect in species where reproduction rates are critical such as bacteria or viruses.   So, its just personal opinion, but I woudl expect that all else being equal (which it never is) we should see genome lengths in nature reflect a similar balace of selection pressures.
« Last Edit: February 06, 2007, 10:18:43 PM by EricL »
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
time share
« Reply #6 on: February 07, 2007, 12:57:45 AM »
Unless I'm way off base, I remember reading that chromosomes probably originated as a genomic repair mechanism.  Eukaryotes have orders of magnitude more DNA than bacteria, made possible by an orders of magnitude better repair mechanism.

I don't know wether Eric or shvarz is more on the money, but certainly effective genome length is limited by the effective mutation rate.  Effective genome length is genome length - junk, and effective mutation rate is mutation rate - repairs.

Don't put to much stock in wether Darwinbots genomes shrink or grow.  There are two different deletion mutation types, last I checked.  The mutations aren't necessarily balanced between shrink and grow.  However, if you look at effective genome length, I think you would have a clearer picture.

Not sure how to handle that inspection though.
« Last Edit: February 07, 2007, 12:58:27 AM by Numsgil »

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
time share
« Reply #7 on: February 07, 2007, 01:14:09 AM »
Might be an idea to take a look at the graphs over some time and see what dnalen is doing. Interesting experiment anyways.

I just have to say again that self-evolved viruses are just plain weird. Cool but weird.  

It might be a good idea to prevent plants from having any transmitable dna, could probably just mod vshoot to check species. Plants and animals do have different priorities, it's just not safe for them to cross dna.

12 *.robage * store

This little bit is pretty interesting, the bot will store 12 in all the locations it's memory references. Esssentially referencing multiple references, in a safe fashion. An example because just stating that hurt my head:

12 *1 store
12 *2 store
etc

Pretty handy and provides access to tons of different possible locations in a controlled manner. Horray, the lone * has come in useful, I knew the bots would appreciate it

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
time share
« Reply #8 on: February 07, 2007, 10:09:33 AM »
I agree with Eric's argument that point mutations in junk DNA may have a negative effect on bot fitness.  Yet I think that it's a minor effect.  The proportion of mutations that would do that is very small, especially in parts of genome which are not executed at all.

I think most of DNA length changes must come from deletions and insertions.  And from these two, deletions are more dangerous than insertions.  The shorter the genome the more dangerous they are.  So for shorter genomes there must be a drive towards insertions.  At longer lengths some kind of balance will be achieved and I agree that in some situations there may be a benefit in shortening DNA.
"Never underestimate the power of stupid things in big numbers" - Serious Sam