Author Topic: Dominis(SS)(bacillus)-30.03.08  (Read 5905 times)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Dominis(SS)(bacillus)-30.03.08
« on: March 29, 2008, 09:38:33 PM »
After hours of furious experimentation, I got this to work without jamming up; for those who are also using Numsgil's template in Brevis, I should add that none of the conditions can overlap (I figured this out after a long time). Updated versions to come.

Code: [Select]
'Dominis
'My first single-store bot.
'primitive waste disposal
'feeding
'movement
'reproduction
'turning to avoid conspecs
cond
start
 -4
  *.waste 500 sub sgn 0 floor mult
 -6
 500 *.waste sub sgn 0 floor mult
 *.eye5 40 sub sgn 0 floor mult
 *.refeye *.myeye sub sgn abs mult
 2
 39 *.eye5 sub sgn 0 floor mult
 500 *.waste sub sgn 0 floor mult
 5000 *.nrg sub sgn 0 floor mult add
 50
 39 *.eye5 sub sgn 0 floor mult
 500 *.waste sub sgn 0 floor mult
 *.nrg 5000 sub sgn 0 floor mult add
 314 rnd
 500 *.waste sub sgn 0 floor mult
 *.refeye *.myeye sub sgn abs -- abs mult add

 .shoot
 *.eye5 40 sub sgn 0 floor mult
 *.refeye *.myeye sub sgn abs mult
 .up
 39 *.eye5 sub sgn 0 floor mult
 500 *.waste sub sgn 0 floor mult
 5000 *.nrg sub sgn 0 floor mult add
 .repro
 39 *.eye5 sub sgn 0 floor mult
 500 *.waste sub sgn 0 floor mult
 *.nrg 5000 sub sgn 0 floor mult add
 .aimsx
 500 *.waste sub sgn 0 floor mult
 *.refeye *.myeye sub sgn abs -- abs mult add
store
stop
« Last Edit: May 13, 2014, 04:31:46 PM by Botsareus »
"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
Dominis(SS)(bacillus)-30.03.08
« Reply #1 on: March 29, 2008, 10:06:53 PM »
This version works better:

'Dominis v1.2
cond
start
-6
*.eye5 40 sub sgn 0 floor mult
*.refeye *.myeye sub sgn abs mult
5
2000 *.nrg sub sgn 0 floor mult
*.refeye *.myeye sub sgn abs mult
39 *.eye5 sub sgn 0 floor mult add
50
*.nrg 2000 sub sgn 0 floor mult
39 *.eye5 sub sgn 0 floor mult add
314 rnd
*.refeye *.myeye sub sgn abs -- abs mult add

.shoot
*.eye5 40 sub sgn 0 floor mult
*.refeye *.myeye sub sgn abs mult
.up
2000 *.nrg sub sgn 0 floor mult
*.refeye *.myeye sub sgn abs mult
39 *.eye5 sub sgn 0 floor mult add
.repro
*.nrg 2000 sub sgn 0 floor mult
39 *.eye5 sub sgn 0 floor mult add
.aimdx
*.refeye *.myeye sub sgn abs -- abs mult add
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 Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Dominis(SS)(bacillus)-30.03.08
« Reply #2 on: March 30, 2008, 07:04:26 AM »
In the first reply in Brevis I included some hints and code that should make it a lot easyer to prevent overlaping actions.
It's hard to just start off writing everything on one line, if you just write a bot with normal conditions you can gradualy make sure all conditions are mututaly exclusive. (You can also just use Sanger I think, but the examples I saw for that had a strange syntax, maybe I didn't stare at it hard enough)

Either way if you try to make mutualy exclusive conditions it can get hard to find your way when you reach a certain size, so if you insert this code before your bot :

Quote
cond
*.actions 1 >
start
100 *.actions add inc 'Keeps track of how many times it has happened.
*121 122 *.actions 10 mult add store

'Some variables to help understand why genes are being triggered at the same time
*.actions 111 store
*.robage 4 mod 112 store
*.memval 113 store
*.eye5 114 store

1 142 store
stop

cond
*142 0 >
start
1 .repro store 'Use this if you want to hunt for rare bugs.
stop

cond
*.actions 0 !=
start
0 .actions store
stop

And insert these 3 lines in all your other genes.

Quote
cond
'Your condition
start
'Your action
*121 122 *.actions 10 mult add store
*.thisgene 121 store
.actions inc
stop

Then you'll be able to see what genes where triggered in the memmory locations above, and you can choose to impose a slow repro death to any bot that peforms 2 actions at the same time. This makes it a lot easyer to debug, ig you have a ton of overlaps you can just disable the repro death thing, if you have fe it makes it esy to see what bots are breaking the rules.
Then once you have everything working and the repro thing never occurs you can build the conditions into the action taken, without removing the conditions.
This way you're also making sure you didn't make any type o's or missed a mult or and add or something, in your SG'fied conditions.
And once you have all that in place you should be able to safely cut and paste everything into one store. (I also did that over several steps, things can go wrong for no apparent reason at times)

Either way this should be very usefull for making large SS bots without Sanger. I know I would never have gotten brevis to work without the debug code and constant testing for every step I took. But then again I'm also kinda sloppy when coding, so maybe I need mre help than others
« Last Edit: March 30, 2008, 07:09:38 AM by Moonfisher »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Dominis(SS)(bacillus)-30.03.08
« Reply #3 on: March 30, 2008, 04:14:31 PM »
Please remember to follow the rules regarding new versions of bots.  Specifically, either dump the original version, and rename the topic to 1.2, or include both but list the newer version first in the first post.  Otherwise it's unlikely that a league maintainer will select the newer version.  Also, I'm playing around with the idea of a web spider that crawls the bestiary and finds bots to download, but it would be pretty stupid and only search the first post of every thread.  Unless you don't actually want your 1.2 version to be used

As for your bot, good work.  I tried to SS animal minimalis, and gave up in frustration, even using debugging code.
« Last Edit: March 30, 2008, 04:15:23 PM by Numsgil »

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Dominis(SS)(bacillus)-30.03.08
« Reply #4 on: March 30, 2008, 05:21:29 PM »
Dominis seems to be forming a mutual survival relationship with animal archaea Oo
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Dominis(SS)(bacillus)-30.03.08
« Reply #5 on: March 31, 2008, 01:19:07 AM »
Quote from: Numsgil
Please remember to follow the rules regarding new versions of bots.  Specifically, either dump the original version, and rename the topic to 1.2, or include both but list the newer version first in the first post.  Otherwise it's unlikely that a league maintainer will select the newer version.  Also, I'm playing around with the idea of a web spider that crawls the bestiary and finds bots to download, but it would be pretty stupid and only search the first post of every thread.  Unless you don't actually want your 1.2 version to be used

As for your bot, good work.  I tried to SS animal minimalis, and gave up in frustration, even using debugging code.
Okay, no problem.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan