Pollution Explanation (by request from Supernaut)

starlifter

Deity
Joined
Jun 17, 2001
Messages
4,210
Supernaut asked about the details of pollution, particularly as it pertained to research...

So... the following is the mathematics of how pollution is computed in Civ 2. It may be difficult to readily follow at first, but here it goes (at the end of the equations is a Key which defines the variable names).


Pollution icons consist of two sources, added together... Population Pollution (PP) and Resource Pollution (RP).

Population Pollution
--------------------

PP = (CP * TM) / 4 (round down)

Before Industrialization, TM = 0
After Industrialization, TM = 1

TM is further modified by this:

Auto +1
Mass Production +1
Plastics +1
Sanitation not discovered +1
Environmentalism -1
Solar Plant -1
Mass Transit TM=0


Resource Pollution
------------------

RP = (SP / RPD ) - 20

Improvement RPD
----------- -------
Nothing 1
Hydro 2
Nuclear 2
Recycling 3
Solar 9999 (infinity)


TP = RP + PP (round down)

P = DL * (A / 2)

RN = Random Integer between 0 and (256 - P)

If RN < (TP * 2) then you get 1 pollution within the city radius


KEY:
------------------------------------
TP = Total Pollution Icons
(it is the # of pollution icons you see in city status)

PP = Population Pollution

CP = City Population (Size of city)

TM = Tech Multiplier

RP = Resource Pollution

SP = Shields Produced

RPD = Resource Pollution Divisor

DL = Difficulty Level
(0-Cheftian, 1-warlord, 2-Prince, 3-king, 4-Emperor, 5-Deity)

A = Number of advances since 4000 BC
(this EXCLUDES the advances you started with!!!)

RN = Random Number (an integer)

As you can see mathematically, after you discover the 102nd advance at deity, you are guaranteed to get pollution every turn, even if you have only a single pollution icon (the yellow triangle) in your city status. This translates to Future Technology 15.... after that, even one pollution icon in a city status screen will yield one polluted terrain.

As everyone doubtless knows, there are 87 normal advances, assuming zero at the start. If you had 5 starting advances, then the last discoverd advance (assume stealth) would be number 82, which is used in the pollution calculation (variable A).

This yields a lower probability of pollution in a city that has a pollution icon. It also means that 100% probability of pollution will not occur for a single pollution icon until the 20th Future Technology is discovered at Deity.

So as you can see, pollution probability is affected by the total number of advances that you discover during the game. The starting techs do NOT count to this total, thus your probability of pollution will be lower at any given number of advances you have discovered.

Note: Original equation references are mostly from the Civ II Official Strategy Guide.
 
After returning from some time out this evening, I thought of a few more things that might help newer and/or math-challenged folks.

We'll look at several examples: Pre-Industrialization, post-Auto, and late game. Plus, we'll see if any form of government lends itself to pollution. We'll even look at the value of King Richard's Crusade.

First, the odds of pollution before the Industrial age. As you may have noted, PP (population pollution) is not a factor at all until *your* civ learns Industrialization. But how, you may ask, do the pollution icons appear in the city status window if, for example, you have a size 24 city with King Richard's Crusade?

The answer is: Resource Pollution (RP), which is a function of quantity of shields produced. Let's take an example from my own GOTM 5. It was AD 1200, and I had 39 techs. Hamburg was size 20, producing 32 shields, and it had 12 pollution icons. But what were the "real" odds of pollution each turn? Was it worth ratcheting down the shield production, lest my lowly settlers be overwhelmed in a sea of skulls? Let's see.

TP = PP + RP = 0 + RP

TP = 0 + RP = 0 + (SP/RPD) - 20 = (32/1) - 20 = 12 pollution icons

Sure enough, results are right on the money!


Now, what are the odds...

P = DL * (A / 2) = 2 * (39/2) = 39

(Note: DL = Difficulty level = 2, since Prince)

RN = integer between 0 and (256 - P) = Int btwn 0 and 217

If RN < (TP * 2), then you get a polluted square

If RN < 24, then you're polluted (the skull appears on a chunk of terrain in the city radius).

That's 24 chances out of 218, or 11.0%

Note: 218 is used because 0 is also a possible outcome of RN. 24 is used becuase the outcome for pollution are 0, and 1-23... which is a total of 24 possibilities.

To me, that means roughly one polluted square every 10 turns, and well worth the high shield output...

As a sidenote: with King Richard's Crusade (KRC) and a large Republic city, the KRC is a real bargain and can build all the wonders thru Industrialization, plus a full slate of city improvements. Since KRC will add about 20 shields per turn for typically at least 40 game turns (and often more like 80), you can see KRC is a real bargain. I typically get about 1200 to 1600 shields out of the KRC wonder, and maybe 2 or 3 pollution, max. Pollution costs 8 food and 4 shields (under republic) to clean up (plust transit time and lost production/trade), which is an excellent tradeoff for the ability to quickly obtain all the wonders in the game, during that era.

The odds of pollution, however, are increased under Deity, which is what most people eventually play. The thing that Deity changes is DL, which goes from 2 to 5. The final result for the same assumptions is still:

If RN < 24, then pollution... BUT!!

The random number is generated between 0 and [256 - 5*(39/2)], or 0 and 159

This makes the odds at deity:

one in 24/160... approximately 15.0%

As you can see, difficulty influences pollution odds somewhat, but pre-industrialization, the odds are about one in ten, up to one in seven, assuming your shield output is 32. Evidently, many people do not demand such high output, so the odds are likely less than 2 or 3%, assuming you have only 3 to 4 pollution icons.

Bottom line: Before Industrialization, crank that production up and damn the pollution odds!! Get those wonders, extra caravan, inporvements, and ironclads build before Industrialization! Your ironclads should not cause unhappiness in Republic/Democracy because you should easily get Shakespeare's in this fine coastal city. One caveat: Make SURE you can support all attached units to KingRichard's/Shakespeare's city!! If someone discovers Industrialization, and you have 15 units attached with a 32 production size 21 city... guess what... You're gunna lose up to 3 units as your turn begins.

Also, it should be pretty obvious what city is your Super Science City (SSC). It is the lovely coastal city with about half ocean and a Harbor and KRC, because each ocean square has at least 3 trade. Ideally, you have some wine and/or silk, plus a river, too. KRC guarantees you get Isaac Newton's College, too (if you get the advance, LOL).


Now what have we learned from all this stuff so far... Don't worry about pollution, even at Deity, before Industrialization. Typically, I won't even have settlers right on station if pollution occurs, but depending on where it pops out, I may take a pre-charged settler from another project and do a super-fast cleanup. But it might take a day to get there, until RR.


Let's take another example. It is post-Automobile. I will tell you the conclusion first, so you see where this is going... Democracy = Pollution, Fundamentalism = Clean.

Assumptions: First, if I'm in democracy, my main cities better be size 17 to about 25 or so (very few excuses for small cities languishing in Democracy or Republic!). Second, if I'm in fundamentalism (or communism)... I'm likely building (partial rush buying, PRB) all the important improvements for a powerful democracy. This translates to cities that produce 40 shields per turn if at all possible.

Now, for Democracy,

CP = 24 (City Population)
TM = 1 + 1 (base of one, plus one for Auto)

PP = (CP*TM)/4 = 24*(1+1) /4 = 48/4 = 12 pollution icons

Assuming 44 shields output (4 for support and 40 for construction),

RP = (SP/RPD) - 20 = 44/1 - 20 = 24 pollution icons


TP = PP + RP = 12 + 24 = 36 Pollution Icons

Now the odds, assuming Deity and 52 advances:

P = DL * (A / 2) = 5 * (52/2) = 130

RN = number btwn 0 and 256 - P, or 0 and 126

If RN < TP*2, or RN < 36*2, or RN < 72

As you can see, the odds are 73 out of 127, or 57.4% that a polluted square will occur each turn.

The more advances you have researched, the greater the odds of pollution forming. When you have discovered your 102nd advance at Deity, even one pollution icon wil result in a 100% chance that pollution will occur each turn.

Earlier, I said that Democracy = Pollution, and Fundamentalism = clean. So let's look at one of my typical Fundamentalist cities. Such a city is size 12, producing exactly 40 shields per turn. At deity and advance number 52, what is the pollution probability?

PP = (CP*TM)/4 = 12*(1+1) /4 = 24/4 = 6 pollution icons

Assuming 40 shields output (0 for support and 40 for construction),

RP = (SP/RPD) - 20 = 40/1 - 20 = 20 pollution icons

TP = PP + RP = 6 + 20 = 26

P = DL * (A / 2) = 5 * (52/2) = 130

RN = number btwn 0 and 256 - P, or 0 and 126

If RN < TP*2, or RN < 26*2, or RN < 52

The odds are 41.7% in Fundamentalism, vs 57% in Democracy. But the disparity increases as you discover more tech in the short term...


Stay with me now. When I discover Auto, I immediately go for Mass Production, and switch projects in big cities to Mass Transit, and rush build to 120 shields (use bank, chapel, or aquaduct)... or else rush to 80, and take 2 turns (pollution will not occur on the completing turn)... or buy the whole thing... or assign 2 engineers per 2 cities for pollution detail.

In essense, all my larger cities have a PP = 0 within two turns of Mass Transit. That leaves just RP. The Hoover Dam takes care of that, mostly. I consider the Hoover Dam, hands down, the most important Late Game wonder... under all forms of government, in normal situations (e.g., not in OCC). Don't even think about missing HD in a SP game.

Since RP = 40/2 - 20 = 0 for a 40 (or 41) shield city, you can see a Fundy gov't with Hoover dam and Mass transit eliminates pollution.

Under a Democracy, you will likely have 44 shields of production (or more) because of city size and/or required support to pay for units attached to the city so you can get the magic 80 shields per turn. This will generate 2 pollution icons, which translates to about a 4% chance at 50 advances, increasing to about 10% at 80 advances, 13% at Stealth, and 100% no later than FT015. The exact numbers depend on how many starting techs you had, which are subtracted from the total advances your science advisor reports.

So in the bulk of my producing cities in Fundamentalism, I have no pollution after Hoover Dam and Mass Transit. On the other hand, in Democracy, I will not sacrifice the minimum of 40 net shields per turn, which means output is typically more than 41 to pay the unit support. And shield output above 41 will yield pollution icons, which means you now have a chance of polluting your terrain each turn.

Whatever the required net shield output, Fundamentalism (and Communism to some extent too) will pollute less than a similary producing (net 40 output) Democratic city. I often produce and re-assign units immediately to keep production levels where I want them, esp. in a Democracy.

You can develop a system, and "assume" you are in a Democracy, even if you are in Fundy or Communism. Re-assign ships, bombers, and missiles in particular, so you have minimal happiness, production, and pollution problems when you switch to Democracy (which you should normally be aspiring to). There is rarely an excuse to maintain any other Government besides Democracy once you have Women's Sufferage and/or Cure for Cancer and/or the UN, so prepare for that day, and pump those cities up!


How should you use all this knowledge, assuming you are still with me?

In summary:

1. Fundy = "cleanest" government (least pollution gor given production)

2. Democracy = "Pollutingest" government (city sizes and required support plus required baseline net production equals most pollution) (Democracy is worth the pollution... better to have 60 monster cities than 59 runts!).

3. Use Freight (esp. in Fundy! No science penalty!) and Science (halved in Fundy) to get the anti-pollution techs (Mass Transit, Recycling, and Environmentalism).

4. Avoid Plastics as long as possible if you are having problems with pollution.

5. Avoid Mass Production until you are committed to either a massive cleanup, or building Mass Transits quickly.

6. Environmentalism will lower pollution probability considerably (I won't bore you with the math).

7. If you can do it, crank up the shields before Industrialization... in effect, you have a Mass Transit in all your cities.

8. Don't even think about a post-industrial civilization that has ignored Sanitation, if you have large cities (such a scenario is highly unusual, but would be a good polluter).

9. King Richard's Crusade is an excellent bargain if you have the right city, but is not a dire wonder to omit. Properly used, it will easily build you 4 or 5 wonders in return, and ensure its home city has all possible improvements. Best of all, there is no support cost... factory and offshore paltform, plus the fact that pre-Industrialization is effectively a Mass Transit for you, which total 11 gold per turn in the post-industrialization world. Over 80 game turns, this is an 880 gold value!

EDIT-Minor changes and spelling corrections.

[This message has been edited by starlifter (edited June 24, 2001).]
 
Starlifter - U the man. I have printed this off and shall take it away to read and inwardly digest. Thanks for taking the time to type in all 8 pages of this - if you're ever in London, I'll buy you a beer!
 
you may also bring this to the great library in apolyton forums, its also under civ2 strategy. That way it will be read by a lot of more civ players and it is organized between all the other cool strategies!

------------------
Woke23

Civ Fanatics Ladder Operator
 

posted June 25, 2001 06:40 AM

Starlifter - U the man. I have printed this off and shall take it away to read and inwardly digest. Thanks for taking the time to type in all 8 pages of this - if you're ever in London, I'll buy you a beer!

The operational use of all this info really does not require the math... just a general idea of how things relate, esp. for more advanced players who tend to play a game right on the edge anyway. So don't worry too much about the math. I haven't been to London since '96, but I once saw the Queen at Westminister Abbey!
 
posted June 25, 2001 08:25 AM

Starlifter, did you actually write Civ II? This is incredibly detailed knowledge, and if you didn't write the game, we take our hats off to you. If you did, then we'll take our heads off as well.

No, I didn't write Civ II, but did consider doing some games programming once or twice. But programming is not my primary occupation, though math and logic are pretty easy for me (I'm an engineer by education).

In this post I just decided to quantify for others some rather obscure points to demystify how Civ II handles pollution. Some of the final numerical results were mildly suprising even to me... my general feel had been the odds of late game pollution were slightly greater than they turned out to be.

The strategies I talked about I had discovered emperically a long time ago, but I figured it might help others if I went into more detail rather than just stating what to do.

As a caveat, I feel any new Civ II players who read this thread are probably better served by studying trade and happiness control, rather than pollution. And average players working hard in deity might get more "bang for the buck" if they take a close look at trade, happiness, dips/spies, and forms of government before getting wrapped around the axle with pollution.

However, for advanced players (like many in this Forum seem to be, judging from the posts) who can squeeze every bit from a game, some of these details might help give a little edge here and there... especially if you're chronically stretching your corps of engineers to the max (and even with 200, I always seem short! :) ).

Wish I could take credit for Civ II, AKA The Greatest Computer Game Of All Time, but no, I had nothing to do with it ;). And my hat's off to Sid and Brian, et. al.!

EDIT: remove duplicated sentence.
 

posted June 25, 2001 12:15 PM by SlowThinker
Starlifter,
how did you find it out??

Well, actually it turned out to be somewhat of a pain. But I decided to respond to Supernaut's question anyway. In getting started, I began with the original equation references as claimed by the Civ II Official Strategy Guide. In testing and reverse-engineering some results, I found they had a few minor things wrong.

Once a few things fell into place, I just cranked out the posts you see in order to show how it all works, and then explained some strategies I personally use to use to exploit the results. Doubtless some readers will think of even better ways to use the info , but this is a good starting point for those who play at a level where it might make a difference.

Last caveat: it is possible there may be a math error here and there, etc. In a week or so, I'll go back and read it all again myself, and hopefully catch any subtle errors.
 
Originally posted by starlifter:

The operational use of all this info really does not require the math... just a general idea of how things relate, esp. for more advanced players who tend to play a game right on the edge anyway. So don't worry too much about the math.

The maths isn't a problem - in fact it was good, as I don't get to use that bit of my brain very often these days. I've still got to think of ways of now applying the knowledge to my gameplay (and I hope it works in TOT, as that's the only version I've got!)

Originally posted by starlifter:
I haven't been to London since '96, but I once saw the Queen at Westminister Abbey!

She's always hanging out round there, trying to blag change of the tourists
 
Starlifter,
did you read <A HREF="http://forums.civfanatics.com/Forum2/HTML/000124.html">Great Library (Apolyton) </A>thread?

It would be very beneficial if you would convert this thread to a "condensed" thread (i.e. move all your posts of this thread into your first post for example).



[This message has been edited by SlowThinker (edited June 28, 2001).]
 
Top Bottom