Thread Tools
Old May 8, 2001, 00:37   #61
Blake
lifer
PolyCast TeamCivilization IV: MultiplayerC4DG Gathering StormCivilization IV CreatorsApolyton UniversityApolytoners Hall of Fame
Beyond the Sword AI Programmer
 
Blake's Avatar
 
Local Time: 18:14
Local Date: October 31, 2010
Join Date: Oct 2000
Location: I am a Buddhist
Posts: 5,680
Fitz, not quite everything is summed up in the third post , anyway here is the REALLY important stuff. must-know stuff with practical applications.
  • By clean minerals I mean the maximum number of minerals you can produce in a base and still have 0 ecodamage.
  • Clean minerals are the same for all bases, with minor variations from terraforming ecodamage.
  • Everytime a fungal "pop" happens you can produce +1 clean minerals, this effect applies for all bases in faction. (You don't get the benefit from other factions pops)
  • Building a Tree Farm, Hyrbrid Forest, Centurai Preserve or Temple of Planet in any of your bases increases clean minerals by 1. Note, it is the process of building that increases the limit, if you gain a tree farm from a captured base you do not get an increase. It is safe to assume that when I say "tree farm" the same applies for HF, CP and ToP.
  • VERY IMPORTANT: You only get clean mineral benefit from building tree farm's AFTER the first pop, which conicides with the first ecodamage book of planet warning. If you do build TF's before the first pop you do not get a "refund" of any sort after the pop, effectivly from the point of view of clean minerals those treefarms never existed. If you pursue an extreme clean strategy you may be stuck with clean limit 16 for the entire game!
  • There is an additional factor or rounding error which means that with high clean minerals you actually get more clean minerals than the calculation suggests. This effect is quite small in comparison with total minerals, especially with low mineral production (ie < 50)
  • Ecodamage effects from terraforming should always be quite small, as a rule of thumb 1 borehole, 2 condensors, 8 farms roads or solar panels produce the same ecodamage as 1 mineral.
  • Forests have a negative ED effect, this cancels ED from boreholes and kin. If forest strongly outweighs damaging terraforming you can produce more clean minerals.
  • As a rule terraforming ED effects wont change clean minerals by more than 2. Unless you go REALLY excessive on early game condensors.
  • Rounding in the ED formula generally favours "clean"

Note: Ned, can you send me that file again? I was having trouble with the e-mail address I list on apolyton and couldn't receive for a week or so (in short, it ate incoming messages). Send file to
bmw40@student.canterbury.ac.nz

edit: guess it helps to spell my e-mail right.
[This message has been edited by Blake (edited May 08, 2001).]
Blake is offline  
Old May 8, 2001, 11:50   #62
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
Blake, For some strange reason, MY e-mail just went down. Try tonight.

Fitz, As far as I can tell, the Singularity Inductor has no effect on Clean Minerals. It may have an effect on the divisor of Net Minerals (Minerals - Clean Minerals).

Latest game: ED limit 99. 2 pops, 27 TFs, 26 HFs, 25 CPs. This, plus 16, totals to 96. We have 3 unexplained.

Blake, again, could it be researching Tech? We may have the same problem with Tech as we have with the facilities. One actually has to "research" the tech, not just "acquire" it by, for example, the SE.

Interesting comment that all this was "known." Really?

Ned
Ned is offline  
Old May 8, 2001, 22:36   #63
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
Fitz, No, Nanoreplicators do not add to Clean Minerals.

As to the formula, please some of my earlier posts. It can be greatly simplified by realizing that "terraforming" never exceeds Clean Minerals. The formula, generally is

ED = ((Minerals - Clean Minerals - Terraforming)/(1+GoodFAC))+5*MA)* X

I have not verified that "Terraforming" can be negative in the early game before HFs, however I have see some bases with ED limits of 17 before any pops or other Clean Mineral Facilities. This does suggest that a negative terraforming result essentially adds to the effective clean minerals of a base.

However, later, after HFs, terraforming is, in fact, a non factor and completely drops out of the equation. All bases that have HFs have the same ED limit which is set by "Minerals - Clean Minerals."

The simplificaton of the formula shows why I have a problem with the suggestion that there is a rounding error creaping in to the calculation of Clean Minerals. Its calcualtion is all addition or subtraction, which generally does not yield "rounding errors" unless the numbers being added themselves are not "round."

The way Clean Minerals adds, it is apparent that Clean Minerals us updated base-by-base between turns. This is why giving away or acquiring a base with a TF, etc,. does not reduce or add to Clean Minerals. It also explains why adding a TF via the SE may also have no effect.

What apparently is happening is set forth by the following formula:

New Clean Minerals = Old Clean Minerals + 1 (if a new pop) + 1 (if a TF, HF, CP or TP is built).

This is why I am still puzzled by the unexplained net increased after CPs are added.

Blake, my computer reports that it sent you the file. Did you get it?

Ned

Ned is offline  
Old May 9, 2001, 00:41   #64
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
Ned, that difference of 3 may be what Blake is trying to call a "rounding error". Have you confirmed Nanoreplicators as adding to the clean minerals limit yet?

Blake, I think most of that is in the third post on this page, with the exception of the first pop rule, which is very important.

Can the Terraforming factor become negative then, if you have enough forests? I would think no, since the damage prevention function ("clean minerals") cancels down to zero, but there may be a bug in the code so that a negative value at step 4 is carried forward. Regardless, I feel terraforming damage to be very important. I usually cannot get more than 11-12 clean minerals in the early game. That implies 3-4 points of terraforming to be negated by damage prevention. That 3-4 can be critical at times

Also, tell me if this looks right as a function:

1) (Terraforming - damage prevention)+[(minerals - damage prevention remainder)+5*Atrocities]/(1+goodfacs)

Terraforming = steps 1-4.
damage prevention = step 5 (with Blakes new addition that one pop must occur).
minerals = total dirty minerals
damage prevention remainer = value remaining from damage prevention after reducing terraforming to 0.
Atrocities = Major atrocities.
goodfacs = step 8.

The key point being that each bracket function cannot be less than 0. Unfortunately, you cannot remove the damage prevention function and use it as a single subtraction, because the remainder is divided by (1+goodfacs).

I messed up my post at the top of this page. Blake, you can add the atrocity part to the minerals prior to division by goodfacs, but can you prove that terraforming is divided by goodfacs. If not, then you cannot reverse steps 8 & 9 of the original eguation.

Alternate variations:

Terraforming divided by goodfacs (ie original step 8 & 9 reversed):
2) [(Terraforming + minerals - damage prevention)+5*Atrocities]/(1+goodfacs)

Terraforming not divided by goodfacs, but atrocities are (identical to 1.):
3) (Terraforming - damage prevention)+[(minerals - damage prevention remainder)+5*Atrocities]/(1+goodfacs)

original equation (with modified damage reduction & goodfacs inside):
4) (Terraforming - damage prevention)+(minerals - damage prevention remainder)/(1+goodfacs)+5*Atrocities
[This message has been edited by Fitz (edited May 08, 2001).]
Fitz is offline  
Old May 9, 2001, 01:28   #65
Blake
lifer
PolyCast TeamCivilization IV: MultiplayerC4DG Gathering StormCivilization IV CreatorsApolyton UniversityApolytoners Hall of Fame
Beyond the Sword AI Programmer
 
Blake's Avatar
 
Local Time: 18:14
Local Date: October 31, 2010
Join Date: Oct 2000
Location: I am a Buddhist
Posts: 5,680
I HAVE verified that you get negative ecodamage from having heaps of forest, this negative ecodamage is halved (or eliminated) by treefarms. This is very easy to test. Place a base. Paint forest around it. Check clean minerals.

The rounding error is quite hard to explain, and I havn't tried. But do this, find a base with huge mineral production, which is producing ecodamage, then change the mineral production in increments of 1 (nothin bigger) what you hopefully notice is that the ecodamage stays exactly the same for a run of several different values of minerals produced. This could not possibly be a conclusion from the ecodamage formula. My point is not how clean minerals are determined but how it calculates the ecodamage in general. Understand this, the # of minerals you can get with 0 ecodamage is NOT THE SAME AS #POPS + #TF's, the error probably comes about in the final line, where you get quite a lot of modifiers. Using an accurate calculation (ie real numbers) you would get a few ecodamage, but this is ROUNDED DOWN to 0. So it's a small ecodamage getting rounded to 0, rather than the clean mineral limit itself being rounded.

Hopefully this explains what I was trying to say. It may not be the whole answer either, and I could be totally barking up the wrong tree. However, small ecodamages getting rounded to zero explains why you do always get atleast the calculated clean mineral limit.
Blake is offline  
Old May 9, 2001, 11:43   #66
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
Blake, "Incremeting by 1" is the hard part with each mineral multiplied by factors of 4 or more. But otherwise, I agree that a range of minerals should produce 0 ED. However, look at the file I sent you. The base ED level begins 28+ the calculated level. What you are saying is that 28 minerals results in less that 1 or .5 ED, depending on the rounding routine, which is then rounded to zero. Shouldn't the ED be easy to calculate in the game I sent you to check whether the result is in fact less than 1 or .5 so that rounding is a possible explanation? Ned
Ned is offline  
Old May 9, 2001, 13:20   #67
johndmuller
Alpha Centauri PBEMACDG Peace
King
 
johndmuller's Avatar
 
Local Time: 00:14
Local Date: October 31, 2010
Join Date: Feb 2001
Location: Capitol Hill, Colony of DC
Posts: 2,108
Ned, I take it that the extra ")" in your formula is one of the 2 in the "(1+GoodFac))" expression; that would bring you and Fitz more or less into agreement if you all agreed to either of the following:
a) that the subtractions for all the additional TFs, HF, CPs, etc were applied to the terraforming term after the 50%/100% reductions due to TFs/HFs and divide by 8 and this term could be carried forward as a negative number;
OR
b) that the subtactions for the HFs, TFs, CPs, etc take place in the minerals term.

I think that either formulation would be as true as possible to the original (flawed) version in the documentation and one could choose a) or b) depending on whether you considered the new elements to belong with terraforming or mineral production. BTW, thank you Fitz, for unswapping steps 8 and 9.

(version of Ned's formula with balanced parens)
ED = ((Minerals - Clean Minerals - Terraforming)/(1+GoodFAC)+5*MA)* X

As to the rounding or whatever problem, it sounds like Blake is getting on to something with that discrete step observation. Try this; if one or more of the multiplication/division operations is using Integer Mode Arithmatic it would, I believe have the effect of truncating the result (i.e. rounding everything down until the next whole number is reached), which would lead to a stepwise incrementing of the ED. In fact, just the ED variable itself being an integer variable could explain the behavior. If the ED seems to increase by steps > 1, then the integer effect might be happening where the damage is divided by (1+GoodFAC); that could cause ED increases in increments of "X" in your formula.

I gather you tried having CPs be worth more than TFs & HFs (like 1.5 times) in the subtraction part of your clean minerals calculation?

Regarding the negative ED question, I take it that is still uncertain. Did I read it right that one can produce "extra" mins if there is an especially clean base (like all forests), but that "extra" amount is reduced/eliminated by the TF/HF facilities? That in itself doesn't rule out the possibility that abundant TFs, HFs, CPs, etc. can result in a surplus of goodstuff that could offset atrocities; nor does it rule it in as there could be a zapping of negative numbers somewhere later in the formula.
johndmuller is offline  
Old May 9, 2001, 13:41   #68
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
johnd, I'm not even close to agree with neds formula, or your steps, without something to show me that it could be true. The fact still remains that a carefull reading of the (admittedly flawed) original equation shows that you do not divide the terraforming portion by goodfacs. Therefore you can't carry the number forward as a negative number, as the damage reduction factor is full value in one portion of the forumula, and divided by goodfacs in another part. Another way of structuring the original is:

[(1+goodfacs)(terraforming-damage reduction) + (minerals-damage reduction remainder)] / (1+goodfacs)

Notice I have to multiply the terraforming portion by 1+goodfacs to include it in the top of the equation.

Using algebra, this becomes:

[(1+goodfacs)*(terraforming) + minerals - (damage reduction)*(1+goodfacs) - damage reduction remainder] / (1+goodfacs)

Now, this makes irrelavant your point a). In no way does (1+goodfacs)*(damage reduction) + damage reduction remainder ever equal damage reduction + damage reduction remainder. Therefore, you must split the two terms in the equation. You can't just have one term called damage reduction.

Neds formula assumes that the terraforming is also getting divided by goodfacs. Believe me, I would love to see proof that it is, and certainly think it possible given firaxis' horrible documentation, but I am not particularly inclined to believe it until I hear (read, whatever) that it has been confirmed.

Just acting as a brake on wild theorizing here.
Fitz is offline  
Old May 9, 2001, 13:49   #69
johndmuller
Alpha Centauri PBEMACDG Peace
King
 
johndmuller's Avatar
 
Local Time: 00:14
Local Date: October 31, 2010
Join Date: Feb 2001
Location: Capitol Hill, Colony of DC
Posts: 2,108
Fitz, I believe you're right about the terraforming not being divided by the (1+GoodFacs) expression according to the original (flawed) formula; I hadn't seen your latest post when I posted my previous and I didn't want to kick that particular dead horse anymore anyway. However, as you said, that part of the formula may now be wrong too. In any case I don't think that Ned and Blake care that much about the first (terraforming) term as they seem to be dealing with the later stages of the game, assuming that the TFs & HFs are in place. Once you have at least a TF, the terraforming part of the ED is already getting divided by 16 before subtracting as much as 16 - that could cover at least 256 EDs (from just the one base) and that would take a serious effort of bad terreforming, I think. Of course, if some of the free 16 you get to subtract from the ED between both terms is used up in the terraforming term, that would mess up their numbers a little bit in the minerals term, perhaps enough to explain some of their anomalies.
johndmuller is offline  
Old May 9, 2001, 14:26   #70
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
I did some calculations and realized that this only becomes an issue if steps 1-4 (terraforming points) total 128 points, or to be accurate, (8*clean minerals).

Even with three worked boreholes & four worked condesors, terraforming only equals 56 points before /8.

Let me assume this, just to see if it's worth arguing about:
all worked:
3 boreholes
5 condensors/farms/soil enrichers (on flat)
4 mines (on rocky)
8 farm/solar collectors on rolling)
20 roads (roads everywhere)
total 42 minerals.
1 centauri preserve.

terraforming = (58*2+24+20)/8=160/8=20
(Thats four points over base 16 clean minerals)

step 10 = (20-16)+42/2 = 25
or step 10 = (20+42-16)/2 = 23

(2 point difference)*5transcend*techs*3(planet=0)*2life normal/300=
Techs/5 ecodamage difference.


So, in this rather extreme situation, we have a diference in the formula of Tech/5 points of eco-damage. I have no clue how many tech you need to get yourself to a pop 20 base, so I won't guess.

I say we just throw the terraforming part into the goodfacs, unless someone wants to set up exactly what I just described in the Scenario editor and see if the eco-damage is 2.5*techs (terraforming not /goodfacs) or 2.3*techs (terraforming is /goodfacs). Feel free to test it, but I can't for two weeks (computer down & going on vacation).

Blake, as for the negative terraforming factor, I would say with Ned's formula, there is no need for adjustment. If you use the original (flawed) formula, you just need to state in step five that unless steps 1-4 are negative, step 5 cannot be negative.

Johnd, it looks like I'm just formalizing exactly what you just said in your last post (and possibly the one before. Sorry.



[This message has been edited by Fitz (edited May 09, 2001).]
Fitz is offline  
Old May 9, 2001, 16:40   #71
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
Fitz and John, Opps! Terraforming should add, not subtract, in the simplified equation.

First, I agree with John that Terraforming will NEVER exceed Clean Minerals as a practical matter and therefore the calculation in the first part of the formula only operates to reduce Clean Minerals. The way I read step 5 is that if Terraforming is positive, but less than Clean Minerals, the result of Step 5 will always be zero and can be ignored.* What happens if Terraforming is Negative is unclear, but it may continue and "add" "negatively" to step 9.

The second part of the formula multiplies and divides Net Minerals, a term that denotes

Net Minerals = (Minerals - Orbital) - Net Clean Minerals.

Net Clean Minerals, in turn, is Clean Minerals - Terraforming (the so-called "remainder" from the first part of the formula). (The Datalinks is said to clamp this so that Net Clean Minerals cannot be less than zero.)

I.e., Net Minerals = Minerals - Orbital - Clean Minerals + Terraforming.

Positive Terraforming operates in the first part of the formula to reduce the number of Clean Mineral available for the second part of the formula. I assume that Negative Terraforming will similarly add to the number of Clean Minerals. Thus the addition of Terraforming in the second part of the equation makes sense.

The revised formula seems to be correct if Terraforming zero, or positive and less than Clean Minerals. What happens when Terraforming is negative, is another question. But just when one would expect Terraforming to completely drop out of the equation is when it seems to have a strong "negative" effect: It is only after HF's are built that we begin to see a noticeable offset between Clean Minerals and the ED limit - with Clean Minerals being effectively increased. This implies, perhaps, that "negative" Terraforming remains a factor.

Ned

* Note, that as the game goes on, Clean Mineral increases, thereby also increasing the amount of terraforming needed to exceed Clean Minerals.

[This message has been edited by Ned (edited May 09, 2001).]
Ned is offline  
Old May 9, 2001, 17:14   #72
johndmuller
Alpha Centauri PBEMACDG Peace
King
 
johndmuller's Avatar
 
Local Time: 00:14
Local Date: October 31, 2010
Join Date: Feb 2001
Location: Capitol Hill, Colony of DC
Posts: 2,108
Ned,

I think we are all more or less on board with your Clean Minerals model (assuming you fix the parens).

For the record, I think I favor Fitz variation 4) of the general formula, because it represents what I think is the least radical change in the formula - i.e. replacing "previous damage" in steps 5 and 7 with "# pops + factionwide total # TFs + HFs + CPs + TofPs". I don't have a quantitative reason, just an aesthetic one, so it wouldn't bother me if the adjustment were only in the mineral part of the formula.

Do we know if the pops are also faction wide?

Did you end up with any changes to the GoodFacs?

Are you satisfied with integer arithmatic truncation and rounding as reasons for your undotted i's and uncrossed t's?

All in all, this formula has a very interesting behavior; I wonder how much of it they had in their first draft and how much was tinkered into it. It looks like they ended up making it somewhat too easy in the endgame though.
johndmuller is offline  
Old May 9, 2001, 17:41   #73
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
Johnd, I actually prefer variation 2, because it is simpler. However, until I see something proving otherwise, I will continue to believe that variation 4 is technically correct, if not typically applicable. Variation 4 will only be needed if trying to calculate an exact number. Variation 2 also allows easy calculation of clean minerals.

2) [(Terraforming + minerals - damage reduction)+5*Atrocities]/(1+goodfacs)

if you set it = 0, you come out with minerals = damage reduction - terraforming - 5*Atrocities The term clean minerals assumes terraforming = 0 and Atrocities = 0, therefore minerals = damage reduction.

If you try to do this with variation 4 (original):

4) (Terraforming - damage reduction)+(minerals - damage reduction remainder)/(1+goodfacs)+5*Atrocities

minerals = [damage reduction + (damage reduction remainder)*(1+Goodfacs) - 5*Atrocities - Terraforming]/(1+Goodfacs)[/b]

Again, if we set terraforming to 0, and Atrocities to 0, we this time end up with Clean minerals = (damage reduction)*(1+Goodfacs)+damage reduction remainder. Since damage reduction = 0, and the remainder = damage reduction we again end up with Clean Minerals = damage reduction. But if you don't have TF/HF, it's a hell of a lot more complicated as soon as you add a single Goodfac. It also splits up the damage reduction into two related terms.

From all this, I draw the conclusion that the eco-damage formula is by far the most important in the early game, pre-HF/TF. Here is my reasoning:

1) HF/TF increase clean minerals dramatically, both by increasing to a huge degree the damage reduction, and by eliminating the Terraforming factor.
2) Terraforming only applies in the early game, prior to the intervention of TF/HF. It is important to be able to calculate how much damage reduction is being used up by terraforming.

Now, in my personal blind research games, I might have every square terraformed by the time I get tree farms, with size 14 bases. In other words, I run into a lot of eco-damage. This might influence my viewpoint regarding this formula.

Also, on the goodfacs, I did add +1 each for faction possessing the Singulatity inductor and the Pholtus Mutagen.
Fitz is offline  
Old May 9, 2001, 17:50   #74
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
I think I've just about exausted my contribution to this thread. I will work on putting both variations (with some terms that make sense, such as Clean minerals & damage reduction, including explanations) together into a new thread. I'll start with a formula and build a data links step by step to follow them up. I'll put variation 2 first, and ask markos to make it stick.

Things I need to have double checked:

1) What facilities, techs, and SPs add to damage reduction. Currently we have Tree Farm, Hybrid Forest, Centauri Preserve, Temple of Planet, all as a total built across the faction since the first pop.

2) What facilities, techs, and SPs add to Goodfacs. Currently we have Centauri Preserve, Temple of Planet, and Nanoreplicator in that base and Pholtus Mutagen and Singularity Inductor SPs possessed by the faction.

3) If we can, determine if Atrocities are divided by Goodfacs. Drop a PB.

4) If anyone cares to, determine if Terraforming is divided by Goodfacs. Try my experiment above in the Scenario Editor.

If I'm not around in today or tommorrow, I'll check in when I get back from Hawaii.
Fitz is offline  
Old May 9, 2001, 19:50   #75
Blake
lifer
PolyCast TeamCivilization IV: MultiplayerC4DG Gathering StormCivilization IV CreatorsApolyton UniversityApolytoners Hall of Fame
Beyond the Sword AI Programmer
 
Blake's Avatar
 
Local Time: 18:14
Local Date: October 31, 2010
Join Date: Oct 2000
Location: I am a Buddhist
Posts: 5,680
Okay, unlike everyone else here I decided to do some tests , I have conclusive proof that not many people can be bothered testing

I used a controlled test, and produced the following results.
  • Terraforming ED IS reduced by CP's, in exactly the same way as mineral ecodamage! My sincere apologies for spreading rumours to the contrary, but that's my evidence that no-one else tests these things
  • Atrocity ED is reduced by CP's
  • Each planetbuster is worth exactly 5 Minerals in terms of ED. (Ie, I got a base with 16 production, (clean limit) then I added 20 more minerals and noted ecodamage, then I bought ED back down to 16, and launched 4 PB's (sorry brother lal, but it was a noble sacrfice), the ED was exactly the same as the +20 minerals.
  • The figures for terraforming ED is indeed accurate, in a base with 14 boreholes and clean limit minerals produced the same ED as a base producing clean limit + 15 minerals. Remember boreholes are worth 9 ED not 8 14 * 9 / 8 = 15 (remember to truncate, rounding favours lower ED)
  • The presence of a CP in a base increases clean mineral limit in that base by 1 mineral. When the CP goes bye-bye so does the +1 mineral. Note this is seperate to the global effect (which still ofcourse applies).

If anyone is interested in my testing method I used bases surronded by rolling terrain with mineral resources (and 3 plain rolling tiles), thus I could produce high ED without needing.

Right on about integers whoever it was. What doesn't happen is the whole thing is calculated in reals then rounded as the last step. What really happens is all calculations are done using integer arithmitc. This can result in truly massive rounding errors. Especially when programmed by people not too hot on the mathematics of reducing errors. I'll try to do a more indepth analys of the errors later.

Now I've got to attend an exciting lecture on HCI. Gotta remember SMAC testing does not count as productive work now I've got to stop reading over my post and adding bold words and go to my lecture...
Blake is offline  
Old May 9, 2001, 21:19   #76
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
THANK YOU BLAKE!

Now I know that my formula version 2 is correct. I'm not sure I understood your fifth point, but I'll reread it.

Okay, so the official formula seems to be (using the term clean minerals):

{[(Terraforming + Minerals + 5*Atrocities - CleanMinerals)/(1+Goodfacs)] * Perihelion*Difficulty*Techs*(3-Planet)*Life}/300 = Eco-Damage

Where:

Terraforming = [(worked improvements)*2 + (unworked improvements) + (boreholes)*8 + (echelon mirrors)*6 + (condesors)*4 - Forests]/8
Can go negative. Improvements are Mines, Solar Collectors, Farms, Soil Enrichers, Roads, Mag Tubes, Condensers, Mirrors and Boreholes. Divide the final value by 2 if a Tree Farm is in this base, and reduce to zero if a Hybrid Forest is in this base. This value cannot be negative once a Tree Farm is present.

Minerals = Number of minerals produced this turn (but not from Orbit, but do include bonus minerals generated by multiplying Orbital minerals by a facility).
The easiest way of calculating this is to take total minerals and subtract orbital minerals. If you do this, the bonus minerals produced from orbital minerals by facilities are included in the total.

Atrocities = Major Atrocities??

CleanMinerals = 16 plus # of previous damages (fungus pops) plus # of Tree Farms, Hybrid Forests, Centauri Preserves, and Temples of Planet constructed in all bases since the very first fungus pop.

Goodfacs = 1 for each facility out of Centauri Preserve, Temple of Planet, Nanoreplicator contained in this base, plus 1 each for Pholtus Mutagen and Singularity Inductor Secret Projects if your faction possesses them.

Perihelion = 2 if Alpha Prime is at perihelion, or 1 if it is not.

Difficulty = Normally 3, but 5 on two highest two difficulty levels.

Technologies = Number of technologies discovered

Planet = Social Engineering PLANET value, to a maximum value of 2

Life = Native life level (1-3) from Custom Start

Truncate each calulation in turn, do not calculate and then truncate the final value.

I think that sums it up. Should I post that as a new thread and ask it to stick?

------------------
Fitz. (n.) Old English
1. Child born out of wedlock.
2. Bastard.
[This message has been edited by Fitz (edited May 10, 2001).]
Fitz is offline  
Old May 9, 2001, 21:35   #77
Blake
lifer
PolyCast TeamCivilization IV: MultiplayerC4DG Gathering StormCivilization IV CreatorsApolyton UniversityApolytoners Hall of Fame
Beyond the Sword AI Programmer
 
Blake's Avatar
 
Local Time: 18:14
Local Date: October 31, 2010
Join Date: Oct 2000
Location: I am a Buddhist
Posts: 5,680
I have a couple more points of interest.

Interested people should set up this test:
In the scenerio editor hit ctrl-shift-f2 to give all tech, this makes the tech multiplier massive. if you have no (or only 1) tech you get no ecodamage.

Now place a base and put a maximum amount of forest around it. Test the clean mineral limit, it should be 19. Now insert a CP using the SE and the clean limit leaps to 23(!) which is an increase of 4. Under situations were terraforming is no issue CP's seem to add +1 clean, but with forest they add more? Or do they increase the negative effect? Now insert a TF and the negative effect is completely eliminated, the base can only produce 17 as expected. Note that a treefarm completely eliminates -ve ED from forests, a HF is not required.

Oh yeah, and it is easy enough to get a base which has more than 16 minerals and terraforming ED, and you can get such a base where inserting a CP doesn't halve the ED, it does reduce it, but by something like 30%-40% (remember to add +1 mineral to account for clean effect of CP). This suggests something about how the values are carried over, or prehaps proves that they are carried over (rather than being calculated in one step). But anyway, if you have piles of mineral ED the situation is improved dramatically by building a CP.

Blake is offline  
Old May 9, 2001, 22:04   #78
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
Blake, Thanks a lot for your verification. I too have some data.

I measured ED at 5 different bases with 5 different sets of terraforming, all having Hybrid Farms. I measured the exact same ED for similar mineral productions at all bases. This indicates that Terraforming is indeed a non factor after Hybrid Farms.

I then tried to explain the large differential between the number of TFs etc. that I built and the observed ED limit. I first tried to see whether the Singularity Inductor had any effect on Clean Mineral. It had none that I could observe. But in taking the data, I began to suspect something else: That the TFs, HFs, CPs and TPs built after the Pholus Mutagen may contribute more than +1. The below numbers are approximate due to the difficulty in measuring the exact ED limit and because I am not rigorous in counting pops.

ED Limit TF HF CP TP SubT Pops 16 Total Diff from ED Limit

214 51 48 51 20 172 3 16 193 21
240 54 48 54 26 182 14 16 114 30

The reason I suggest the Pholus is because I completed it only 5 or six turns before the first of the above measurements.

I am not good at the SE, but I'll give a shot at testing this theory.

Fitz, Having seen the above, you must realize that we are not done.

Also, you should add Sea improvements to the terraforming improvements that cause ED. I suspect that kelp acts like a forest, but have not tested it.

Ned

Ned is offline  
Old May 9, 2001, 23:49   #79
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
Guys, I could not verify the hypothesis. However, I did seem to find data which suggests that the presence of TFs, HFs, CPs and TPs in a base all add 1 to Clean Minerals. Why? I sold my all my TFs in order to rebuild them the next turn. However, when I did that, the ED limit dropped in the base I was monitoring by what appeared to be one Clean Mineral. Also, I had previously totalled my TFs, etc., pops and 16 to yeild 173. The observed ED limit was approx. 177. The difference can be explained by the presence in this base of one TF, One HF and One CP plus a rounding error.

The bottom line, though, even after the PM is built, each TF built adds only one to "faction" Clean Minerals.

I'll keep working on this, next trying CPs and TPs. Ned

Ned is offline  
Old May 10, 2001, 00:41   #80
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
Blake, I just got my spreadsheet out to determine how many minerals it would take to produce at least 1 ED in the game I sent you. Planet = 3, Life =3/300, Diff. = 5, Techs = 88, and all GoodFAC + PM and SI.

ED = 1 = Net Minerals * 1 * 5 * 88 * .01 * (1/(1+1+1+1+1+1))

Net Minerals = 1.363.

In other words, Rounding does not seem to be a full explanation 28 extra Clean Minerals. Ned

Ned is offline  
Old May 10, 2001, 00:52   #81
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
quote:

Originally posted by Ned on 05-08-2001 10:36 PM
Fitz, No, Nanoreplicators do not add to Clean Minerals.



Thank you.

quote:


As to the formula, please some of my earlier posts. It can be greatly simplified by realizing that "terraforming" never exceeds Clean Minerals. The formula, generally is

ED = ((Minerals - Clean Minerals - Terraforming)/(1+GoodFAC))+5*MA)* X

I have not verified that "Terraforming" can be negative in the early game before HFs, however I have see some bases with ED limits of 17 before any pops or other Clean Mineral Facilities. This does suggest that a negative terraforming result essentially adds to the effective clean minerals of a base.

However, later, after HFs, terraforming is, in fact, a non factor and completely drops out of the equation. All bases that have HFs have the same ED limit which is set by "Minerals - Clean Minerals."



Okay, you've made a mistake, if the original equation order holds. In the original equation, the terraforming is not divided by goodfacs. That is why I asked about the different equations above. If you notice, number 4 is the original, and terraforming is not divided by goodfacs.

However, your formula becomes true as terraforming --> 0, which happens when you add HF.
Fitz is offline  
Old May 10, 2001, 04:25   #82
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
Opps! Again. The large difference between the observed ED limit and the calculated ED limit is primarily due to not taking account of Orbital Minerals. There still is an offset, which just happens to be the number of Clean Mineral Facilities.

E.g. Base X has approx. 212 ED and a TF, HF, CP and TP. It receives 19 orbital minerals. The faction has built a total of 171 Clean Mineral facilites. There have been 3 pops.

212 - 19 - 16 = 177
171 + 3 = 174.

Blake earlier reported data that showed that a CP and a TP each added 1 Clean Mineral to the base they were in. The data did not show, however, the same effect for TFs and HFs.

If one adds 2, for the CP and TP in the base, 171 + 3 + 2 = 176.

I just confirmed that adding a TP adds 1 to Clean minerals. When I added a TP to one base using the SE, its ED limit went up one. A second base's ED limit remained unchanged reflecting the fact that the TP was not "built".

Still the data suggests that either the first pop is not counted, or only one of Tree Farms or Hybrid Forests counted in a base. I see a consistent 1 offset between the ED limit and the calculated limit if one adds 1 for CPs and TPs in a base.

The problem with confirmation is that if one eliminate a TF or Hybrid Forest from a base, one has to deal with the Terraforming portion of the equation.

Fitz, other than this last point, I think your equation is right on. In fact it is the same as mine (see an earlier note where I noticed that Terraforming was "added" not "subtracted.") with the exception that atrocities are now also divided by 1-GoodFAC.

We should also learn how to deal with Kelp.

Also we need to test if Nanoreplicators, another GoodFAC, similarly adds to a base's Clean Minerals, if not to a faction's.

ED = (Minerals - Orbital - Clean Minerals + Terraforming + (1 * GoodFAC) + 5*MA)/(1+GoodFAc)*X
Ned is offline  
Old May 10, 2001, 10:35   #83
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
Okay, first of all, are you sure CPs and ToPs add one clean mineral to the base they are in over and above the global effect? Could you not be experiencing a rounding effect due to the fact that goodfacs just got increased by one? This would take a former eco-damage of 1.something and make it .5something, which would then be truncated to zero. This would make it look like the clean mineral limit had gone up by one.

Example:
Base with TF & HF (10 globally) 26 minerals:
(0+26+0-26)/1 = 0. 26 is clean limit because if you add one (0+27+0-26) = 1

Add 1 CP and one mineral (for the global effect):
(0+27+0-27)/2 = 0, but if add another (0+28+0-27) = .5 truncate to 0. This appears to be a second clean mineral from the CP, but it really isn't.

I assume that's why you put (1*goodfacs) in the top of that equation Ned. I think you guys are just seeing a truncation error. Try calculating the eco-damage for a positive amount and see if the +goodfacs makes sense in the top. Although even that may not work if the truncation occurs at this level, since a single goodfac always divides odd #s to .5, effectively 'adding' two, a third effectively 'adds' three, etc.

I forgot to put the TF/HF elimination of terraforming in the equation on page two, but have added it now. I will also put in a statement regarding negative values to reflect Blake's new info.

AFAIK, Sea enhancements are the equivilent to landforms of farm, solar, mine, and all cause eco-damage. I'm not saying that's how they actually act, just that's my understanding of how they are supposed to act.
[This message has been edited by Fitz (edited May 10, 2001).]
Fitz is offline  
Old May 10, 2001, 13:22   #84
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
Fitz, What I did see is the base I added a TP using the SE did have its limit raised by 1 but another base remained unchanged. Since the rounding is as to the "amount" of ED, not whether, I believe TPs do add one.


However, I am going to try to double check all this today.

As to Blake's example with the 20 forests, he did not mention a pop, so I say the following with the assumption there was no pop. Assume the following equation:

Net Minerals = Minerals - Orbital - Clean Minerals - GoodFAC + Terraforming. Set Net Minerals to 0 to determine ED limit, we get

ED Limit = Orbital + Clean Minerals + GooFAC - Terraforming

Clean Minerals begins at 16.

What his data suggests is that CPs "double" the forest effect in Terraforming. When TFs are added, this effect is halved.

Forests = 20. (-1 * 20)/8 = 2.5 which rounds to - 3.

ED Limit = 0 + 16 + 0 - (-3) = 19

Add CP.

Forests = 20, effect doubled. (-2 * 20)/8 = -5

Ed Limit = 0 + 16 + 1 - (-5) = 22

However, The observed value is 23. So CPs also apparently add 1 to "Clean Minerals" in the first part of the equation during the turn they are added, which is apparently not retained for later turns or faction wide if there have been no pops.

So Clean Minerals = Clean Minerals + 1 (this turn only?)

Ed Limit = 0 + 17 + 1 -(-5) = 23

Add a TF, which should also temporarily add to Clean Minerals and halve the Terraforming effect.

Forest effect halved. ((-2 * 20)/8)/2 = -2.5 rounds to -3.

Ed Limit = 0 + 17 + 1 - (-3)) = 21

However, the Observed value is 17, indicating that NEITHER the temporary increase to Clean Minerals nor the Terraforming effect are passed on to the second portion of the algorithm. The "halving" subroutine apparently sets the output of Terraforming calculation to zero if negative, and does not update Clean Minerals.

Blake, et al., does this make sense?

If it does, it seems to confirm that GoodFACs should be added to the calculation of Net Minerals, as suggested above. It also seems to confirm that TFs are not GoodFACs, either for the calculation of Net Minerals, or for the (1+GoodFACs) divisor.

Ned






Ned is offline  
Old May 10, 2001, 13:39   #85
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
quote:

Originally posted by Ned on 05-10-2001 01:22 PM
Fitz, What I did see is the base I added a TP using the SE did have its limit raised by 1 but another base remained unchanged. Since the rounding is as to the "amount" of ED, not whether, I believe TPs do add one.



Reread my post Ned. If the truncation affect drops a fraction, they will appear to increase the "whether" or not ED occurs (ie increases from 0) at the break point, thereby appearing to add one to clean minerals. If you actually add them into the equation, I think you'll end up with the wrong actual value when trying to calculate actual ED.

I had trouble understanding the rest of your post, but I'll read it again (and again, and again ...).

Fitz is offline  
Old May 10, 2001, 14:30   #86
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
First of all, why temporarily add to clean minerals? It looks to me like you are stretching the equation to make it more complicated than needed, to fit the numbers you have at your disposal.

It does make sense to me that the halving routine would change a negative to zero, but that they didn't include the set to zero into the first calculation.

Blake, the fact that you can insert a CP into a base with both terraforming eco-damage and mineral eco-damage, and not have the result halved suggests to me that the terraforming is not divided by goodfacs. I thought you said you had tested that already?

Edit: Formula's scratched, since they were obviously incorrect. I withdraw my point.
[This message has been edited by Fitz (edited May 10, 2001).]
Fitz is offline  
Old May 10, 2001, 15:33   #87
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
I have confirmed that each GoodFAC, but no other, adds 1 to the Net Minerals base calculation. I did this by individually adding the GoodFAC, and then by adding combinations. The ED limit varied accordingly.

I also carefully analyzed kelp. My conclusions are

1 for base

1 for each improvement, tidal or mine

1 additional for each worked tidal or mine

1 for each kelp farm - but no extra for working.

I still don't know the answer to the first pop question. I assume that the first pop does not count.

So the formula seems to be

ED = (Minerals - Orbitals - Clean Minerals - GoodFACs + Terraforming + 5*MA)/(1+GoodFAC) .....

Where GoodFACs are CPs, TPs and NanoReps.

I suspect now, that since GoodFACs will also include the Pholus and the SI in the divisor, it will also include it in the calculation of Net Minerals. I will try to confirm.

Ned
Ned is offline  
Old May 10, 2001, 15:46   #88
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
Sratch that, I think my numbewrs are wrong. Damn.
[This message has been edited by Fitz (edited May 10, 2001).]
Fitz is offline  
Old May 10, 2001, 15:58   #89
Fitz
King
 
Fitz's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
Scratch 2
[This message has been edited by Fitz (edited May 10, 2001).]
Fitz is offline  
Old May 10, 2001, 16:05   #90
Ned
King
 
Ned's Avatar
 
Local Time: 21:14
Local Date: October 30, 2010
Join Date: Oct 1999
Location: of Aptos, CA
Posts: 2,596
Fitz, I reread your post. Let me explain the way I determine the clean mineral limit.

First, I take data from the max minerals the base can produce and reduce that one by one by unworking a one or two mineral square(s). At each resultant mineral level, I note the ED. At some point, ED drops to zero. I then "chart" minerals vs. ED. The line tells me fairly accurately where the 0 ED limit is, and overcomes any rounding problems.

I followed your post on multipying terraforming by 1 + GoodFACs. It seemed that your answer was 24, not 23, the observed value. Am I wrong?

Ned
Ned is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 01:14.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team