Author Topic: Question on viruses  (Read 4845 times)

Offline Ispettore

  • Bot Neophyte
  • *
  • Posts: 32
    • View Profile
Question on viruses
« on: January 17, 2008, 09:13:58 AM »
Hello to everyone, I'm back again. My internet connession was broken for like a month, so I couldn't connect. Btw, I started interesting in viruses (or virii?). But I've not understood much from the tutorial, so here I am to ask more infos on viruses. I've also seen a simulation where non-letal virus evolved and pushed the evolutionary rate of bots... I'd like to know more on dna copying, vtimer and all those things, if you have a bit of free time (I think that the topic here upstairs is too old, because it's from 2005... I don't know if it's still right). Thank you.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Question on viruses
« Reply #1 on: January 17, 2008, 10:32:28 AM »
.vtimer gives an indication of the status of making a virus.

.vshoot will shoot a virus if one is ready with a "force" given by the value you pass in.  Longer range shots take more nrg but go much further.

.mkvirus will copy the gene given by the genenum you use here in to a new virus.

.thisgene returns the gene number of the currently executing gene.

The simplest virus possible is something like:

cond
start
*.thisgene .mkvirus store
1000 .vshoot store
stop

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Question on viruses
« Reply #2 on: January 17, 2008, 01:19:15 PM »
Quote from: Numsgil
The simplest virus possible is something like:

cond
start
*.thisgene .mkvirus store
1000 .vshoot store
stop
The simplest replicating virus(well, shorter) could be.

Quote
cond
start
*.thisgene .mkvirus store
stop
The virus need another virus that stores a value in .vshoot, anytime it is placed after another selfreplicating virus, it will replicate. I thought this kind of virussus, the ones that need another virus are existing too in IM.

Funny is that if there aren't any other virussus it can't replicate. But if there are others this version is even faster created and spreiding becouse it is shorter.

Oh, and yes Numsgil is right in his explanation, he made part of the program so he knows best(maybe after EricL) but atleast he knows almost best.  

And I am pretty sure the wiki has a nice explanation about viruses, so try the wiki  .
« Last Edit: January 17, 2008, 01:21:51 PM by Peter »
Oh my god, who the hell cares.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Question on viruses
« Reply #3 on: January 17, 2008, 01:53:19 PM »
Whoa! I missed the fact that shorter viruses are created faster. How does that work?
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Question on viruses
« Reply #4 on: January 17, 2008, 02:41:53 PM »
Quote from: shvarz
Whoa! I missed the fact that shorter viruses are created faster. How does that work?
Wiki virus
little quote
Quote
3 It takes a finite amount of time to copy this gene into the virus so at the beginning of the process, the gene length is calculated and this value is placed into a count-down timer which can be accessed by the robot via .vtimer(vtimer is the length of the DNA being copied * 2). This is a read only value indicating how long you have to wait until the virus is ready. Vtimer is 1 when there is a virus ready to fire. 0 if there is no virus either ready or being constructed, > 1 if there is still time left to wait.

If I understand right, a virus that doesn't use ''*number* .vshoot store'' is 6 cycles faster made(total of 12 cycles will it be then, with it, it will be 18 cycles).
Here I mean the virus Numsgil posted as example. The shorter one is then the one I posted.

I though there where also some other calculations about the lenghth and cost and stuff but I am not sure how it works. How does it work?
« Last Edit: January 17, 2008, 02:44:30 PM by Peter »
Oh my god, who the hell cares.

Offline Ispettore

  • Bot Neophyte
  • *
  • Posts: 32
    • View Profile
Question on viruses
« Reply #5 on: January 17, 2008, 03:16:09 PM »
Quote from: Numsgil
.vtimer gives an indication of the status of making a virus.

.vshoot will shoot a virus if one is ready with a "force" given by the value you pass in.  Longer range shots take more nrg but go much further.

.mkvirus will copy the gene given by the genenum you use here in to a new virus.

.thisgene returns the gene number of the currently executing gene.

The simplest virus possible is something like:

cond
start
*.thisgene .mkvirus store
1000 .vshoot store
stop
okay, tell me if I'm wrong:

first line: create a new virus with this gene
second: spend 1000 nrg for the shot (very much) continuosly
But... if I'd like the robot to send a virus every 500 cycles? How should I use the vtimer?
And also... if I wanted to put other genes in the virus?
Thank you for your explanations, and sorry for wasting your time.

Offline googlyeyesultra

  • Bot Destroyer
  • ***
  • Posts: 109
    • View Profile
Question on viruses
« Reply #6 on: January 17, 2008, 05:28:37 PM »
I think the number of cycles required to make a virus is equal to the number of BP (base pairs, or DNA instructions) times two.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Question on viruses
« Reply #7 on: January 17, 2008, 05:35:08 PM »
Quote from: googlyeyesultra
I think the number of cycles required to make a virus is equal to the number of BP (base pairs, or DNA instructions) times two.
This is correct.
Many beers....

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Question on viruses
« Reply #8 on: January 17, 2008, 05:53:28 PM »
That's pretty cool. Would be a good idea to have such a system for bot reproduction as well. And make the copying rate directly proportional to the mutation frequency.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Question on viruses
« Reply #9 on: January 17, 2008, 06:38:07 PM »
Quote from: shvarz
That's pretty cool. Would be a good idea to have such a system for bot reproduction as well. And make the copying rate directly proportional to the mutation frequency.

I really like this.  For DB3, I was planning on having reproduction take some extra time to copy DNA and split properly (helps a bit with physics, too, if there's a lead up period).  I was also going to allow bots to influence their mutation rates (spend extra nrg to reduce mutation rate, for instance).  However, I think the time to copy the DNA and the DNA length need to be at best loosely related.  I can see reproduction time easily overpowering lots of other Darwinian forces, causing bots with shorter and shorter genomes at the expense of other, more complex adaptations.

Combining the two ideas makes a lot of sense.  I'm not sure if I want to introduce repro lag in the current version, though.  It's a rather dramatic change.
« Last Edit: January 17, 2008, 06:40:24 PM by Numsgil »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Question on viruses
« Reply #10 on: January 17, 2008, 06:44:59 PM »
Quote from: Ispettore
okay, tell me if I'm wrong:

first line: create a new virus with this gene
second: spend 1000 nrg for the shot (very much) continuosly

Almost right.  If a virus shot can't be produced just yet (because it hasn't been made yet), the bot will try to shoot the virus, fail, and not get charged any energy.  It's part of a principle in Darwinbots where bots aren't charged for actions that are strictly impossible, or that conflict with other actions.  5 .up store and 5 .dn store won't cost the robot any nrg from trying to move, since the two impulses cancel out.  Or if it tries to reproduce and there isn't enough room.

Quote
But... if I'd like the robot to send a virus every 500 cycles? How should I use the vtimer?

You probably wouldn't use vtimer for this.  You'd use either robage or timer or something like that.

Quote
And also... if I wanted to put other genes in the virus?

One gene per virus.  So it's not strictly possible, but if you single gene all your genes, you can pack unlimited information in a very long gene, and use that as a virus.

Offline Ispettore

  • Bot Neophyte
  • *
  • Posts: 32
    • View Profile
Question on viruses
« Reply #11 on: January 19, 2008, 09:27:57 AM »
ok... thank you for your explanations...