Author Topic: Gene Collection: Virus  (Read 3610 times)

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Gene Collection: Virus
« on: December 17, 2007, 09:33:22 AM »
Lets post here Plug and Play virus genes.

Explain them so their meaning and purpose are clear.
Sometimes you win, and sometimes you lose...

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Gene Collection: Virus
« Reply #1 on: December 17, 2007, 09:45:19 AM »
I'm using the old conditional style for readability.

This is LF6 'safe' virus, modified. Plug it before any other DNA.

Code: [Select]
'This first gene must be always at top of the DNA.
'This is the self replicating virus. It activates only when it isn't the first gene
'that's it, when it has infected. But, if it detects it has infected back the bot,
'(if *55 is equal to *.myeye, see third gene), it will delete itself.
'Otherwise, it will delete genes above and below it.
cond
*.thisgene 1 >
*.vtimer 0 =
start
*.thisgene .mkvirus store
100 .vshoot store
*.thisgene 1 add .delgene store
*.thisgene 1 sub .delgene 1 rnd mult store
*.thisgene .delgene *55 *.myeye 1 floor sub sgn abs 1 sub abs mult store
stop

'This is the launcher gene. You need it to shoot the above dormant virus.
'A small value for .vshoot avoids abusing the energy.
'Good energy management requires shutting down the gene when energy
'is low.
cond
*.vtimer 0 =
*.nrg 2000 >
start
10 .vshoot store
1 .mkvirus store
stop

'This allows the virus to recognize the parent bot.
cond
start
*.myeye 55 store
stop
« Last Edit: December 17, 2007, 09:50:49 AM by MacadamiaNuts »
Sometimes you win, and sometimes you lose...

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Gene Collection: Virus
« Reply #2 on: March 07, 2008, 12:34:02 AM »
This gene can be a mild irritance as it disturbs the normal pattern of behaviour and spreads rapidly:

'this doubles up against virus protection and conspec recognition
cond
 *.robage 0 =
start
 989 .out5 store
stop

'make the virus
cond
 *.vtimer 0 =
start
 3 .mkvirus store
stop

'the virus gene
cond
 989 *.out5 !=
start
 10000 rnd 5000 sub 900 rnd store
 *.thisgene .mkvirus store
 *.nrg 3 div .vshoot store
stop

'fire the virus
cond
 *.vtimer 1 =
start
 50 .vshoot store
stop
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan