Author Topic: OCULUS II  (Read 9322 times)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
OCULUS II
« on: April 29, 2008, 08:00:29 PM »
This must be my most elaborate and unreadable code I ever produced. I checked over it twice (a very tedious job!!!) and found no errors, so should work. OCULUS I turned towards the thing it needed to turn least towards to face it; OCULUS II faces towards the closest thing in sight, using the priority system of OCULUS I in case of conflicts.

-4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor mult *.eye1 *.eye7 sub sgn 0    floor mult *.eye1 *.eye6 sub sgn 0 floor mult *.eye1 *.eye5 sub sgn 0 floor mult *.eye1 *.eye4 sub   sgn 0 floor mult *.eye1 *.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0 floor mult 4 *.eye9     *.eye8 sub sgn 0 floor mult *.eye9 *.eye7 sub sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult *.eye9 *.eye3 sub sgn 0 floor  mult *.eye9 *.eye2 sub sgn 0 floor mult *.eye9 *.eye1 sub sgn ++ sgn mult add -3 *.eye2 *.eye9 sub   sgn ++ sgn mult *.eye2 *.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor mult *.eye2 *.eye6  sub sgn 0 floor mult *.eye2 *.eye5 sub sgn 0 floor mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2    *.eye3 sub sgn 0 floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8 *.eye9 sub sgn ++ sgn     mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6 sub sgn 0 floor mult *.eye8 *.eye5 sub sgn 0   floor mult *.eye8 *.eye4 sub sgn 0 floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2 sub   sgn ++ sgn mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9 sub sgn ++ sgn mult *.eye3    *.eye8 sub sgn ++ sgn mult *.eye3 *.eye7 sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult *.eye3 *.eye2 sub sgn ++ sgn   mult *.eye3 *.eye1 sub sgn ++ sgn mult add 2 *.eye7 *.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub     sgn ++ sgn mult *.eye7 *.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0 floor mult *.eye7 *.eye5  sub sgn 0 floor mult *.eye7 *.eye4 sub sgn ++ sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult *.eye7     *.eye1 sub sgn ++ sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn     mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn 0 floor mult *.eye4 *.eye5 sub sgn 0    floor mult *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub     sgn ++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn mult *.eye4    *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub sgn ++ sgn     mult add 0 *.eye5 *.eye9 sub sgn ++ sgn mult *.eye5 *.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub     sgn ++ sgn mult *.eye5 *.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn mult *.eye5 *.eye3   sub sgn ++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn mult *.eye5 *.eye1 sub sgn ++ sgn mult add .focuseye store
« Last Edit: April 29, 2008, 08:04:49 PM by bacillus »
"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 Reiyuki

  • Bot Neophyte
  • *
  • Posts: 8
    • View Profile
OCULUS II
« Reply #1 on: April 30, 2008, 12:36:19 PM »
Quote from: bacillus
This must be my most elaborate and unreadable code I ever produced. I checked over it twice (a very tedious job!!!) and found no errors, so should work. OCULUS I turned towards the thing it needed to turn least towards to face it; OCULUS II faces towards the closest thing in sight, using the priority system of OCULUS I in case of conflicts.

-4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor mult *.eye1 *.eye7 sub sgn 0    floor mult *.eye1 *.eye6 sub sgn 0 floor mult *.eye1 *.eye5 sub sgn 0 floor mult *.eye1 *.eye4 sub   sgn 0 floor mult *.eye1 *.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0 floor mult 4 *.eye9     *.eye8 sub sgn 0 floor mult *.eye9 *.eye7 sub sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult *.eye9 *.eye3 sub sgn 0 floor  mult *.eye9 *.eye2 sub sgn 0 floor mult *.eye9 *.eye1 sub sgn ++ sgn mult add -3 *.eye2 *.eye9 sub   sgn ++ sgn mult *.eye2 *.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor mult *.eye2 *.eye6  sub sgn 0 floor mult *.eye2 *.eye5 sub sgn 0 floor mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2    *.eye3 sub sgn 0 floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8 *.eye9 sub sgn ++ sgn     mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6 sub sgn 0 floor mult *.eye8 *.eye5 sub sgn 0   floor mult *.eye8 *.eye4 sub sgn 0 floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2 sub   sgn ++ sgn mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9 sub sgn ++ sgn mult *.eye3    *.eye8 sub sgn ++ sgn mult *.eye3 *.eye7 sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult *.eye3 *.eye2 sub sgn ++ sgn   mult *.eye3 *.eye1 sub sgn ++ sgn mult add 2 *.eye7 *.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub     sgn ++ sgn mult *.eye7 *.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0 floor mult *.eye7 *.eye5  sub sgn 0 floor mult *.eye7 *.eye4 sub sgn ++ sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult *.eye7     *.eye1 sub sgn ++ sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn     mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn 0 floor mult *.eye4 *.eye5 sub sgn 0    floor mult *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub     sgn ++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn mult *.eye4    *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub sgn ++ sgn     mult add 0 *.eye5 *.eye9 sub sgn ++ sgn mult *.eye5 *.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub     sgn ++ sgn mult *.eye5 *.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn mult *.eye5 *.eye3   sub sgn ++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn mult *.eye5 *.eye1 sub sgn ++ sgn mult add .focuseye store


That is a sweet bit of code there.
I mean look at it, the thing's longer than most bots themselves, and only needs one store command to function.  


How do you think it would handle mutations?

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
OCULUS II
« Reply #2 on: April 30, 2008, 12:52:09 PM »
Quote from: Reiyuki
How do you think it would handle mutations?
Poorly, as with most hand authorred code.
Many beers....

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
OCULUS II
« Reply #3 on: April 30, 2008, 01:52:26 PM »
Long store comands break easy from mutations... if one value or operator mutates into an or/and for example, or if the store becomes an inc or dec...
Was a big problem for me when trying to make aneural network, had to make each weight consist of many values to get it to evolve without too much trouble.

Also if you like one liner bots, you should take a look at the SS league... for bots with only one store command.
« Last Edit: April 30, 2008, 01:53:33 PM by Moonfisher »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
OCULUS II
« Reply #4 on: April 30, 2008, 05:57:06 PM »
A one liner bot? I think the only one I've seen is Nano. Then again, it depends on how you define a line...
"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
OCULUS II
« Reply #5 on: April 30, 2008, 07:03:58 PM »
one line meaning a single, self contained store.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
OCULUS II
« Reply #6 on: April 30, 2008, 08:08:36 PM »
That would be a challenge; could you build a single increment bot?
"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
OCULUS II
« Reply #7 on: April 30, 2008, 08:35:51 PM »
That... may not be strictly possible.  There wouldn't really be a way to feed using shots, at least, since all feeding shots are negative.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
OCULUS II
« Reply #8 on: April 30, 2008, 08:45:48 PM »
Sure it is.
Just use ties. You can increment... umm....
damn, I think you're right..
"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
OCULUS II
« Reply #9 on: April 30, 2008, 09:02:40 PM »
There's a lot of new SS bots, which is why the SS league was started...
Still only like 6 bots in there... but it's a funny challenge...
It's not just about converting genes, you can only do one thing at the time.
But you can do a lot with one store per cycle.
Most of the new SS bots are in the starting gate, theres also a lot of good pointers in those topics.

And you CAN make a single inc bot... but you can never push values above 1 into a location though... so I guess you would have to tie and use 1 .sharenrg... but I think you would loose energy that way...
With a single dec you could atleast shoot... but not reproduce...

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
OCULUS II
« Reply #10 on: April 30, 2008, 09:07:31 PM »
I would really like to run the SS league sometime. Me and Commander Keen seem to be taking over all the Leagues. In the meantime, though, I've got 59 rounds of Guardian to work through.
"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 gymsum

  • Bot Destroyer
  • ***
  • Posts: 215
    • View Profile
OCULUS II
« Reply #11 on: May 01, 2008, 12:10:42 AM »
I thought sgn wasn't supported in DB yet.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
OCULUS II
« Reply #12 on: May 01, 2008, 12:40:08 AM »
Quote from: gymsum
I thought sgn wasn't supported in DB yet.
It's there.  Replaces the top value on the integer stack with either -1 or 1 depending on it's sign.
Many beers....

Offline gymsum

  • Bot Destroyer
  • ***
  • Posts: 215
    • View Profile
OCULUS II
« Reply #13 on: May 02, 2008, 12:00:17 AM »
Quote from: EricL
Quote from: gymsum
I thought sgn wasn't supported in DB yet.
It's there.  Replaces the top value on the integer stack with either -1 or 1 depending on it's sign.

thought it was sin.. lol

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
OCULUS II
« Reply #14 on: May 02, 2008, 07:53:19 PM »
I guess a sin function would be useful when making a snake-like multibot. Maybe the values could be scaled to between -1000 and 1000?
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan