This is the formula for deciding whether to irrigate or mine

kangyio

Warlord
Joined
Oct 7, 2003
Messages
165
Moderartor,I have posted this in the Strategy&Tips forum and it's the wrong forum,please closed that one if needed.

I have been working on this topic for 3 days( not a long time each day ),and this is an updated version of my formula,it features ALL terrain possible around your city in civ3 , you would chop down the forests and jungles later ,wouldn't you?My formula applies to the cities fully railway overlaid and with 20 citizen population.The aim is to maximise the shield output.It's a very powerful formula in terms of the ablity to guide you through the decisions must be made between irrigation and mine.

I really do want to keep this as short as possible since last time many people got confused,and I believe there will be no confusion this time!:cool:

The formula is :
The total number of irrigated tiles (excluding irrigated flood plain)
= 0.5 ( -2 - 3xNumber of flood plain + 2xNumber of mountain + Number of hill + Number of tundra + Number of plain + 2xNumber of desert)


And once you get the answer,then that's the total number of tiles should be irrigated in your 20 working tiles(excluding irrigated flood plain) ,and obviously, mine the rest.Max shield output will be achieved.

The attach file is the full calculation if you are interested(a very small wordpad document) and the calculator GIDustin and I made for my formula.(special thanks to GIDustin for compiling the vb program:) )
 

Attachments

  • calculation and calculator.zip
    7.4 KB · Views: 321
Look at this typical coastal city:



As you can see,there are 4 mountains , 1 hill , 5 plains , 6 grasslands and 4 water tiles(the white tile is the city itself which doesn't count as a workable tile)


The formula is:
The total number of irrigated tiles (excluding irrigated flood plain)
= 0.5 ( -2 - 3xNumber of flood plain + 2xNumber of mountain + Number of hill + Number of tundra + Number of plain + 2xNumber of desert)


Number of flood plain = 0
Number of moutain = 4
Number of hill = 1
Number of tundra = 0
Number of plain = 5
Number of desert = 0

Put these numbers in the formula :
The total number of irrigated tiles (excluding irrigated flood plain)
=0.5 (-2 - 3x0 + 2x4 + 1 + 0 + 5 + 2x0)
=6

Now this tells you that you should irrigate 6 tiles,if you do this then maximum shield output will be achieved for this coastal city.You could irrigate 2 grassland and 4 plains or 3 grasslands and 3 plains.....................etc.This doesn't matter,there are 6 irrigated tiles is the key.
 
Look at this special example :



As you can see,there are 5 flood plains , 8 grasslands and 7 hills(the white tile is the city itself which doesn't count as a workable tile)

The formula is:
The total number of irrigated tiles (excluding irrigated flood plain)
= 0.5 ( -2 - 3xNumber of flood plain + 2xNumber of mountain + Number of hill + Number of tundra + Number of plain + 2xNumber of desert)


Number of flood plain = 5
Number of moutain = 0
Number of hill = 7
Number of tundra = 0
Number of plain = 0
Number of desert = 0

Put these numbers in :
The total number of irrigated tiles (excluding irrigated flood plain)
=0.5 (-2 - 3x5 + 2x0 + 7 + 0 + 0 + 2x0)
=-5

I call this a special example because you got a negative number.What this means you don't irrigate any tiles at all,just mine all of them!(of course for flood plain you have to irrigate them as you can't mine on flood plain)If you look back at the screen shot,there are so many productive food tiles of course you don't need to irrigate any of them.
 
Here is an example city involve tundra and desert.(please read through,this is very simple):



Same colors correspond to the same type of tiles,the white tile is the city itself.As you can plainly see, there are 2 flood plains , 3 mountains , 3 hills , 2 tundras , 4 plains , 1 desert and 5 grassland

The formula is:
The total number of irrigated tiles (excluding irrigated flood plain)
= 0.5 ( -2 - 3xNumber of flood plain + 2xNumber of mountain + Number of hill + Number of tundra + Number of plain + 2xNumber of desert)


Put the numbers in:
The total number of irrigated tiles (excluding irrigated flood plain)
= 0.5 (-2 - 3x2 + 2x3 + 3 + 2 + 4 + 2x1 )
=4.5

Now isn't this easy,this result means that as long as you irrigate 4.5(5) tiles around your city(excluding irrigated flood plain) then you have achieved the maximum shield outcome possible for this particular city!No matter how you do it,you can irrigate 2 grasslands,2 plains,1 desert,or 5 grasslands, 0 plain,0 desert,however you like but the outcome will be the same and five irrigated tiles is the key for this city!

Don't trust me on this?Well,try this.Take the option of irrigating 2 grasslands,2 plains,1 desert.After full railway development :

one irrigated grassland =4 food x 2 =8
one mined grassland =2 food x 3 =6

one irrigated plain =3 food x 2 = 6
one mind plain =1 food x 2 = 2

one irrigated desert =2 food x 1 = 2
one mined desert =0 food x 0 = 0

one hill(must mine) =1 food x 3 = 3
one mountain(must mine) =0 food x 3 = 0
one tundra(must mine) =1 food x 2 = 2
one flood plain(must irrigate)=5 food x 2 = 10

And the number of food together:

8+6+6+2+2+0+3+0+2+10=39

However don't forget the city itself produces 2 food,so that's 39+2=41 food.It's the exact amount of food you need for 20 working citizen to maximise you shield outcome,as 1 citizen needs 2 food!When you are wasting the minimum food on specialist then you are producing the maximum shield possible!
 
Not everyone has vb installed. Try compiling this to an EXE or ask steph to do it for you.

- GIDustin
 
I made it a cgi script for my own uses. If others want to use it, feel free.

http://www.civ3files.com/cgi-bin/Irrigate.cgi

BTW How come the # of grasslands is not in the equation and what happens to the# of water squares?

- GIDustin
 
If you have the patience(which is simple maths,just long) to read about the calculation process you downloaded along with the calculator,you will discover the grassland and water could be canceled during the simplifying process.Trust me on this one,my formula is correct and I've done many tests with various different cities,grassland and water definitely will not be in the equation.You can read some of my examples above,they all work and expressed simply.
 
GIDustin,thank you for your advice.I have tried your link,it works pretty well.May I ask who is steph?full user name?
 
hmmmm gonna try this out on tonights game :) thanks! should make micro-managing all those dang workers a little easier! ;)
 
Steph is the username of someone on the forums who uses VB AFAIK.

Also, could you add support for mods? Like in my mod, you can irrigate hills and tundra. Also, are other things taken into consideration like GOvernment (remember despotism thing), whether or not the civ is agricultural, whether or not the city has a harbor (for increase sea/coast food) and other factors. If you rewrite a formula including all of those, I will edit my script as well.

- GIDustin
 
I have given steph a private message,if the username is 'steph',then I should have sent the message to the right person.

Also, could you add support for mods? Like in my mod, you can irrigate hills and tundra.

Of course I can.What I need is the exact amount of food,shield hills, tundra will produce after they are irrigated,mined and railway overlayed.

Also, are other things taken into consideration like GOvernment (remember despotism thing), whether or not the civ is agricultural, whether or not the city has a harbor (for increase sea/coast food) and other factors. If you rewrite a formula including all of those, I will edit my script as well.

About the agricultural civ,I don't know exactly what it does is the problem,because I don't have PTW,but Conquest is coming out tomorrow,so I should get it in two days.What I assume about aricultural civ is they irrigate faster?more food produced in central city square itself?or else?
For other things in your quote,there is a simple answer.My formula is for those cities which are fully railway overlayed,with harbor(if coastal city),not under despotism production penalty.Because the aim of my formula is to maximise the shield output so there is no point in doing such calculation if the shield output can't maximised.i.e.some tiles without railway,no harbor,under despotism.
 
Originally posted by GIDustin
Steph is the username of someone on the forums who uses VB AFAIK.
- GIDustin

Then you don't know very far ;)
I'm using C++ for SBB and CEC, and C# for SSS
 
Steph: I was guessing really. kangyio, If you cannot find someone to compile it, i will install my DeVry copy of VB and help ya out.

- GIDustin
 
GIDustin,if you can do that then that is greatly appreciated,thank you.Apparently steph sent me a message and refused to help me because he is not using vb.
 
This is extremely useful! Hopefully you can incorporate bonus resources into the equation, though that would complicate things more.
 
Originally posted by Gingerbread Man
This is extremely useful! Hopefully you can incorporate bonus resources into the equation, though that would complicate things more.

Ah,finally,someone metioned the critical point------the bonus resource.I will do this in the name of maths:cool: ,but some exams are coming,so I have to reconsider the distribution of my time.But don't worry,I will finish the job completely.
 
Originally posted by kangyio
My formula is for those cities which are fully railway overlayed,with harbor(if coastal city),not under despotism production penalty.Because the aim of my formula is to maximise the shield output so there is no point in doing such calculation if the shield output can't maximised.i.e.some tiles without railway,no harbor,under despotism.
Well, this is obviously for later in games then. How do you take Longevity into account? Or is no growth assumed to be a prerequisite of the calculator?
 
Originally posted by superslug

Well, this is obviously for later in games then. How do you take Longevity into account? Or is no growth assumed to be a prerequisite of the calculator?

Yes,it is for later in games,in the early stage when you need to develop a city you will always want to increase population first,will you not?Apparently you haven't read my calculation process,if you would download it,you just need to read the first paragraph which will answer all your question.(no any big maths in the first paragraph)
 
Top Bottom