Question re: new commerce cities

You should read mine, of course. ;)


The method I used generalizes to other situations, such as "Should my production city work its copper mine while it's growing?", and (IMHO) is simple enough to be used in the middle of a game. I'm not sure well the other approaches work (or if they are even different). Of course, that might only be because the method is customized to the way I think!


The answer (unless I've messed up) for this particular problem is:

Size 1-10: work the rice, and all farms
Size 11: work the rice, and any mixture of farms and cottages
Size 12-13: work the rice and all cottages
Size 14: work all cottages

(This is true, even if you cottage over the rice)


I guess I didn't explicitly state how I apply it in game. First, I count how many hammers (or cottages, or specialists, etc) I will produce at full size. Second, I arrange my citizens in each of the ways I'm considering, checking the production deficit (e.g. the difference in the hammers produced at full size versus the current arrangement) and the turns to grow. I then compute net loss as
{net loss} = {deficit} * {turns to grow}
and select the arrangement with the least net loss.
 
The answer (unless I've messed up) for this particular problem is:

Size 1-10: work the rice, and all farms
Size 11: work the rice, and any mixture of farms and cottages
Size 12-13: work the rice and all cottages
Size 14: work all cottages

(This is true, even if you cottage over the rice)

I have different figures, offcourse I am starting from the premise that a granary and Library whipped are good things...
Whipping the Granary at size 4 and the Library for 2 pop as soon as you can. Whipping the Lib for 3 pop ASAP is a BAD thing!

My calculations show, work all farms to size 8 + 2 turns (one turn short of size 9, at turn 39), Then switch to all cottages (not including the rice).
For now this brings (at 70% science) 6794 beakers and 1071 gold over the first 200 turns it excists.

If you build NOTHING in the city and only go for raw commerce... this would max out on just about the same point...
Farm everything untill size 8 + 3 turns (2 turns short of size 9, at turn 42)
Now work 4 cottages for 1 turn, the switch the rest except for the Rice, which gets switched somewhat later.
For now this brings (again at 70% science) 4467 beakers and 1914 gold over the same 200 turns it excists.

But I am not completely confinced yet that this is the best of the best, I am sure it can use a little tweak here and there.
The problem with the formula I think is it doesnt take into account the granary which
1) Needs to be build/whipped
2) Changes everything about growing, but only AFTER beeing build.

The Granary & Lib whip option not only gets MORE beakers, it also gets them sooner (by 3 turns). And that is the weak point of the equation, the addition of buildings... and possibly even an Academy/University/Observatory/Market/Grocer/Bank later on. Possibly even a Forge mixed in if you plan to whip that much.
 
I have different figures, offcourse I am starting from the premise that a granary and Library whipped are good things...
Whipping the Granary at size 4 and the Library for 2 pop as soon as you can. Whipping the Lib for 3 pop ASAP is a BAD thing!
I was optimizing the number of cottage turns produced. To convert that into optimizing commerce, I was making the implicit assumption that the granary and library were already created, and that our time limit is sufficient for all cottages to grow into towns.
 
You cannot build commerce only Gold or Beakers, and NO it doesnt include building ANYHING, that includes NO gold NO beakers NO building NADA

All this doesnt include trade routes either, as they should -approximatly- be the same for all situations.
 
I was optimizing the number of cottage turns produced. To convert that into optimizing commerce, I was making the implicit assumption that the granary and library were already created, and that our time limit is sufficient for all cottages to grow into towns.

Well I have taken your magic buildings to the test... and more or less as I expected you start cottages even sooner than if you need to whip/build the buildings yourself.

I would say it is back to the drawing board for the formula... :sad:

The optimum point with your magic Library and Granary (starting from 1 pop) is to farm to size 6! and switch to cottages.
Even leaving behind the farmed rice at size 10 :eek: allready...

Surprisingly enough I also found in the -more realistic- tests that you leave behind the Rice farm suprisingly early. I was going from the premise that you would want to work the rice to size 15 but that appearently is not true.
 
Well I have taken your magic buildings to the test... and more or less as I expected you start cottages even sooner than if you need to whip/build the buildings yourself.

I would say it is back to the drawing board for the formula... :sad:
If I assume a library and granary appear magically on turn 1, then I worked out by hand the results at turn 200: 2343 cottage turns, 6231.75 beakers and 2136.6 gold, for a net beakers + gold of 8368.35.

I tried it in game, and I got comparable results -- I got a 2159 gold in game, but that's because of the extra 1 commerce from the city tile. (I don't know how much science I got, because I don't know what the beaker multiplier was for Future Tech I. But since gold and science come at a constant proportion, if I got the gold right, I should have the science right)


I tried working out your strategy by hand: there were only 2275 cottage turns. Furthermore, the city grew so slowly that some of the cottages did not mature into towns by turn 200.


What exactly is your testing procedure? Are you sure you are getting the global optimum? (And that there were no errors in your calculation?)
 
In my example of the "magic" buildings in 200 turns I got a total of 1142 gold and 7992 beakers => 9135 total.

1 Cottage doesnt make it to Town... the others do...

My test presumes that the optimum is someplace between "farming all" to size 15 and Cottage all from size 2 (working the Ricefarm at size 1).
Then it removes 1 farm from the "end",
i.e.
work 13 farms, 1 cottage at size 14, record the totals
work 12 farms, 2 cottage at size 14, record the totals
work 11 farms, 3 cottage at size 14, record the totals
work 10 farms, 4 cottage at size 14, record the totals

Finaly I found that you need to tweak the number of turns on the rice farm... like I said it appears that it is NOT optimal for commerce to work that all the time.

I am not quite happy with my spreadsheet -yet-... But "someday soon" I will publish it for global use. It should allow people to calculate the "perfect" opening for any city, like the everlasting: Workboat or worker discussions... or even WB/WB/WRKR.... etc.

Edit:
I got 2303 cottage turns

while when I farm to size 11 and switch to cottages I get to 2228 cottage turns
Both of these figures (cottages turns) disturbingly deviate from your figures... I am currently going from Epic speed because that is the speed I most play at... that could make a big difference as on Epic you need 30 + 3/pop food to grow , while on normal 20 + 2/pop food to grow.
Which means with magic buildings
Normal speed, all farms to size 11: Reach size 11 at turn 21
Epic speed, all farms to size 11: Reach size 11 at turn 34
 
Maximizing cottage/production turns.

Theory: Current city is size n and we have a target city size N. FSB is the total food supply bonus, from terrain and special resources, but not normal farms/windmills. Then we measure cottage turns by (# cottages) * T_i - N * T_i (this will always be a negative number). i is the number of normal farms, T_i is the number of turns it will take to grow 1 size.

T_i = (10 + n) / (FSB + a). normal farms (i) + # worked special resource tiles (s) + # cottages = n, so we are maximizing relative to i
(n - i - s) * (10 + n) / (FSB + i) - N * (10 + n) / (FSB + i)
= - ((N - n + s) + i) * (10 + n) / (FSB + i).
So when (N - n + s) > FSB, this increaases with the number of farms, when N - n + s = FSB, it is invariant to the number of farms, and when N - n + s < FSB, it decreases with the number of farms.

Therefore, when N + s - FSB > n, farm, but then start making cottages and improving as fast as possible.
 
Application in generalized situations

1. Figure out target size N by food/health constraints. Now figure out the maximum output at that size N. For cottages, presumably this is N, although it may be less if you have to work a food resource to compensate for unhealthiness/bad terrain. For production, this is the maximum number of hammers. Whatever it is, call this N'.
2. Determine the food bonus/penalty, not including windmills or normal farms at size N.
Example: Irrigated rice, clam w/lighthouse, 1 floodplain, 5 grassland, 2 plains, 1 grassland/hill, 1 plain/hill.
FSB = 2 (from city) + (5 - 2) + (5 - 2) + (3 - 2) + 5*(2 - 2) + 2* (1-2)+ (1-2)+(0-2) - unhealthiness.
= 4, assume 0 unhealthiness. Presumably you won't be cottaging plain/hills.
s = number of special resources worked, if we assume we're not cottage/mining/farming over them inapporpriately.
3. For cottages, farm until size n = N' + s - FSB or if you have biology (N'+s-FSB)/2. (Why? since now turns to grow is (10+n)/(FSB + 2i), and the 2 factors out to (10+n)/(2*(FSB/2+i)).) Once you are at size N'+s-FSB-1, make the next improvement a cottage, and convert switch all non special food bonuses to cottages as quickly as possible.

Production is trickier, since you can't just count the number of mines or workshops if there is different terrain. For workshops without state property, since there is -1 food compared to a +1 food farm or +2 food farm, you may have to divide FSB by 3. Edit later.

For great people, (N'-n+s+i)/(FSB-2(n-s-i)+i), so N'-n+s > (FSB-2n+2s)/3, 3N'-3n+3s > FSB -2n+2s, n < 3N'+s-FSB, farm. edit and double check later.

Notes: technically we should be using FSB at size n instead of size N, but presumably you're either cottaging or farming your highest food tiles, so flood plains not withstanding, FSB should either stay the same or decrease as city size increases. It would be somewhat wasteful to farm, then cottage, then have to replace some of the cottages for farms when you're start working too many plains.
 
Both of these figures (cottages turns) disturbingly deviate from your figures... I am currently going from Epic speed because that is the speed I most play at... that could make a big difference as on Epic you need 30 + 3/pop food to grow , while on normal 20 + 2/pop food to grow.
The numbers I posted are for epic; I specifically looked up the numbers so I could compare better with yours!

I'll redo the calculation when I get home tonight, and post the resulting timelines to the thread. e.g. a list like: (numbers hypothetical)

Turn 47:
Become size 17.
Food is 45 / 81.
Net cottage turns so far: 3147
Food surplus is 10.
Cottages worked is 11.
Turns spent: at this size: 4

except it would be somewhat condensed, like
47 @17 45/81 (3147) : +10 (11) : 4

Maybe you can post a similar list, and we can see where we differ.
 
Application in generalized situations
I am sorry Vicawoo, I dont seem to follow this at all. Could you please make a sample with the discussion we are having?
That is this city


No FPs, no clams no lighthouse etc... just this city please... *ugh* my aching head...

MyOtherName said:
except it would be somewhat condensed, like
47 @17 45/81 (3147) : +10 (11) : 4

Maybe you can post a similar list, and we can see where we differ.
See now we are getting some place. Lets start easy tho... City with NO buildings at all ever.... just produces 1 hammer that disappears into limbo...

The max I seem to get out of it is 6.416 commerce, at 1807 cottage turns.
and keeping the farmed rice in tact... i.e. not cottaging it. And not :eek: even making it to size 15 ??? I will have to look into this...

Work farms to size 7, switching 3 farms to Cottages 1 turn before growing to 7 (turn 33). Size 7 (turn 34) and on work all cottages + the rice farm.
UP to and including turn 66 and the first turn of size 10, then too switching this to a non riverside cottage.

Anyway Stats (starting with turn 0):
Code:
Size	Start Turn#	Turns	Food/turn	Surplus	Commerce/turn
1			7	7		5	2
2	7		6	10		6	3
3	13		6	13		7	4
4	19		5	16		8	5
5	24		5	19		9	6
6	29		5	22		10	7
7	34		10	19		5	14
8	44		11	21		5	16
9	55		11	23		5	24
10	66		29	25		5	26
11	95		31	24		2	36
12	126		33	26		2	45
13	159		35	28		2	49
14	194		7	30		2	49

Cottage turns for now are a bit hard to count for me... will commerce do?

Note: the commerce/turn doesnt add up, due to the growth between growing...
 
Commerce is hard for me to count, because I'm doing this by hand. :(

Here are my figures for your strategy:
Code:
Size  Start  Food  Surplus  Cottages  Turns  Accumulated cottage turns
 6  29  3/48 10  0  4    0
 6  33 43/48  7  3  1    0
 7  34  2/51  5  6 10    3
 8  44  1/54  5  7 11   63
 9  55  2/57  5  8 11  140
10  66  0/60  5  9  1  228
10  67  5/60  2 10 28  237
11  95  1/63  2 11 31  517
12 126  0/66  2 12 33  858
13 159  0/69  2 13 35 1254
14 194  1/72  2 14  6 1709
 X 200  X  X  X 14  X 1793
You seem to have run for 201 turns; 1793 + 14 = 1807, as you got.

And for mine:
Code:
Size  Start  Food  Surplus  Cottages  Turns  Accumulated cottage turns
 1   0  0/33  5  0  7    0
 2   7  2/36  6  0  6    0
 3  13  2/39  7  0  6    0
 4  19  5/42  8  0  5    0
 5  24  3/45  9  0  5    0
 6  29  3/48 10  0  5    0
 7  34  5/51 11  0  5    0
 8  39  9/54 12  0  4    0
 9  43  3/57 13  0  5    0
10  48 11/60 14  0  4    0
11  52  7/63 14  1  4    0
12  56  0/66  5 11 14    4
13  70  4/69  5 12 13  158
14  83  0/72  2 14 36  314
15 119  X/XX  X 15 81  818
XX 200  X/XX  X 15 XX 2033
For 2033 cottage turns, or 2048 if you run for one more turn.

When I grew to size 11, I switched one farm to a cottage.
When I grew to size 12, I switched all farms to cottages.
When I grew to size 14, I switched the rice to a cottage.
 
I'm looking at cottage turns, since in say 125 turns, everything should be towns. This does ignore riverside commerce, however.

Farm until size N+1-FSB. FSB=5, so farm until size N+1-FSB, then switch to cottages as fast as your workers allow. Deviations from that figure will be minor.
 
Quick short reply, have to get to work....

MyOtherName said:
You seem to have run for 201 turns; 1793 + 14 = 1807, as you got.
Yes, I also counted the tiles to be worked on turn 200 :sad: sorry.
Good spot!

MyOtherName said:
When I grew to size 11, I switched one farm to a cottage.
When I grew to size 12, I switched all farms to cottages.
When I grew to size 14, I switched the rice to a cottage.
That is work one cottage at size 11
Work all cottages + Rice at size 12 and 13
Replace Rice by non-river cottage turn 14
Right?

This by my calculations generates 5843 commerce, while my variation nets 6416.
Your variation will take an additional 12 turns to get to 6431 commerce. While making 49 commerce/turn.
For your variation I do also count 2033 cottage turns (not including the last turn ;) )

Vicawoo said:
Farm until size N+1-FSB. FSB=5, so farm until size N+1-FSB
N+1-FSB ??? WTH?
N would be target size (15) ...

15 + 1 - 5 = 11... farm everything untill size 11 then cottage... Yours seems to be simular/identical to MyOtherName.... eventho my variation (within the limits of the 200 turns experiment) returns the most commerce.
This is probably due to the fact that working a town for an extra turn over losing a cottage for 2 turns still results in a net of +2 commerce.

This you do not account for which results in MORE cottage turns on lower yields, resulting in lower commerce.

My conclusion would be:
1) You cannot count cottage turns to optimize this
2) Time is a factor, how many turns are left to grow/live ?
3) Not reaching the maximum pop, can be optimum :crazyeye: (within the # of turns left in the game)

<edit>
*Ugh*

I just found a nice little bug ! *GRMBL* This will probably change everything :sad:
I am glad I found it tho :) I will get back when it is fixed
</edit>
 
This by my calculations generates 5843 commerce, while my variation nets 6416.
Your variation will take an additional 12 turns to get to 6431 commerce. While making 49 commerce/turn.
For your variation I do also count 2033 cottage turns (not including the last turn )
This can't be right. On turn 200, mine is working 14 towns and 1 village (9 turns until town). That's 59 commerce... plus the other incidental commerce from tiles that you also seem to be counting.

Anyways, as a sanity check, by your calculation of commerce, what happens if you run both scenarios another 90 turns? (Remember, my claims of optimality did explicitly assume that the time limit was sufficiently long for all cottages to mature into towns... your strategy was cut short!)


As for counting commerce... here are my estimates:
Over 200 turns, you worked 1793 cottage turns.
11 of those cottages were founded before turn 110. The others were founded on 126, 159, and 194.

If I assume each cottage turn = 4 commerce, then to compensate for the time spent maturing, I have to subtract off:
11 * (15*3 + 30*2 + 45*1) for the first 11 cottages
15*3 + 30*2 + 29*1 for the cottage @ 126
15*3 + 26*2 for the cottage @ 159
6*3 for the cottage @ 194
For a net commerce of 5273


Doing the same for mine, I have 2033 cottage turns. 14 were founded before turn 110. One was founded on turn 119. So, I have to subtract
14 * (15*3 + 30*2 + 45*1)
15*3 + 30*2 + 36*1
For a net commerce of 5891


Both methods have the same opportunity to get the extra coin from the city tile... and, my strategy grows faster and works the rice longer, so counting the raw tile yield should actually improve my strategy more than yours.

How did you get your figure of 6416 commerce for your strategy? I can't reproduce it.
 
I can't reproduce it.
Like I said I found a bug... This makes everything different (see below)

MyOtherName's way (as I understand it, atleast the cottage turns match :) )
Work 1 cottage size 11
Work all cottages + Rice size 12 and 13
Work all cottages size 14 and 15

2033 cottage turns, 1 cottage (#15) has 8 turns to get to a town

Total commerce 7.594

My 'new' way
Farm all to size 11 minus 1 turn
Last turn size 10 work only 2 farms ( + Rice + 7 cottages)
First turn size 11 work all cottages
Work rice to Size 15

2040 cottage turns, all cottages make it to towns :)

Total commerce 7.637

Now this is much more looking alike that we did before (stupid bug), there is only 43 commerce difference :)

For all options between Working only the Rice and NO farms to Rice plus all farms to size 15 not farming at all is the worst option at 7.074 commerce (563 commerce missed) .
While overfarming, at all farms to 15 generates 7.304 commerce (330 commerce lacking)

In all there are 410 different options. While working the rice to size 15 and mixing all farms to size x and switching to cottaging.
Of those 410 options your option is 99.44% of my 'optimum', in total 135 (32.9%) of those 410 are within that top 0.56% of total commerce. I.e. losing 43 commerce or less.

So it would seem that the formula brings you atleast very close with no buildings. Presuming 70% science...
What about starting a city from scratch and whipping in a Granary? (cannot be bad IMHO)
What about even adding a Library?
And a University? Is that usefull?
Observatory what about that one? Usefull?
All depends on time available I think...

Granary
Granary Whip (2 pop) at size 4, turn 19 (which seems optimal for growing)
On all farms to size 15 you reach size 15 in turn 54 rather than turn 68, that is an overall gain of 14 turns... which cannot be a bad thing.
Due to the catch up time of the 2 pop whip the whipped city is actually smaller than the non-whipped city during turns 19 - 36, in turn 36 both cities are size 7 and the granary city starts gaining.

This appears to have a optimum at:
Farm everything up to and including size 10
On the first turn of size 11 only work 3 farms ( + Rice + Cottages )
Then switch to all cottages
Switch the rice to a cottage 4 turns before growing to size 15.

2237 Cottage turns for 8.301 commerce. That is 664 commerce gained by whipping the Granary.

Library and University to follow.
 
Back
Top Bottom