Author Topic: Viruses that are part of vital code  (Read 4803 times)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Viruses that are part of vital code
« on: March 21, 2008, 11:18:05 PM »
Some bots use viruses as part of their code, for example Commander Keen's PV:

Code: [Select]
cond
start
*.thisgene .mkvirus store
.vshoot inc
300 .aimdx store
50 .repro store
0 .delgene store
1 .sharenrg store
.tie inc
stop
These viruses are efficient, as it covers a lot of vital functions, and the suicidal ones, like 50 .repro store, can be cancelled by a gene following it with 0 .repro store in it.

How do you stop bots like these infecting themselves after this inhibitor gene, cancelling it out, AND not destroy any vital genes in the process?

Edit => my first though was to the condition:

Code: [Select]
*42 0 =
and add this line to the gene:
Code: [Select]
42 inc
But that is fragile if the bot it infects stores over position 42.
« Last Edit: August 28, 2010, 04:40:26 PM by Shasta »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Commander Keen

  • Bot Builder
  • **
  • Posts: 91
    • View Profile
Viruses that are part of vital code
« Reply #1 on: March 22, 2008, 03:41:37 AM »
There are plenty of memory locations. The average bot uses only a small percentage, and few if any non-sysvar locations. I think that it would be very unlikely that a bot would use a specific memory location, provided you picked one that is not in normal use. Most bots use locations 50-100, if you pick a non-sysvar location other than those then you shouldn't have any problem, at least until the next version of DB comes out  

I don't think there is any bots other than mine that use viruses as an integral part of their code, although it would certainly be interesting to see more bots that do.

EDIT: Nvm, just saw your bot in the bestiary. Hooray for vital viruses!
« Last Edit: March 22, 2008, 04:11:22 AM by Commander Keen »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Viruses that are part of vital code
« Reply #2 on: March 23, 2008, 10:00:00 PM »
Well, there is still that chance. Btw. nice pic, where's it from?
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Viruses that are part of vital code
« Reply #3 on: March 24, 2008, 06:46:38 PM »
Quote from: Commander Keen
There are plenty of memory locations. The average bot uses only a small percentage, and few if any non-sysvar locations.

That just reminded me of a question I was meant to ask for ages: why are the memory locations so randomly scattered with large gaps in between?
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Viruses that are part of vital code
« Reply #4 on: March 24, 2008, 06:56:22 PM »
Quote from: bacillus
That just reminded me of a question I was meant to ask for ages: why are the memory locations so randomly scattered with large gaps in between?
It's historical.  Previous developers grouped like sysvars together, usually starting at nice round numbers like 800 or 900.  

I guarentee locations 50-175 inclusive will not be used for future sysvars while I'm at the helm and are thus safe for long-term private use.  All others may be used for future functionality.
Many beers....

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Viruses that are part of vital code
« Reply #5 on: March 24, 2008, 07:06:56 PM »
The categorization of sysvars makes sense. Even so, I heard there was something special about postions 989-999. Could you please fill me in?
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Viruses that are part of vital code
« Reply #6 on: March 24, 2008, 07:59:41 PM »
Quote from: bacillus
I heard there was something special about postions 989-999. Could you please fill me in?
Locations 971 through 990 are the genetic memory locations.  Locations 971-975 inclusive get copied from parent (mother in the case of sexual reproduction) to offspring at the moment of birth.  Locations 976-990 get copied over the next 15 cycles, one location per cycle starting at 976 and counting up as long as the birth tie remains in place.

There is nothing special about locations 991-1000 that I know of.
Many beers....

Offline Commander Keen

  • Bot Builder
  • **
  • Posts: 91
    • View Profile
Viruses that are part of vital code
« Reply #7 on: March 24, 2008, 08:02:20 PM »
Those positions are Epigenetic Memory Locations

Quote
Btw. nice pic, where's it from?

Wesnoth. It's one of the portraits for the elvish marksman.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Viruses that are part of vital code
« Reply #8 on: March 24, 2008, 08:14:27 PM »
Never noticed.But now that you mention it, yes.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Viruses that are part of vital code
« Reply #9 on: March 24, 2008, 11:53:31 PM »
Quote from: Commander Keen
Wesnoth. It's one of the portraits for the elvish marksman.


 I've been known to steal Wesnoth'ian graphics for some home brew games from time to time.  For an open source game they have some nice artists working for 'em.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Viruses that are part of vital code
« Reply #10 on: March 25, 2008, 12:04:44 AM »
Quote from: Numsgil
I've been known to steal Wesnoth'ian graphics for some home brew games from time to time.

Doesn't everybody    
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Commander Keen

  • Bot Builder
  • **
  • Posts: 91
    • View Profile
Viruses that are part of vital code
« Reply #11 on: March 25, 2008, 12:53:07 AM »
I've yet to meet a programmer who doesn't use Wesonth graphics

Hooray for Wesnoth!

I'll start by recruiting excalibur, pacifist, and etch. Your turn Konrad...
« Last Edit: March 25, 2008, 12:59:56 AM by Commander Keen »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Viruses that are part of vital code
« Reply #12 on: March 26, 2008, 12:25:20 AM »
Talking of Etch, I have started venturing into the grand task of reviving the F1 league. I've already Downloaded every single bot in the F1 forum, and am now looking for F1 bots in the starting gate. To economize, I've only entered the most recent versions of the bots.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan