Bugs and Feature Requests for PlanetsCentral and other VGAP software

[Posting] core regeneration bug?
Thread opener
Posted Mon, 2013-02-25 21:19 GMT, edited Mon, 2013-02-25 21:20 GMT

i have noticed that the planet core regeneration rate is lower than THost. what is the PHost formula?

the THost formula is CoreRegenAmount = CEILING(RegenRate*(mining rate/100)), thus a mining rate of 21 with a [THost] default core regeneration rate of 5 percent gives a core regeneration of 2.

GhostWriter

[Posting] Re: core regeneration bug?
Posted Tue, 2013-02-26 09:26 GMT

i have noticed that the planet core regeneration rate is lower than THost. what is the PHost formula?

the THost formula is CoreRegenAmount = CEILING(RegenRate*(mining rate/100)), thus a mining rate of 21 with a [THost] default core regeneration rate of 5 percent gives a core regeneration of 2.

GhostWriter

PHost is almost the same, but it uses a flavour of ROUND instead of CEILING. So yes, it is a bit lower.

From the docs:

New_minerals_in_core = Trunc((TransuraniumDecayRate * Mineral_density + 50) / 100)

Or more readable

trunc(TDR*M_d/100 + 0.5)

[Posting] Re: core regeneration bug?
Posted Tue, 2013-02-26 17:15 GMT

i have noticed that the planet core regeneration rate is lower than THost. what is the PHost formula?

the THost formula is CoreRegenAmount = CEILING(RegenRate*(mining rate/100)), thus a mining rate of 21 with a [THost] default core regeneration rate of 5 percent gives a core regeneration of 2.

For what THost version is your formula?

The formula I know is ERND(RegenRate*Density/100), where ERND is the "round to nearest integer, .5 rounds up or down to next even number" function. PHost's formula is ROUND(RegenRate*Density/100), which is always the same or more (.5 always rounds up).

--Stefan

[Posting] Re: core regeneration bug?
Thread opener
Posted Fri, 2013-03-01 08:34 GMT

mr_x: ...trunc(TDR*M_d/100 + 0.5)

the difference between that and the standard round (to even number) is that the above always rounds x.5 UP...

so, no real (meaningful) change.

[Posting] Re: core regeneration bug?
Thread opener
Posted Fri, 2013-03-01 08:39 GMT

streu: For what THost version is your formula?

i have been playing THost since April 1995, and have never noticed anything different than the formula i posted above.

granted i have not played THost 3.22.047 since 2000...

[Posting] Re: core regeneration bug?
Posted Fri, 2013-03-01 12:41 GMT

streu: For what THost version is your formula?

i have been playing THost since April 1995, and have never noticed anything different than the formula i posted above.

granted i have not played THost 3.22.047 since 2000...

All .047 did was add an extra Loki Decloak.

[Posting] Re: core regeneration bug?
Posted Fri, 2013-03-01 12:44 GMT

streu: For what THost version is your formula?

i have been playing THost since April 1995, and have never noticed anything different than the formula i posted above.

granted i have not played THost 3.22.047 since 2000...

All .047 did was add an extra Loki Decloak, but that should have been on the Host side. Never did find out what changed the client side.

[Posting] Re: core regeneration bug?
Thread opener
Posted Thu, 2013-03-28 06:37 GMT, edited Thu, 2013-03-28 06:41 GMT

i have noticed that the planet core regeneration rate is lower than THost. what is the PHost formula?

the THost formula is CoreRegenAmount = CEILING(RegenRate*(mining rate/100)), thus a mining rate of 21 with a [THost] default core regeneration rate of 5 percent gives a core regeneration of 2.

For what THost version is your formula?

The formula I know is ERND(RegenRate*Density/100), where ERND is the "round to nearest integer, .5 rounds up or down to next even number" function. PHost's formula is ROUND(RegenRate*Density/100), which is always the same or more (.5 always rounds up).

--Stefan

i recently checked the time-stamp on the THosts in question. specifically, in my last public THost game (start ~April 2000,) the argument that i remember as the .046/.047 change in the max movement rate, (from what i have seen in the last few months,) was probably, in fact, the .026/.027 movement rate change argument. this make sense? if that is the case, and i am convinced that is what happened, then the THost mining rate that i remember is from 3.22.026 (?), or before.

that being said, the latest THost that i have probably played under was 3.22.027, and only one game of that, in 2000 (StarJammer.)

hmmm. one more thing. that StarJammer game was the only public game i played under 3.22.000 or above, the history of which i have given you, Stefan. note that private games are not included in the above discussion.

that said, which THost change altered from the mid-90's formula (CEILING) to the lower formula that you have?

[Posting] Re: core regeneration bug?
Posted Thu, 2013-03-28 09:42 GMT

i have noticed that the planet core regeneration rate is lower than THost. what is the PHost formula?

the THost formula is CoreRegenAmount = CEILING(RegenRate*(mining rate/100)), thus a mining rate of 21 with a [THost] default core regeneration rate of 5 percent gives a core regeneration of 2.

For what THost version is your formula?

The formula I know is ERND(RegenRate*Density/100), where ERND is the "round to nearest integer, .5 rounds up or down to next even number" function. PHost's formula is ROUND(RegenRate*Density/100), which is always the same or more (.5 always rounds up).

--Stefan

i recently checked the time-stamp on the THosts in question. specifically, in my last public THost game (start ~April 2000,) the argument that i remember as the .046/.047 change in the max movement rate, (from what i have seen in the last few months,) was probably, in fact, the .026/.027 movement rate change argument. this make sense? if that is the case, and i am convinced that is what happened, then the THost mining rate that i remember is from 3.22.026 (?), or before.

that being said, the latest THost that i have probably played under was 3.22.027, and only one game of that, in 2000 (StarJammer.)

hmmm. one more thing. that StarJammer game was the only public game i played under 3.22.000 or above, the history of which i have given you, Stefan. note that private games are not included in the above discussion.

that said, which THost change altered from the mid-90's formula (CEILING) to the lower formula that you have?

The only change that Tim make in .047 was to add a third decloak to eliminate an exploit that a Privateer and myself used when crossing the map seam in THost.

[Posting] Re: core regeneration bug?
Thread opener
Posted Thu, 2013-03-28 12:57 GMT, edited Thu, 2013-03-28 13:19 GMT

GhostWriter: i have noticed that the planet core regeneration rate is lower than THost. what is the PHost formula?

the THost formula is CoreRegenAmount = CEILING(RegenRate*(mining rate/100)), thus a mining rate of 21 with a [THost] default core regeneration rate of 5 percent gives a core regeneration of 2.

streu: For what THost version is your formula?

The formula I know is ERND(RegenRate*Density/100), where ERND is the "round to nearest integer, .5 rounds up or down to next even number" function. PHost's formula is ROUND(RegenRate*Density/100), which is always the same or more (.5 always rounds up).

--Stefan

GhostWriter: i recently checked the time-stamp on the THosts in question. specifically, in my last public THost game (start ~April 2000,) the argument that i remember as the .046/.047 change in the max movement rate, (from what i have seen in the last few months,) was probably, in fact, the .026/.027 movement rate change argument. this make sense? if that is the case, and i am convinced that is what happened, then the THost mining rate that i remember is from 3.22.026 (?), or before.

...

that said, which THost change altered from the mid-90's formula (CEILING) to the lower formula that you have?

cherek: The only change that Tim make in .047 was to add a third decloak to eliminate an exploit that a Privateer and myself used when crossing the map seam in THost.

GhostWriter response: the question that i am seeking the answer to is:

what THost (fix?) changed the planet regen rate from the CEILING that i remember in the mid/late 90s to the "ERnd" that Stefan found and modified for PHost?

[Posting] Re: core regeneration bug?
Posted Thu, 2013-03-28 20:27 GMT

that said, which THost change altered from the mid-90's formula (CEILING) to the lower formula that you have?

To answer this question once and for all, I ran a few simulations.

Setup: make a universe with 100 planets, each of which has no Tritanium, and a density of 1 .. 100. Run host, look how much they have now.

Result in a nutshell: all HOST versions I tried behave the same (3.11a from 1993, 3.21 from 1995, 3.22.024 from 1998, 3.22.046 from 2002). PHost behaves largely the same, but occasionally generates one kiloton more than HOST.

Here's the table for Trans-Uranium rate 5% (default), runs of equal values omitted, differences highlighted (which are precisely the points where ROUND and ERND differ):

  Rate HOST PHost
   1     0     0
   2     0     0
   ...
   9     0     0
  10     0     1   <---
  11     1     1
   ...
  29     1     1
  30     2     2
   ...
  49     2     2
  50     2     3   <---
  51     3     3
   ...
  69     3     3
  70     4     4
   ...
  89     4     4
  90     4     5   <---
  91     5     5
   ...
  99     5     5
 100     5     5

A formula using CEIL would be rather unusual in HOST. The BASIC dialect HOST is written in has no CEIL function. It has a function called INT (which is often referred to as TRUNC), and it has implicit rounding when assigning fractional values to integer variables (which I refer to as ERND). INT can be used to build a ROUND.

Interesting difference between HOST and PHost observed during the simulation: HOST does trans-uranium decay only on owned planets.

--Stefan

[Posting] Re: core regeneration bug?
Posted Fri, 2013-03-29 11:55 GMT

cherek: The only change that Tim make in .047 was to add a third decloak to eliminate an exploit that a Privateer and myself used when crossing the map seam in THost.

GhostWriter response: the question that i am seeking the answer to is:

what THost (fix?) changed the planet regen rate from the CEILING that i remember in the mid/late 90s to the "ERnd" that Stefan found and modified for PHost?

I know, but I was clarifying that it must have been .046 and not .047, that is all. Host 3.22.047 was created on March 4,2003.

[Posting] Re: core regeneration bug?
Thread opener
Posted Wed, 2017-12-20 04:21 GMT

streu:

that said, which THost change altered from the mid-90's formula (CEILING) to the lower formula that you have?

To answer this question once and for all, I ran a few simulations.

streu: Here's the table for Trans-Uranium rate 5% (default), runs of equal values omitted, differences highlighted (which are precisely the points where ROUND and ERND differ):

<please see table, above>

streu: A formula using CEIL would be rather unusual in HOST. The BASIC dialect HOST is written in has no CEIL function. It has a function called INT (which is often referred to as TRUNC), and it has implicit rounding when assigning fractional values to integer variables (which I refer to as ERND). INT can be used to build a ROUND.

INT refers to INTeger, which functions very similarly to a TRUNC.

streu: Interesting difference between HOST and PHost observed during the simulation: HOST does trans-uranium decay only on owned planets.

that is interesting.

many thanks, streu, for the effort you put into your reply.

As a perfectionist, this is how I remember these things; therefore, I have no explanation for the differences.

GhostWriter

This is a testing version.
It may be incomplete, and have more bugs (or features) than the public live version at planetscentral.com.