Author Topic: A gene without a cond.  (Read 4330 times)

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
A gene without a cond.
« on: December 21, 2007, 01:24:01 PM »
What is the folowing gene supposed to do.

I have put this gene somewhere in the middle of multiply4. I thought it did just execute well every time. Now it seems some bots are and others aren't, makes it more unpredictable how does it work could it have to do with the activation of a earlier gene.

And another question, does the storing cost any nrg besides the storing cost.

The gene
Quote
start
460 .eye9width store
520  .eye9dir store
460 .eye1width store
-520 .eye1dir store
stop
« Last Edit: December 21, 2007, 01:25:26 PM by Peter »
Oh my god, who the hell cares.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
A gene without a cond.
« Reply #1 on: December 21, 2007, 01:41:35 PM »
It should execute everytime.  Note that gene numbers are likely off in the gene acticvations dialog, a bug I'm working on.

There is no implicit cost to stores other than that indicated by the human.
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
A gene without a cond.
« Reply #2 on: December 21, 2007, 01:48:24 PM »
Its execution will depend on the cond before it.  A single cond will control multiple start statements (and else statements too).

Example:

cond
*.nrg 3000 >
start
stuff
stop

...junk...

start
other stuff
stop

Both start blocks are controlled by that single cond block.
« Last Edit: December 21, 2007, 01:49:50 PM by Numsgil »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
A gene without a cond.
« Reply #3 on: December 21, 2007, 01:59:05 PM »
Oh, right.  Actually, it's even more complex than that.  A start means "AND up everything on the boolean stack and execute the following DNA if the result is true.  So in this case,

cond
true
start
false
stop

start
1 .dn store
stop


1 will not be stored into .dn because of the false above.
Many beers....

Offline fulizer

  • Bot Destroyer
  • ***
  • Posts: 198
    • View Profile
A gene without a cond.
« Reply #4 on: December 24, 2007, 04:45:32 AM »
by the looks of it (a guess) it will change the width of the eyes (can bots even do that?)
"If this is coffee bring me tea, If this is tea, bring me coffee"

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
A gene without a cond.
« Reply #5 on: December 24, 2007, 05:09:36 AM »
Quote from: fulizer
by the looks of it (a guess) it will change the width of the eyes (can bots even do that?)
Yes, it does. This gene make the two outer eyes bigger, and make the full sight a circle, that way multiply can look behind itself  , no more opponent shooting in the back without knowing they are there.
Oh my god, who the hell cares.