Darwinbots Forum

Bots and Simulations => DNA - General => Topic started by: MrMound on April 19, 2005, 07:33:42 PM

Title: how to virus
Post by: MrMound on April 19, 2005, 07:33:42 PM
could someone tell me how to make a virus that puts this gene into another bot?

cond
*.nrg 1 >=
*.refaimdex 2 =
start
60 .repro store
stop

 :)
Title: how to virus
Post by: Numsgil on April 19, 2005, 07:40:20 PM
This post explains it pretty good (http://This%20post%20explains%20it%20pretty%20good).

Then you have *.thisgene, which works well in tandem with .mkvirus.
Title: how to virus
Post by: MrMound on April 19, 2005, 07:42:40 PM
wich post? :huh:
Title: how to virus
Post by: Numsgil on April 19, 2005, 08:06:07 PM
Lol, my mind is going...

This post (http://s9.invisionfree.com/DarwinBots_Forum/index.php?showtopic=68&st=0).
Title: how to virus
Post by: MrMound on April 20, 2005, 08:54:23 AM
so if it was gene 6 I wanted in another robot would the virus genes look like this?

start

6 .mkvirus store

stop

cond

.vtimer 0 =

start

-1 .vshoot store

stop
Title: how to virus
Post by: PurpleYouko on April 20, 2005, 09:00:29 AM
Not quite

You won't get anywhere with "-1 .vshoot store" since for vshoot, the stored number represents both the range of the virus shot and the energy cost to the originator.
Try something like "50 .vshoot store" to get a reasonable range for your virus. Yes it is expensive. It was designed to be. Making and shooting a virus should not be undertaken lightly.
Title: how to virus
Post by: MrMound on April 20, 2005, 09:04:43 AM
so it would look like this?


start

6 .mkvirus store

stop

cond

.vtimer 0 =

start

50 .vshoot store

stop
Title: how to virus
Post by: PurpleYouko on April 20, 2005, 09:09:10 AM
That should do it.

Only one problem is that once one of your robots gets hit by one of its own viruses, the chance are that the intended gene (gene 6 that is) probably won't be gene 6 any more so the next virus sent out could be anything.

It gets really messy really fast
Title: how to virus
Post by: MrMound on April 20, 2005, 09:13:19 AM
it doesn't work heres my bot and would you see if you see anything wrong with it?

 I mean the virus
Title: how to virus
Post by: Numsgil on April 20, 2005, 09:19:40 AM
You have a misspelling.  It's refaimdx, not refaimdex.

Also, and I quote myself in the now pinned virus thread:

Quote
vtimer is 1 when there is a virus ready to fire. 0 if there is no virus ready to fire, > 1 if there is still time left to wait.
.
Title: how to virus
Post by: PurpleYouko on April 20, 2005, 10:08:27 AM
When a robot doesn't work properly and you don't know why, pause the sim, double click the robot and look at its DNA.

Any misspelled words in the code will appear as zeroes because the interpretter cannot recognize them as commands.

This is a really good way to find problems quickly.
Title: how to virus
Post by: Numsgil on April 20, 2005, 12:26:56 PM
One more thing:

I strongly urge you to look into Spanish Conquistador's virus.  I kid you not, that thing is a monster.  A monster in its ability to leave SC unscathed.  It's ability to kill off other species (even species with intelligent anti-viral genes).  It's ability to create a self propogating virus that quickly takes over.  It's masterful (if I do say so myself) use of the stack.  It's definately the most deadly virus to date (deadly not because it causes instant kills (tried that, it wasn't as successful) but because it manages to leave the victim going for a few hundred cycles, reproducing like mad and creating new viral particles in each daughter cell).
Title: how to virus
Post by: Zelos on April 20, 2005, 12:32:55 PM
sweet :D he used my simple bot to start whit :D
Title: how to virus
Post by: MrMound on April 20, 2005, 08:53:21 PM
so  are you saying it should look more like this?

cond
.vtimer 0 =
start
6 .mkvirus store
stop

cond
.vtimer 1 <
start
'donothing
stop

cond
.vtimer 1 =
start
50 .vshoot store
stop

 :)
Title: how to virus
Post by: Numsgil on April 21, 2005, 12:41:06 AM
You've got the > and < signs confused, but other than that, yeah, looks good.
Title: how to virus
Post by: MrMound on April 21, 2005, 09:43:41 AM
its not working still so could someone look at it and see if its my computer thats nat working or if its my bot? :)
Title: how to virus
Post by: PurpleYouko on April 21, 2005, 10:35:25 AM
You have a * in front of your .mkvirus address.

Code: [Select]
cond
*.vtimer 0 =
start
*6 .mkvirus store
stop

This is loading the current value of memory location 6 (aimsx) into .mkvirus.
Given the rest of your DNA code, this number could be anything from 0 to 1860 depending on earlier genes.

Drop the * and it works fine.

Code: [Select]
cond
*.vtimer 0 =
start
6 .mkvirus store
stop

Your main problem is that your robot has no defence against his own virus. The sim ends up in a right old mess of your robots violently reproducing and dying. Most of them have upward of 20 genes after a couple thousand cycles.
Adding genes to the genome (via viruses) tends to make your desired virus gene move to some position other than 6 so the viruses are all different.  :blink:

Not a bad little robot actually. Without the virus he would do reasonably well in the lower part of the F2 league
Title: how to virus
Post by: Numsgil on April 21, 2005, 11:27:34 AM
Take a look at Spanish Conquistador, seriously.
Title: how to virus
Post by: Light on April 21, 2005, 11:29:23 AM
Quote
Your main problem is that your robot has no defence against his own virus.

Adding genes to the genome (via viruses) tends to make your desired virus gene move to some position other than 6 so the viruses are all different.  :blink:
Code: [Select]
cond
*.nrg 1 >=
*.refaimsx 2 =
start
60 .repro store
stop

your virus will only activate in bots that have 2 aimsx, which wont be many if you change it so it wont activate in bots with 1 aimsx (ie yours) it will affect almost all bots

Code: [Select]
cond
*.nrg 1 >=
*.refaimsx 1 !=
start
60 .repro store
stop

also if you move your virus gene to the begining of the code, so that it is gene 1, it will be much less likely to be moved when genes get added to the genome
Title: how to virus
Post by: PurpleYouko on April 21, 2005, 01:44:29 PM
Quote
Quote
Your main problem is that your robot has no defence against his own virus.

Adding genes to the genome (via viruses) tends to make your desired virus gene move to some position other than 6 so the viruses are all different.  :blink:
Code: [Select]
cond
*.nrg 1 >=
*.refaimsx 2 =
start
60 .repro store
stop

your virus will only activate in bots that have 2 aimsx, which wont be many if you change it so it wont activate in bots with 1 aimsx (ie yours) it will affect almost all bots

Code: [Select]
cond
*.nrg 1 >=
*.refaimsx 1 !=
start
60 .repro store
stop

also if you move your virus gene to the begining of the code, so that it is gene 1, it will be much less likely to be moved when genes get added to the genome
Uh.... no!

That won't work at all Light.

*.refaimsx tells your robot how many .aimsx command the robot he is facing has.

I think you must have meant *.myaimsx
Title: how to virus
Post by: Light on April 21, 2005, 07:19:34 PM
oops :redface:
Title: how to virus
Post by: MrMound on April 21, 2005, 08:28:07 PM
the reason the bots good is I used the already made simple bot B)
Title: how to virus
Post by: MrMound on April 21, 2005, 08:34:01 PM
thanks guys it works! :boing:
I owe you one :)