Author Topic: Shooting cost and random behavior  (Read 2571 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Shooting cost and random behavior
« on: February 22, 2010, 10:04:23 AM »
Alright, I've been running a randombot sim on my laptop for a week, 30 heterotrophs, each with unique random numbers that I started with. Today I found a bot that was shooting constantly but no shooting costs were applied. I had set it to 0.64. It has always worked but today I discovered that I had to set it above 1 for any cost to be applied. If I set it to 1 or lower it shoots for free.

I was thinking maybe it was a temporary glitch, so I thought I should try this bot on my stationary computer. I copied the dna over and started a number of this bot together with some veggies and what do I see? The bots come alive! While they constantly shoots they sometimes swims and sometimes floot around! On my laptop this bot was constantly fixed! So just by picking one bot and start a new sim with it you can get different behavior from the same DNA!

I've also discovered that on my laptop costs are rounded down (0.64 becomes 0) while on my stationary they are rounded up (0.64 becomes 1)!

I know that the GUI's in DB are somewhat depended on the computers language settings for values, but Eric fixed that for the cost GUI, but maybe there is something else causing the difference in rounding.

It seems Morphological Costs were rounded since version 2.43.1L, maybe earlier than that which I've somehow missed. Anything from 1 and higher for movement and shooting is too aggressive imo.  The oddity with my laptop is that I must set the cost ABOVE 1 to get any cost at all, like 1.001 for instance.

Fortunately the Cost Multiplier isn't rounded so I can lower that instead. I didn't know this until today so I've been running sims with either too aggressive costs or no costs at all! Argh!

Here's the bot DNA if you want to check it out:

Code: [Select]
^ 833 150 -- add sqr clear and
 ~
''''''''''''''''''''''''  Gene:  1 Begins at position  10  '''''''''''''''''''''''
 cond
 - false
 << 249 509 *.up 125 714 *-242 846 *.up ^ sub *398 751 736 ~ 263 438 517 216
''''''''''''''''''''''''  Gene:  1 Ends at position  31  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  2 Begins at position  32  '''''''''''''''''''''''
 cond
 177 ceil !%=
 << >> sub << inc
 inc
 *.backshot 497 311 mult 337 sgn
''''''''''''''''''''''''  Gene:  2 Ends at position  47  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  3 Begins at position  48  '''''''''''''''''''''''
 cond
 sub 271 dec
 start
 ~ false
 919 sub sqr 784 swapbool
 over
''''''''''''''''''''''''  Gene:  3 Ends at position  60  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  4 Begins at position  61  '''''''''''''''''''''''
 cond
 .eye1dir store
 860 start
 ceil store
 203 ++ *.mydn
''''''''''''''''''''''''  Gene:  4 Ends at position  70  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  5 Begins at position  71  '''''''''''''''''''''''
 start
 9 clearbool
 <=
 add 987 537 577 702 234
''''''''''''''''''''''''  Gene:  5 Ends at position  80  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  6 Begins at position  81  '''''''''''''''''''''''
 start
 532 469 floor << |
''''''''''''''''''''''''  Gene:  6 Ends at position  86  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  7 Begins at position  87  '''''''''''''''''''''''
 else
 1022 681 sub dup 321 ~ inc
 %=
 *358 =
 =
 & store
 angle mod
''''''''''''''''''''''''  Gene:  7 Ends at position  102  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  8 Begins at position  103  '''''''''''''''''''''''
 else
 dist add or
 <=
 826 675 dist 127 inc
 559 <
 *985 784 1047 !=
 55 1 334 !~=
 ceil 671 rnd ++ -2 or
 or
 309 dropbool
 or
 320 angle *.up 218 462 !~=
 dup ~=
 ~ angle swap
''''''''''''''''''''''''  Gene:  8 Ends at position  143  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  9 Begins at position  144  '''''''''''''''''''''''
 start
 734 91 mult store
 | !~=
 657 div angle overbool
 600 .shoot dec
 <
 pow pow store
 307 abs dupbool
 store
 dec
 397 inc
 1189 59 dist 640 672 inc
 734 ~
''''''''''''''''''''''''  Gene:  9 Ends at position  176  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  10 Begins at position  177  '''''''''''''''''''''''
 cond
 inc
 else
 379 ~=
 341 412 true
 390
''''''''''''''''''''''''  Gene:  10 Ends at position  185  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  11 Begins at position  186  '''''''''''''''''''''''
 cond
 >
 656 ++ clearbool
 inc

''''''''''''''''''''''''  Gene:  11 Ends at position  191  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  12 Begins at position  192  '''''''''''''''''''''''
 cond
 938 !%=
 *.up 91 sqr 674 inc
 *223 ceil *718 store
 22 ceil
''''''''''''''''''''''''  Gene:  12 Ends at position  205  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  13 Begins at position  206  '''''''''''''''''''''''
 cond
 205 clearbool
 683 start

''''''''''''''''''''''''  Gene:  13 Ends at position  210  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  14 Begins at position  211  '''''''''''''''''''''''
 cond
 437 759 ++ 89 167 >=
 start
 inc
 xor
 pow *383 <
 599 swapbool
 1 281 348 dropbool
 817 2
''''''''''''''''''''''''  Gene:  14 Ends at position  231  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  15 Begins at position  232  '''''''''''''''''''''''
 start
 143 197 1060 1110 619 630 *746
''''''''''''''''''''''''  Gene:  15 Ends at position  239  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  16 Begins at position  240  '''''''''''''''''''''''
 else
 .mydn inc
 184 *247 >=
''''''''''''''''''''''''  Gene:  16 Ends at position  245  '''''''''''''''''''''''
« Last Edit: December 22, 2011, 11:48:20 AM by Shasta »
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Shooting cost and random behavior
« Reply #1 on: February 22, 2010, 07:38:38 PM »
I'll try to look in to this when I have a second.  Did you try 0.64 vs. 0,64?  I remember that was an issue before.  Maybe you set one of your computers to a different regional setting?

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Shooting cost and random behavior
« Reply #2 on: February 24, 2010, 08:33:23 AM »
No, I'm using dots instead of commas. I've changed it in my language settings. As I said Eric fixed that for the Cost tab but there are some other place where the settings don't stay put (which I don't remember right now) if you use commas.

If the language settings are incompatible all settings go back to 0 instead when you re-open the tab.

It don't seem to have anything to do with the rounding though. If I set the shooting cost to 0.50 the cost will be 0, if I set it to 0.51 it will be 1 on my desktop computer. On my laptop 1.001 becomes 1 and 1 becomes 0.
 
The internet is corrupt and controlled by criminally minded people.