Author Topic: Oculus III  (Read 7058 times)

Offline ashton1993

  • Bot Neophyte
  • *
  • Posts: 14
    • View Profile
Oculus III
« on: May 14, 2011, 11:57:13 AM »
-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 *.eye6 *.eye9 sub sgn ++ sgn mult *.eye6 *.eye8 sub sgn ++ sgn mult *.eye6 *.eye7 sub sgn ++ sgn mult *.eye6 *.eye6 sub sgn ++ sgn mult *.eye6 *.eye5 sub sgn 0 floor mult *.eye6 *.eye3 sub sgn ++ sgn mult *.eye6 *.eye2 sub sgn ++ sgn mult *.eye6 *.eye1 sub sgn ++ sgn mult add 4 add *.focuseye 4 add sub dup sgn -- sgn ++ .focuseye mult inc -- dup sgn -- sgn ++ .focuseye mult inc -- dup sgn -- sgn ++ .focuseye mult inc -- dup sgn -- sgn ++ .focuseye mult inc -- dup sgn -- sgn ++ .focuseye mult inc -- dup sgn -- sgn ++ .focuseye mult inc -- dup sgn -- sgn ++ .focuseye mult inc -- dup sgn -- sgn ++ .focuseye mult inc -- dup sgn -- sgn ++ .focuseye mult inc -- 9 add - dup sgn -- sgn ++ .focuseye mult dec -- dup sgn -- sgn ++ .focuseye mult dec -- dup sgn -- sgn ++ .focuseye mult dec -- dup sgn -- sgn ++ .focuseye mult dec -- dup sgn -- sgn ++ .focuseye mult dec -- dup sgn -- sgn ++ .focuseye mult dec -- dup sgn -- sgn ++ .focuseye mult dec -- dup sgn -- sgn ++ .focuseye mult dec -- dup sgn -- sgn ++ .focuseye mult dec --

Well here we go, dependent on the environment this Ocular is 3 too 500 times as efficient as Oculus II with almost the exact same functionality:
  • This eye uses 634 bp as compared too 523 bp in the original so a slight increase in bulk size.
  • Occulus II has a rather large flaw in that .eye4 is accounted for twice and .eye6 not at all, assuming this was a programming error I fixed the issue
  • .eye5 does not need any accounting for because it's .focuseye value is 0 so this excess DNA was removed
  • Occulus II uses a store every single cycle even if the value of .focuseye does not change thus wasting energy, by comparison Oculus III only Stores when the value of .focuseye changes by storing into memory location 0 when no change in .focuseye is needed which costs 0 energy
  • Inc and Dec use 10 times as less energy as Store and the most .eyefocus needs to change by in a single cycle is 9 though mostly it only needs changing by 1 whilst tracking an enity, through using Inc and Dec energy is saved

When run in simulations where I had 0 costs other than store's which required 10 energy, 3000 starting energy for all and veggie's storing 30 into .up every cycle Oculus II would always die out at 300 cycles however the last Oculus III survived often until 8,000 - 14,000 cycles - quite a good increase in effciency I think, hope you like it  :)

Oh and I forgot to say I've just returned to darwinbots after almost a years exile - this is my 1st project since and I'm hoping for more to come from me and everyone else as I attempt to relearn the DNA of darwinbots  :D
« Last Edit: May 14, 2011, 12:25:04 PM by ashton1993 »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Oculus III
« Reply #1 on: May 14, 2011, 07:36:51 PM »
I may actually try this now? How quickly does it change between the focus eye?

Offline ashton1993

  • Bot Neophyte
  • *
  • Posts: 14
    • View Profile
Re: Oculus III
« Reply #2 on: May 15, 2011, 01:42:39 AM »
Quote
I may actually try this now?
Yup

Quote
How quickly does it change between the focus eye?
One cycle after an entity comes into view

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Oculus III
« Reply #3 on: May 15, 2011, 07:25:22 AM »
I am trying it. :) It seems to be working, I think. I just think I need to make everything else efficient, now.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Re: Oculus III
« Reply #4 on: August 22, 2011, 04:47:30 PM »
Bleh, I managed to lock myself out of my account. Back now!

I'm glad to see Oculus is still in use after all these years, and even better, improved. Now I have to figure out a way to get DB running again  :D
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan