Bots and Simulations > Bot Tavern

Viruses that are part of vital code

(1/3) > >>

bacillus:
Some bots use viruses as part of their code, for example Commander Keen's PV:


--- Code: ---cond
start
*.thisgene .mkvirus store
.vshoot inc
300 .aimdx store
50 .repro store
0 .delgene store
1 .sharenrg store
.tie inc
stop

--- End code ---
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: ---*42 0 =
--- End code ---

and add this line to the gene:

--- Code: ---42 inc
--- End code ---

But that is fragile if the bot it infects stores over position 42.

Commander Keen:
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!

bacillus:
Well, there is still that chance. Btw. nice pic, where's it from?

bacillus:

--- 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.
--- End quote ---

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?

EricL:

--- 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?
--- End quote ---
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.

Navigation

[0] Message Index

[#] Next page

Go to full version