Darwinbots Forum

Bots and Simulations => Simulation Emporium => Topic started by: PhiNotPi on February 12, 2014, 11:48:32 AM

Title: Small Viral Evolution Simulation
Post by: PhiNotPi on February 12, 2014, 11:48:32 AM
I decided to make a simulation in which I studied the evolution of viruses only. 

There are a few important things to note regarding the simulation

I created a short "starter" virus, which contained a few functions I thought would be essential, as well as a few random numbers.

Code: [Select]
cond
403 204 257 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5
start
*.thisgene .mkvirus store
1 .vshoot store
*.thisgene 1 sub .delgene store
403 204 257 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5
*.nrg 6000 > 50 .repro store
stop

This includes functionality to reproduce (since the robot would have no other DNA), to replicate the virus, and to delete all previous viruses (since only the last virus in the genome would be able to replicate anyways).

Almost immediately, the viruses lost the functionality to delete previous viruses in the genome.  Why did this happen?  My idea is that the more viruses are in the genome, the lesser the chance that new viruses would be randomly inserted as the last gene.  Since viruses are only active as the last gene, this  increases the "active lifespan" of the current infection.

Next, major deletions occurred.  This shortened the virus and made replication faster.

Code: [Select]
cond
403 204 257 185 723 65 181 802 595 542 dec
215 973 605 403 rnd start
*.thisgene .mkvirus store
1 .vshoot store
*.thisgene 1 sub 351 store
403 204 257 185 723 65 181 802 595 468 108 store

The above virus is the most current version.

I made several key observations:

Do you have any advice for future viral sims?  This first one was mostly an experiment to see if it were possible.  I think that the starter virus makes a huge difference as to what the final product will be, since DNA is deleted much easier than it is modified/added.  It is thus important to write an "easily evolvable" virus, which contains all potential functionality, and I don't know if I did a very good job this time.
Title: Re: Small Viral Evolution Simulation
Post by: Botsareus on February 12, 2014, 11:58:04 AM
Interesting, sounds to me like the only thing that is mutating the virus is the point mutations logic from v 2.45 as viruses do not mutate on transfer. Still, the results look impressive. I do not remember at what point I fixed the mutation oscillator. If it is fixed try turning that feature on and set point mutations reasonably low edit: High (The fact that the effect is inverse of the values still confuses even me).
Title: Re: Small Viral Evolution Simulation
Post by: PhiNotPi on February 12, 2014, 02:30:20 PM
I've decided to start a new simulation, as I decided to create an empty host species, so that repopulated robots would not re-introduce viral DNA and endanger previous progress.  I also considerably tweaked the costs for DNA length and the repopulation settings, which helped to prevent any "mass extinctions."

Here are several virus samples taken across time, which demonstrates how the virus has evolved:

Code: [Select]
cond
403 204 257 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5
start
*.thisgene .mkvirus store
1 .vshoot store
1 .shootval store
*.thisgene 1 sub .delgene store
403 204 257 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5
*.nrg 6000 > 50 .repro store
stop

 cond
 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5 start
 *.thisgene .mkvirus store
 .vshoot store
 1 .shootval store
 *358 1 sub .delgene store
 403 204 257 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5 *.nrg 6000 >
 50 .repro store
 stop

cond
 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5 start
 *.thisgene .mkvirus store
 .vshoot store
 1 *358 1 sub .delgene store
 403 204 257 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5 *.nrg 6000 >
 50 .repro store
 stop

 cond
 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5 67 start
 *.thisgene .mkvirus store
 .vshoot store
 1 *358 1 sub .delgene store
 403 204 257 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5 *.nrg 6000 >
 50 .repro store
 stop

cond
 185 723 65 181 802 595 468 108 874 390 215 973 605 403 5 67 start
 *.thisgene .mkvirus store
 .vshoot store
 1 *358 1 sub .delgene store
 403 204 257 185 723 65 181 802 595 468 108 874 390 973 605 403 5 *.nrg 6000 >
 50 300

Here, you can see the considerable change in only 360 thousand cycles, as opposed to the 3 million of my previous simulation.

One interesting mutation was "5 start" to "5 67 start" in the later versions.  Basically, this mutation changed the value of .vshoot from 5 to 67, since it appears to remain on the stack.  Does this increase the power of the virus shot?