Darwinbots Forum

Bots and Simulations => DNA - General => Topic started by: kage on December 02, 2006, 07:59:49 PM

Title: Energy Shooting Virus
Post by: kage on December 02, 2006, 07:59:49 PM
Would this work for a virus that forces the victim to shoot energy?

Code: [Select]
cond
 *.robage 0 =
start
 7 989 store
stop

cond
 *.vitmer 0 =
start
 3 .mkvirus store
stop

cond
 7 *989 !=
start
 -2 .shoot store
stop
Title: Energy Shooting Virus
Post by: Numsgil on December 03, 2006, 12:28:21 AM
Yes, but you need a gene to fire the virus.
Title: Energy Shooting Virus
Post by: kage on December 03, 2006, 09:21:00 AM
Sorry, but what would the gene be, I guess I never put it in to any of my bots and that would explain why they aren't firing their virus
Title: Energy Shooting Virus
Post by: Light on December 03, 2006, 09:34:26 AM
Something such as

cond
  *.eye5 20 >
  *.vtimer 1 =
start
  40 .vshoot store
stop

would fire your virus when it sees something, the number stored in .vshoot determines how far the virus travels, the higher the number the greater distance but the more energy used you would also want to add some cospec recognition so you dont shoot at your own bots.
Title: Energy Shooting Virus
Post by: kage on December 03, 2006, 12:25:54 PM
Quote from: Light
Something such as

cond
  *.eye5 20 >
  *.vtimer 1 =
start
  40 .vshoot store
stop

would fire your virus when it sees something, the number stored in .vshoot determines how far the virus travels, the higher the number the greater distance but the more energy used you would also want to add some cospec recognition so you dont shoot at your own bots.

Thanks, I will add it to my bot
Title: Energy Shooting Virus
Post by: EricL on December 03, 2006, 12:48:28 PM
FYI, I think you have a typo.

cond
7 *989 !=
start
-2 .shoot store
stop

Should be

cond
7 989 * !=
start
-2 .shoot store
stop
Title: Energy Shooting Virus
Post by: Light on December 03, 2006, 12:52:28 PM
I think both are correct, *989 and 989 * are the same aren't they?
Title: Energy Shooting Virus
Post by: EricL on December 03, 2006, 01:16:04 PM
Quote from: Light
I think both are correct, *989 and 989 * are the same aren't they?
Your right.  I hadn't noticed the other way in the code.  Guess I should try writing a few more bots...  


Nevermind....