Author Topic: The Sentinel  (Read 4177 times)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The Sentinel
« on: March 07, 2008, 12:05:02 AM »
Hi,
I made this bot called Sentinel which turns other bots into sentinels (duh). The way it works is that it shoots a virus that fixes the infected bot in place, then eats enemy bots and lets itself get eaten by Sentinel. Does any one have any good ideas for it? :help:

cond
start
 100 *.eye5 sub 50 div .up store
 407 .out4 store
 407 .out3 store
 *.nrg 5 div *.body sub .strbody store
 *.body *.nrg 5 div sub .fdbody store
 991 991 store
 1216 .eye5width store
 *.refxpos *.refypos angle *.veldx add .setaim store
stop

cond
 *.in3 *.out3 =
 *.in4 *.out4 =
start
 *.maxvel .dn store
stop

cond
 *.eye5 40 >
 *.in3 *.out3 !=
start
 -6 .shoot store
stop

cond
 *.reffixed 0 =
 *.in3 *.out3 = or
 *.eye5 40 < or
start
 0 .fixpos store
stop

cond
 *.vtimer 0 =
start
 *.thisgene 1 add .mkvirus store
stop

cond
 *991 991 !=
start
 4 .shootval store
 407 .out4 store
 *.thisgene 1 rnd 2 mult 1 sub add .delgene store
 1 .fixpos store
 1216 .eye5width store
 *.refxpos *.refypos angle .setaim store
 *.in4 407 sub sgn abs 20 *.eye5 sub sgn 1 sub sgn abs mult -6 mult .shoot store
 *.thisgene .mkvirus store
 *.nrg 50 div .vshoot store
 *.nrg 5 div *.body sub .strbody store
 100 *.slime sub .mkslime store
stop

cond
 *.waste 50 >
start
 *.waste .shootval store
 -4 .shoot store
stop

cond
 *.nrg 5000 >
start
 50 .repro store
stop

cond
 *.vtimer 1 =
start
 *.nrg 10 div .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

Offline fulizer

  • Bot Destroyer
  • ***
  • Posts: 198
    • View Profile
The Sentinel
« Reply #1 on: March 11, 2008, 09:41:57 AM »
the virus could destroy all genes.
or make a sential targeting thing and fire -2 shots leaving the sential free to go off and hunt more bots
« Last Edit: March 11, 2008, 09:42:51 AM by fulizer »
"If this is coffee bring me tea, If this is tea, bring me coffee"

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The Sentinel
« Reply #2 on: March 12, 2008, 12:38:42 AM »
I think my newest version does that, as well as destroy any bot trying to bond to it.

The newest changes are:
  • Leaking energy
  • Defenses - Poison, Shell and Slime
  • Bots fix themselves in front of sentinels

The bot seems quite inefficient, which I'm trying to fix.
"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
The Sentinel
« Reply #3 on: March 12, 2008, 02:43:57 AM »
Reducing the number of genes should help. Also, I think store commands cost you energy every cycle, whether or not they are activated.
Store commands cost .04 nrg per cycle, and genes cost .004 per cycle, so try to reduce the store commands and number of genes. It can save quite a lot if you've got lots of them.

For instance, you could replace the whole reproduction gene with this one line, which you could put in gene one:

*.nrg 5000 sub 0 floor sgn 50 mult .repro store

That'll get rid of one gene, saving 0.04 energy per cycle(not much, but it adds up)  
You can also make things like movement more efficient, which would reduce costs dramatically.
Another thing to consider is the use of inc/dec, which use no energy at all.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
The Sentinel
« Reply #4 on: March 12, 2008, 06:53:50 AM »
I thought storing in memmory location 0 had no costs...
I read a topic where people where discussing it (Concerning a hibernation bot) and at one point Eric mentioned that stores where now counted even if they stored in location 0, but then people started to complain and later in the topic Eric sais he changed it back....

Not realy sure what to think, I made Pacifist to make sure it would have low costs even if all stores where counted, but the bot I'm working on now would have to be remodeled if 0 stores have or will have a cost again at some point... I'm hoping I can atleast finish my bot before anything changes

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
The Sentinel
« Reply #5 on: March 12, 2008, 10:37:11 AM »
Quote from: Moonfisher
I thought storing in memmory location 0 had no costs...
I read a topic where people where discussing it (Concerning a hibernation bot) and at one point Eric mentioned that stores where now counted even if they stored in location 0, but then people started to complain and later in the topic Eric sais he changed it back....
You are correct.  Stores to location 0 do nothing and cost nothing.
Many beers....

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The Sentinel
« Reply #6 on: March 14, 2008, 10:57:28 PM »
Thanks guys... I think I could reduce the bot to two genes, but I'd like to make the point that I do value readability when writing new versions.
btw. ever noticed that tiny bots with 1 nrg or something tend to live long, when not exactly being blown up?
"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
The Sentinel
« Reply #7 on: March 15, 2008, 01:21:33 PM »
Quote from: bacillus
ever noticed that tiny bots with 1 nrg or something tend to live long, when not exactly being blown up?
Could be a bug.  Would be very interested in looking at a sim that demonstrates this.  Please file as a new bug.  Thanks.
Many beers....

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The Sentinel
« Reply #8 on: March 15, 2008, 07:10:09 PM »
Don't worry; I had another look the other day, and the bots lived about 100 cycles on 1 nrg before dying. Turns out I was accidentally running my sim with no costs!
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan