Author Topic: Large fields bugs  (Read 4388 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Large fields bugs
« on: October 29, 2005, 11:19:30 PM »
Here's another run-time 6 overflow.

CODE:
a = rob(n).mutarray(t)

HOVERING INFO:
a = 0

rob(n).mutarray(t) = 75000

The above crash appeared when I ran in the safe setting (see topic 'Settings that makes 2.37.4 stable) with the difference that I increased the field size to width 40000 and height 30000, and increased veggie population to 400. It only took a few minutes for the crash to appear.
« Last Edit: October 29, 2005, 11:22:51 PM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Large fields bugs
« Reply #1 on: October 30, 2005, 11:18:44 AM »
Quote
I don't use pond mode ...
just nontorodial ...
Then I don't get it. Have you tried my safe settings file? I don't use torodial either. Now I've been running a simulation for 12 hours with no crash, nontorodial and no pond mode. Boyancy on. Field size is width 32000 and height 24000. Max veggies set to 300, but I only have around 10-30 veggies on the screen. The bots are very quick to eat them. Maybe that's why it hasn't crashed, because there are so few veggies.
The internet is corrupt and controlled by criminally minded people.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Large fields bugs
« Reply #2 on: November 15, 2005, 11:21:01 AM »
There are a number of issues with large field sizes.

One of which is that the bot's internal X,Y,Depth readbacks get screwed when you run a sim with a width or depth greater than 32,000.

One fix is to change ALL variables in the program to "longs".

This is on my to-do list but will have to wait till the next round of fixes.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Large fields bugs
« Reply #3 on: November 15, 2005, 11:41:55 AM »
I strongly disagree with changing the robot memory array to longs.  For reasons that aren't immediatly apparent to me at the moment...

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Large fields bugs
« Reply #4 on: November 15, 2005, 11:58:52 AM »
Yeah I never did figure out what your problem with that was.

Seems to me that it will give many many benefits and absolutely no problems.
  • VB runs faster with 32 bit variables.
  • All the overflow crashes will disappear.
  • X,Y and depth will work for all sim sizes. Means that ant-bots can run in larger sims.
I do not propose to allow the use of larger numbers as it would be rather silly to have bots wandering around with millions of energy and/or body points. They will still be limited to 32000 (or possibly rounded to 40,000 or 50,000)

I don't see what other issues there are with this proposed change.

Please let me know your specific objections as soon as you can figure out exactly what they are.  :P
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Large fields bugs
« Reply #5 on: November 15, 2005, 12:05:17 PM »
I think it was something along the lines of "bots have a hard time as it is hitting the broad side of a barn (metaphorically speaking with finding the right values for certain actions)."

Specifically things like shots requiring a value of -1, and it being even more difficult for bots to find the right value if they have billions of numbers to pick from.

Not sure I have those same concerns anymore now that I think about it.

What I would do, my first impulse, would be to restructure the sysvars, cut off half the robots' memory locations ie: 1..500 and make those locations longs.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Large fields bugs
« Reply #6 on: November 15, 2005, 12:12:18 PM »
So you are worried that memory locations would have values that are too large?

Well the present program has a bunch of limits on it to fix them all to a max of 32000 anyway. I don't propose to change that really, particularly on the ones where commands are being accessed and controlled.
Actually, most of those have even smaller limits already applied to them. For instance, I don't think it is possible to evolve a line of DNA code that would put a value of greater than 32000 into anything. Those limits already exist so making the memory locations into longs wouldn't change anything.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Large fields bugs
« Reply #7 on: November 15, 2005, 12:16:37 PM »
So just have the 32000 limit still in place but use longs as the underlying data type?

Seems sorta a waste.  I mean, 32000 isn't a magic number.  I had reservations at first, but I think pumping up the allowed values into longs would be really cool.  What would a veggy with a million body points even look like :P

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Large fields bugs
« Reply #8 on: November 15, 2005, 12:48:07 PM »
We would save a heck of a lot of code if we could take out all the lines that ask whether a value is greater than 32000 and then apply a limit to it.

Might speed the program up a bit.

I should imagine that a 1,000,000 body veggie would mostly fill the screen. :lol:
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Large fields bugs
« Reply #9 on: November 15, 2005, 12:49:11 PM »
It might be more realistic to bump the limits up to 100,000 or something rather than to allow absolute free reign.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Large fields bugs
« Reply #10 on: November 15, 2005, 12:59:24 PM »
We'd need to really play with this I think.  The thing is, radius increases with the cube root of volume, so a million body points would be...

a bot with a radius of 600 (compared to a bot of 1000 body points with a radius of 60).

Large, but not inordintaley so.

A billion body points would be...

6000 radius.  That would be as long across as 100 bots with 1000 body.

Big, but not terribly big considering the sheer number of body points it would have.  I mean a billion?  Holy cow.

And bigger bots would have a problem seeing, because presently the eye is assumed to be seeing from the center of the bot.  Anything bigger than 12 robot lengths wouldn't be able to see I don't think.