Page 2 of 3
Re: Alpha Testing: Phase 2
Posted: Wed Sep 30, 2009 2:34 pm
by Spectrum
Willis wrote:Spectrum wrote:Code: Select all
OreStock += Miners * 30 * MetalRating * time;
MaxOreProcessed = 40 * time;
OreStock -= MaxOreProcessed;
if (OreStock < 0) OreStock = 0;
I've gone over this snipet of code a few times now, and I can't even begin to point out the many flaws I am seeing in your logic. Ranging from Free Metal from using Ore you don't have to Metal Stock (assumed) being increased incorrectly, to potential 100x overproduction depending on how you store MetalRating. And None of your code, at least in that point acknowledges your mining capacity, and if it does at any point later, it's already using potentially incorrect numbers.
I'd say you're relying TOO much on magic.
Serously, no magic that was a joke...
??? metal rating is stored at a double 0 - 1.
it was missing the cap you are correct.
MaxOreProcessed = 40 * RefiCap * time.
Re: Alpha Testing: Phase 2
Posted: Wed Sep 30, 2009 2:42 pm
by Cossid
There are still other issues, like not properly increasing Metal stock (at the end of your code block, you don't have a valid stored figure for _actual_, just max), and your code also, because of this allows refining ore you don't have (if < 0) = 0 is a bad hack. OreStock -= Min(OreStock, MaxOreProcessed); would be a better alternative, but still has the actual vs max issue.
Re: Alpha Testing: Phase 2
Posted: Wed Sep 30, 2009 2:45 pm
by Spectrum
Willis wrote:There are still other issues, like not properly increasing Metal stock (at the end of your code block, you don't have a valid stored figure for _actual_, just max), and your code also, because of this allows refining ore you don't have (if < 0) = 0 is a bad hack. OreStock -= Min(OreStock, MaxOreProcessed); would be a better alternative, but still has the actual vs max issue.
hack?
Your kidding right?
Re: Alpha Testing: Phase 2
Posted: Wed Sep 30, 2009 2:46 pm
by Cossid
Not at all. You're allowing it to go negative, and then just changing it to 0 when done. This means more metal is being created than you have ore for.
Re: Alpha Testing: Phase 2
Posted: Wed Sep 30, 2009 2:50 pm
by Spectrum
Lets back up a minute, the issue is how is metal stock handled - not how much metal is produced.
I was explaining how the refineries and stockpiles work - that is the issue.
handeling the actual metal is a different issue I figured you knew how to do that.
Re: Alpha Testing: Phase 2
Posted: Wed Sep 30, 2009 2:56 pm
by Cossid
Yes, I do know how to handle metal. I was just pointing out that what you posted cannot reliably refine ore or accurately adjust your metal stock.
Re: Alpha Testing: Phase 2
Posted: Wed Sep 30, 2009 3:00 pm
by Spectrum
Willis wrote:Yes, I do know how to handle metal. I was just pointing out that what you posted cannot reliably refine ore or accurately adjust your metal stock.
Must be something in VB because in c/c++/C# it is 100% reliable, accurate and FAST to do an if test than call a function such as Min.
I was adjusting Metal ORE not metal they are different.
Re: Alpha Testing: Phase 2
Posted: Wed Sep 30, 2009 3:05 pm
by Cossid
Yes, I understand you're adjusting Ore, and yes, the if statement is faster than the Min statement. But the if statement isn't the problem, by then, it's already wrong.
Re: Alpha Testing: Phase 2
Posted: Wed Sep 30, 2009 3:12 pm
by Spectrum
Do what you want - I was just trying to help and did not want to get into an argument about simple programing techniques.
Your original understanding of the manual was wrong - Refi cap is Fully automated as stated in the manual. Feel free to modify it as you want.
It is your game now.
Re: Alpha Testing: Phase 2
Posted: Wed Sep 30, 2009 3:46 pm
by Spectrum
one last post.. from the version notes:
Code: Select all
Mining works as follows:
A miner will produce 40 times the metal value of the planet in
a year. The old value was 10.
The refinery will refine 40 units of ore per year per refining
unit installed, producing 40 units of metal. The old value was
10.
Thus, on a 0.5 metal planet, a mining job with adequate
refining capacity will produce 20 units of metal per year, the
same as a service sector job. Since the cost of creating new
refining capacity is the same a creating new service jobs, on
high metal planets mining will be more advantageous than
service sector. Of course, the standard of living is still
lower for miners.
The ore stockpile setting does *not* affect refining, all
available ore will be refined, any left over will be sold up to
the stockpile value.
This clearly demonstrates the difference between a mining job and the capacity.
There was a revision that set the amount mined from 40 to 30 but I dont see it right now, but it may have been an undocumented revision but at the time 30 was the correct value on CIS - I have revised the value in MW3TR to something else I dont remember and I dont have time to look.
Re: Alpha Testing: Phase 2
Posted: Thu Oct 01, 2009 3:23 am
by beaker
And all of this simply because i thought the excess stocks of ore would disappear... tsk tsk

Re: Alpha Testing: Phase 2
Posted: Thu Oct 01, 2009 11:04 am
by Spectrum
I know <sigh>
lets all kill beaker!
Re: Alpha Testing: Phase 2
Posted: Thu Oct 01, 2009 1:09 pm
by beaker
I'm pretty sure that's already been done

Re: Alpha Testing: Phase 2
Posted: Fri Oct 02, 2009 12:21 pm
by Cossid
Spectrum wrote:lets all kill beaker!
That's like shooting dead fish in a barrel.
Anyway, I've spent various free time researching how different methods work, and what numbers are correct.
I've come to the following conclusions:
I certainly mis-understood certain aspects of refining. Refining isn't people, it is machines, and while it's capacity is associated with people, it's function is not.
Therefore, refining rate would have to be a constant, which is that of the best efficiency on a 100% metal planet.
This all means that ore can eventually be refined (I did always think it was odd that my understanding didn't allow that).
Which brings me to the final issue: what number to use?
MW3 manual states 40% (0.4*), Spectrum claims 30% was used in CIS MW3.
My finding is that SE was certainly different. To the best of my calculations, SE was coming out at 53-58%. Of course, I know my calculations have a margin of error that forces them to be on the highest possible end of possible values. This is caused by taking values at a static time when there is snowball-like build up to get to those numbers. On the intentional 'low' end I was around 44% which puts an unweighted median at 51, but mathmatically that number would also be just slightly high.
So the deduction I came to was that SE was 50%
This means 50% metal planets is where Services became the better alternative to mining as well, which does in fact match at statement from Pitchonomics:
Pitchonomics wrote:Planets with Metal Ratings of less than 50% require a different style of PM in order for the planet to be successful. I suggest that if you wish to establish low metal planets that you experiment with the PM discussed under Low Metals PM]
I was previously using 40% but will likely be changing to 50% in my next update, but I haven't decided when to apply this just yet.
Re: Alpha Testing: Phase 2
Posted: Wed Oct 07, 2009 11:24 pm
by Cossid
Live server has been updated to 50% (you should now be getting more metal for the same installed percentages).
Please let me know how this feels, I'll be monitoring it.