LordSuch wrote:jlehtone,
Have you actually validated your formula under X2 or X3? I validated mine under X2 but have only had a very brief check in X3 and the values looked pretty much the same - also the game files seem to back this up.
I dare to disagree.
I have shown X3 in-game values that I did look up myself
here. Since we are now mainly talking about the Silicon, I repeat that table:
Code: Select all
Silicon mine L:
Yield/Time/Products
0 40:01 5 *
5 6:41 5
6 5:43 5
13 2:52 5
21 1:50 5
26 1:29 5
31 1:16 5 *
64 1:14 10
* Observations by others, the yield 0 is a case, where the Silicon mine was erroneously built on an Ore asteroid.
I fully agree with you that both multipliers (mine_size and never-under-60s) are mere obfuscation that can mostly be ignored. In the above table, only yield 64 has multiplier 2 and the raw prod_time is 37s.
I just checked my X2 game, and the cycle times are exactly the same there too. I did saw a version of my equation initially in some ancient thread for X2, and have verified it along my X2 game. At least every single case have fitted exactly.
LordSuch wrote:On the
Sector Planner FAQ there is a formula for converting cycle time (prod_time) to yield which is:
Where prod_time is the time taken to produce one silicon wafer.
This certainly held true in X2 and therefore there was no diminishing returns from larger yields. Also it means that a 25 yield mine will feed exactly 1 factory.
Now allow me to show the table from above again, but this time with raw times in seconds and with prod_time from your equation. I'll even add couple datapoints from my X2 Silicon mines that I just looked up.
Code: Select all
Yield Cycle prod_time
0 2401 Inf
5 401 480
6 343 400
9 241 266,67
12 185 200
13 172 184,62
17 134 141,18
21 110 114,29
26 89 92,31
31 76 77,42
45 53 53,33
64 37 37,5
You have validated your data. I have validated my data. Does Egosoft have a random number generator?
LordSuch wrote:My concern about your formula is there seems to be a number of +1's that seem to have no logical reason. For instance when coding you would normally guard against a divide by zero rather than arbitrarily adding 1 which effects the calculation, particularly at the limits. i.e. adding 1 to a yield 2 asteroid is adding 50% to its yield.
Yes, there are two. First is adding to the yield, and the other is just one annoying second more. The odd thing is, which I did realize only recently, that with my equation, Ore mine yield 25 has cycle time to exactly match one factory. The logic for both is beyond me.
LordSuch wrote:
If we take your formula (set up for silicon)
Code: Select all
BASETIME = 2400
Basic_cycletime = rounddown( BASETIME / (Yield + 1) ) + 1 seconds
If we think about this as if we're writing code so we guard against divide by zero without adding a factor
Code: Select all
BASETIME = 2400
if (Yield > 0)
{
Basic_cycletime = rounddown( BASETIME / Yield ) + 1
}
else
{
Basic_cycletime = -1 // -1 to signify that the cycle time is infinite
}
Guess what? If you ignore the rounding which may or may not be valid (but should be irrelevant anyway) we get:
Programming-wise, it is more efficient to compute than to test for conditions. I would assume that the yield is an unsigned integer, since we really do not need any other values than 0 and positives. Thus, the 0 is the only special case. There is no asteroid with yield 0. Except when you build a mine of wrong type on it. Then it apparently has yield 0. Now, how to show in the game that you have made a mistake. It would be nice, if they would simply deny building on wrong type. However, I could then fly around with a mine in my TL and test where I can build,
without scanning the roid first. The mine could have infinite cycle time, but that is a big number to put in there. The mine could just show "Disabled", put that too is a "special" number to place somewhere and requires a way to show it. What they obviously have chosen, is that every mine produces. Yield 0 produces only half of what yield 1 produces. 2 is 50% faster than 1 and 3 is 33% faster than 2. The effect is clear in low-yield roids. You can hardly see it on "normal" ones. 50-yield roid is still ~100% faster than 25-yield one, which is intuitive. The explanation for yield 0 producing is probably that every roid contains some traces of all minerals. This would explain the fisrt "1" in my equation.
Code: Select all
prod_time = int( 25.0*96/(yield+1) )+1
That can always be computed, and there is no reason to test the special condition, because its result has acceptable effect in the game and requires no special handling, ie extra code.
The extra second. Ore mines have obviously a different constant. Thus:
Code: Select all
prod_time = int( 25.0*24/(yield+1) )+1
Without that extra second, yield 24 would be the "fab equivalent". With the second, it is too slow. Yield 25 in there
Code: Select all
25.0*24/(25+1) = 23,08
int( 23,08 ) + 1 = 24
creates the illusion of "exact match". Thus, the "rounding" is not indifferent, but crucial for the logic and very simple in the code too.
The lack of exact match in the Silicon case - no yield matches "fab equivalent" - could be intentional. After all the 100% SPP is intentionally (I presume), "one second off" too.
My equation is not utterly complex. It does fit the observed data perfectly. All that I can do is to rest my case and let the jury do their work
If only the judges would not have NDA ...