My apologies in advance if this stream of consiousness is old news but this just kind of dawned on me and I find this line of thinking fasinating. I love it when virtual nature surprises me.
I have a big evosim running currently which I will post in a couple of days as soon as I hit 1000 cummulative hours. In the sim, I use mutation disabled veggies with the following gene:
cond
start
628 rnd .aimright store
100 .shootval store
-2 .shoot store
stop
The veggies provide lots of nrg shots that my zerobots can run into and absorb. I set up the inbound nrg such that it doesn't quite keep up with the veggy nrg loss. So a veggy spawns into being somewhere, spews nrg for a while and then dies and disappears, providing a dynamic environment.
I am not using everlasting nrg shots. I did initally, but I wanted nrg absorbation by my evolving zerobot hetertrophs to be non-random and with many many thousands of everlasting nrg shots in a sim, there is no nrg locality - no selection pressure to do better at aquiring nrg. I'm trying to provide selection pressure for my zerobots to grow smarter. For example, my first replicatiors tended to fix themselves in place. Why not? Nrg was random and everywhere. But now they don't do that because the sim size and veggy die off rate is such that the mean time it takes for a veggy to materialize next to a fixed zerobot is longer then the average zerobot lifetime at current cost and offspring nrg levels. Selection has favorred movement to get nrg and now all my evobots move at the max velocity (although they accelerate slowly). Now I'm working on getting them to stop conditionally when they encounter another bot. Stopping next to a veggy spouting nrg and then moving on again when it dies or some varient of this behaviour would provide a huge nrg intake advantage leading to increased reproductive sucess. Selection should favor it. Such a conditional adaptation would be huge.
Anyway, I've evolved a self replicating virus in the sim. The code is below. I have not reverse engineered it yet, but what happens is that over time, some of my veggies catch the virus even during their short life spans. The virus deletes the shooting gene, preventing the veggies from dying. I've watched it happen. Seletion favors this (for the virus) since if a virus can turn off a veggies shooting gene, it will live a very long time in that autotroph compared to my hetertroph zerobots, dramaticaly improving the virus's reproductive success.
This got me thinking. Since most mutations occur during reproduction, one can imagine bots evolving a reproduction strategy which completly bypasses all the reproduction-time mutations built into the simulator. The strategy would be simply to reproduce, then infect the offspring with a virus that deletes all the offspring's DNA and contains the parents entire genome. The genome could have logic to facilitate this such as stickign aroudn the parent for the first N cycles, etc Since the built-in mutation code does not get invoked for viruses, such a reproduction strategy would bypass all the human authored simulator mutation logic (except point mutations). The offspring's DNA may have been mutated by the simulator at reproduction time, but that DNA get's thrown away and replaced by the parent. Reproduction becomes a two step process I.e. create an empty husk and then inject it with your DNA.
I have long had concerns as to whether we have included all the right kinds of mutations in the right way into the simulator. 'Real' biological mutations are largely a function of the DNA copying, repair and error correction machinery used by and evolved over time by biological organisms. Such things as gene structure are intimently related to the how, when and where mutations occur. The two things evolved together. The fact that our built-in mutation logic is human authorred and completly disconnected from gene structure or any other evolved mechanism has always concerned me.
But if bots start taking their reproduction and in particular, the copying of their DNA into their offspring (or for multibots, into cells of their own body as they grow) into their own hands (so to speak) then long term, we might see mutation mechanisms evolve naturally alongside the evolved DNA copying machinery. That would be way cool.
One can imagine sexual reproduction emerging from this as well, first as parasitic bechaviour then as symbiosis. Instead of reproducing and injecting your DNA into an offspring you make, it is obviously less costly if you can find the empty husk somewhere else and inject your DNA into that. The bot becomes the virus and vice versa. But bots may well evolve counter measures to the virus from another bot, in particular preventing the full deletion of it's own DNA. Selection would favor this. But some of the newly injected DNA might be useful. Selection may favor strategies where the resultant bot is a combination of the two original genomes. Over time, this might get structured and formalized, changing from mere opportunism to true symbiosis and then to sexual reproduction. Species would emerge where there are incompatabilites in genome merging strategies. Selection starts to favor only mating with another member of your own species since mating outside your species results in wasted effort or non-viable offspring.
Now consider multibots. Every cell in a multibot has all the DNA for making every other cell in the multi-bot just like every cell in our bodies has a complete set of our DNA (if they don't it's not a multi-bot, it's symbiosis between different organisms). It would be very difficult for an outside organism to infect all the cells of a multibot with it's reproduction virus. In fact, infecting more than one will be difficult given the time it takes to incubate a virus shot (genomes are getting large by now). Selection may favor a multibot getting rid of an infected cell, or isolating it, or over time, incubating it until it grows into a new multibot.... You know where I'm going with this. The feamle multibot's infected cell is the egg gamate of one sex of the species. The virus shot is the sperm from the male. Viola!
Anyway, sorry for the ramble, but I find this lien of reasoning fasinating and perhaps even illuminating into our own biological history. If anyone has any good reading suggestions on the role of viruses in our own biological evolution, I would be very appreciative.
As a follow on subject I've yet to explore, perhaps we should consider adding the potential for the gene of a virus shot to be ineaxctly copied into the victim so as to facilitate the evolution of this kind of reproduction with DNA copying induced mutations. Or perhaps we should just let it evolve naturally..
Virus code
cond
27 1 -7 >=
start
xor
angle rnd inc
dist 3 35 and
5 not
dist >> * inc
!~=
*.dx 6 start
ceil and
- 1 1 !%=
start
xor
14 dup 47 dist << dec
dist >=
49 %=
not
>> ^ mult inc
!~=
*20 6 start
pyth and
<< 1 !%=
start
xor
1 and
dist *23 dec
10 ceil angle 49 inc
not
| >> * inc
*.shootval *.aimright =
start
angle and
& 1 !=
0 !=
start
xor
1 add 47 dist << dec
10 49 35 ceil %=
not
>> >> * inc
!~=
*.robage 6 start
angle << 1 start
3 20 div cond
27 1 -7 >=
start
xor
angle rnd inc
dist 3 35 and
5 not
dist >> * inc
!~=
*.dx 6 start
ceil and
- 1 1 !%=
start
xor
14 dup 47 dist << dec
10 dist >=
49 %=
not
>> ^ mult inc
!~=
*20 6 start
pyth and
<< 1 !%=
start
xor
1 and
dist *23 dec
10 ceil angle 49 inc
not
| >> * inc
*.shootval *.aimright =
start
angle and
& 1 !=
0 !=
start
xor
1 add 47 dist << dec
10 49 35 ceil %=
not
>> >> * inc
!~=
*.robage 6 start
angle << 1 start
3 20 div