Darwinbots Forum
Bots and Simulations => DNA - General => Topic started by: Numsgil on February 23, 2005, 12:31:18 PM
-
I'm trying to make a virus that uses the new *.thisgene I'm working on to propogate itself.
But I don't know how to go about using the virus code. I could look it up but I think everyone would benefit from someone showing how to use it here.
Start from the beginning, and go through the process step by step.
-
Righty ho then (flexes fingers)
It is a bit awkward I guess.
To make a virus you should follow these steps.- 1 Decide which of your own genes to copy into the virus.
- 2 Apply this to the .mkvirus command. eg This will copy gene 5 into a temporary storage array to create the virus.
5 .mkvirus store
- 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. This is a read only value indicating how long you have to wait till the virus is ready.
- 4 Once .vtimer reaches zero, the virus is ready and it can be fired by placing any non-zero value into .vshoot. this will shoot the virus straight forward. (You can't use backshot with it as far as I can remember)
I did play around with allowing the number stored into .vshoot to give a gene address in the target robot to insert the virus at but this idea was abandoned due to being totally and utterly unrealistic.
Hope this helps
:D PY :D
-
One small caveat:
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.
Other than that great guide! I made a self replicating virus. Made a dummy species that only fired the virus. Ymir wiped it out quickly but not before being infected.
Now there's nothing but viruses flying all over the screen! Bwahahaha!
-
Many little blue dots huh?
<_< PY <_<
-
:D
This could be alot of fun!
-
I like this vtimer stuff read further in the off-topic board
http://s9.invisionfree.com/DarwinBots_Foru...hp?showtopic=70 (http://s9.invisionfree.com/DarwinBots_Forum/index.php?showtopic=70)
-
Is *.vtimer likely to be a unique number for a given gene size? I was thinking that a virus could identify which gene is being copied and then decrease .vshoot(virus distance/bot's nrg) based on that. In this way only it would only send out new viruse instead of random genes.
Got to work with these again sometime. Making them is one heck of a great way to build coding skills.
Endy B)
-
vtimer is the length of that DNA * 2, so yeah, more or less unique to each gene.
I've added a *.thisgene to help make viruses. Should help eliminate the creation of random viruses.
Here's an empty viral gene I made using *.thisgene
Doesn't do anything but send viruses out (won't work in 2.35, this is for demonstration purposes only).
cond
start
250
'*.vtimer = 1 then shoot virus
*.vtimer 2 sub sgn
'-1 if ready, 1 else
-1 mult
'1 if ready, -1 else
1 add 3 div
'1 if ready, 0 else
.vshoot mult store
'*.vtimer = 0 then make virus
*.thisgene
*.vtimer 1 sub sgn -1 mult
'now have 1 if making, -1 else
1 add
'2 if making, 0 else
3 div
'1 if making, 0 else
.mkvirus mult store
'*.vtimer > 1 then do nothing
stop
it wouldn't be too hard to apply some SB techniques to make a killer selective virus.
-
Made something similar work in 2.35 but uses *.vtimer to identify virus genes. Used vtimer to identify viral gene time in a SG bot, then used number to determine dist level for vshoot. Took some major brain stretching to make it work though. I have to admit I like your idea better, especially since my method wouldn't work for mutating viruses.
Endy ;)
-
Is it possible to make a virus that won't kill what it's shot into...I found my zerobots only mutate if infected by viruses, which then they do .repro, but they die almost instantly then, and I'd love to insert a virus carrying bot (one specifically designed to carry the virus pretty much only...So no repro in it) Then infect me zero's