Author Topic: 2.42.9 s>t bug  (Read 3373 times)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
2.42.9 s>t bug
« on: January 16, 2007, 03:08:47 PM »
Some recent change done when going from s to t version completely kills my current evo-sim.  Try loading this sim in these two different versions and you'll see the difference right away.

http://www.darwinbots.com/shvarz/01-15.rar

Edit: can't make the link work - just copy/paste the above into your browser, including the empty sapce between 15 and work

Edit 2: Name changed and sim RAR-ed to save traffic.  Thanks, Sportiel.
« Last Edit: January 16, 2007, 06:28:11 PM by shvarz »
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Sprotiel

  • Bot Destroyer
  • ***
  • Posts: 135
    • View Profile
2.42.9 s>t bug
« Reply #1 on: January 16, 2007, 06:19:42 PM »
Correct link is: http://www.darwinbots.com/shvarz/01-15%20work.sim

And could you please zip it? 12.3 Mb is a bit much...

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
2.42.9 s>t bug
« Reply #2 on: January 16, 2007, 07:45:36 PM »
I do not have winrar on my dev machine.  Can you please provide a winzip link?  Or zim and attach to this topic.  Thanks.
Many beers....

Offline Sprotiel

  • Bot Destroyer
  • ***
  • Posts: 135
    • View Profile
2.42.9 s>t bug
« Reply #3 on: January 16, 2007, 10:28:02 PM »
Quote from: shvarz
Some recent change done when going from s to t version completely kills my current evo-sim.  Try loading this sim in these two different versions and you'll see the difference right away.

Your problem lies obviously with rotational costs. I guess the unit chosen to express it is way out of range (it's labeled as energy per bang, but a bang is a unit of (linear) momentum, not of angular momentum).

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
2.42.9 s>t bug
« Reply #4 on: January 16, 2007, 10:49:44 PM »
A "bang" is supposed to represent an energy amount, like a Joule.  You could apply it to either the forces that allow a bot to swivel, or to the regular linear momentum changes.  But obviously their cost fields need to be seperate (though setting them equal would represent the most consistant physical settings, if/when rotational inertia is all set up.)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
2.42.9 s>t bug
« Reply #5 on: January 16, 2007, 11:30:25 PM »
Thanks, Sportiel!  I just checked and the problem was indeed with the new rotation costs.  Although they were not outrageous, they were still pretty high, leading to total death.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
2.42.9 s>t bug
« Reply #6 on: January 17, 2007, 01:04:10 AM »
FYI, in 2.42.9t, the rotational cost is acessed per radian of turn independent of mass and radius.  Thus if the cost was set to 3, a bot performing 628 .aimsx store would be charged 3 * pi units of nrg.  

At some point, we will want to move to a force based rotation paradym where mass and radius can be factored in.

Let me see if I can relate this.

For linear movement, f = m*a.  For a given linear movement cost c (specifed by the user) the bot is charged N nrg units where N = c*f = c*m*a.

Thus, if a bot of mass 20 applies an aceleration of 10 (vector sum of all 4 movement sysvars) it gets charged N = c * 20 * 10.  Note that bots only get charged for the acceleration actually applied I.e. a bot already at max velocity that trys to accelerate in the same direction it is alrady moving will not be charged anything.   Note also there is a max charge of 100 nrg per cycle for linear acceleration.

It would be similar for rotaional cost except that the current convention doesn't use forces, it uses absolute turn requests, which is totally broken.  I don;t think there is a sane way to include mass and radius using the durrent paradym, but I'm open to suggestions.

Once we do use forces, then we woud use the moment of interia I as Nums has pointed out in another thread.    f = I * a / r where I = 2/5 * m * r^2 (the 2/5 assumes bots are uniform denisty spheres).  For a given rotaional cost c', the bot is charged N' nrg units where N' = c' *f = c' * 2 / 5 * m * r * a.  Note that in this model, bots would keep their rotaional inertia in the same way they keep linear inertia, subject to friction, etc.
Many beers....