Author Topic: Energy bug RESOLVED 2.43.1k  (Read 3864 times)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Energy bug RESOLVED 2.43.1k
« on: May 06, 2008, 12:18:15 PM »
Sim was OK until I saved it. Re-started this morning - the sun is down, but the energy keeps coming in, way above the limits I have in energy management options.
« Last Edit: May 07, 2008, 01:26:40 PM by EricL »
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Energy bug RESOLVED 2.43.1k
« Reply #1 on: May 06, 2008, 12:29:49 PM »
OK, one part of the problem was that the cost multiplier became reset to 0 for some reason. Still, it should not lead to increase in energy when sun is down...
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Energy bug RESOLVED 2.43.1k
« Reply #2 on: May 07, 2008, 11:22:21 AM »
bump

I still see this happening. In fact, I can set the feeding veggies amount to 0 and the number of bots and their energy still continues to increase. This is a serious free energy bug.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Energy bug RESOLVED 2.43.1k
« Reply #3 on: May 07, 2008, 11:25:52 AM »
on it...
Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Energy bug RESOLVED 2.43.1k
« Reply #4 on: May 07, 2008, 12:09:47 PM »
I'm still working on this, but I don't think it's a bug and I don;t think it's related to tripping through a sim file.  I think it is a design issue.

The sun is not on.  I have verified this.  Your bots arn't receiving nrg from the sun, they are making it themselves by shooting each other with waste shots.

All your bots are veggies, which means all of them can convert waste to nrg at a pretty effecient rate (.waste/2).  I haven't tracked down how the waste is being produced, but it wouldn't surprise me if we have a magic nrg creation cycle somewhere where given your costs, bots can produce waste, shoot it and make themsleves nrg without the sun being out.  In short, you've evolved mushrooms.

I'll keep on it and find where that waste is coming from.  It's quite possible we have a waste leak bug somewhere such as shooting waste not using it or similar (although I've verfied that isn't it).  Stay tuned.
Many beers....

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Energy bug RESOLVED 2.43.1k
« Reply #5 on: May 07, 2008, 12:13:48 PM »
Mmm, shrooommmms.....
 

I'll be (sali)waiting.
« Last Edit: May 07, 2008, 12:14:10 PM by shvarz »
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Energy bug RESOLVED 2.43.1k
« Reply #6 on: May 07, 2008, 01:26:03 PM »
Okay, found and fixed a couple of small waste leaks in waste shot creation having to do with implicit single-> int rounding.

But the big culprit was the routine which gave veggies extra nrg from their waste level.  It was increasing their nrg by .waste/2 but only decreasing their waste level by the same .waste/2 instead of using up all the waste as it should.  This allowed veggies to extract nrg from the same (albeit decreasing amount of) waste cycle after cycle and never zeroed out the waste properly, which is where the rounding errors started to matter.

There still may be a few more of these.  Waste is produced in a lot of places as a side effect of various things and is usually thought of as a form of accumulated entrophy, not nrg, so I don't think anyone has ever really botherred to do a hard walk through to make sure that waste->nrg conversion by veggies is a zero sum game (with losses).  I certainly haven't.   But its a lot better now.  You sim is losing nrg with zero costs over the course of cycles without the sun out now, as it should and with the feed veggy routine now properly zeroing out waste for veggies after feeding them that nrg each cycle, the accumulated effects of rounding issues when there are tiny amounts of waste should now no longer be an issue.

Note however that there will stll be cycles where the sim nrg will appear to increase from one cycle to the next.  This is because the routine that calculates total sim nrg does not consider waste, either in shots in transit or resident in veggies or other bots, as a form of nrg.  Waste is not considerred when calculating the total sim nrg.  That code only takes into consideration nrg, body and nrg and body shots in transit.

Fixed in 2.43.1k.
Many beers....

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Energy bug RESOLVED 2.43.1k
« Reply #7 on: May 07, 2008, 01:56:34 PM »
Woo-hooo!  I'm finally going to have reasonable sim speed again!

By the way, I find the whole "waste" concept somewhat bogus.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Energy bug RESOLVED 2.43.1k
« Reply #8 on: May 07, 2008, 02:31:01 PM »
Quote from: shvarz
By the way, I find the whole "waste" concept somewhat bogus.
Don't ask me, I just work here.
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Energy bug RESOLVED 2.43.1k
« Reply #9 on: May 07, 2008, 03:58:51 PM »
Waste predates me as well.  I think it was PY's doing.