Intercity resource trading

Wimsey

Warlord
Joined
Jul 24, 2007
Messages
127
Location
Norway
I have lately been thinking about a system for making resources, food inparticular, flow naturally to cities where they are most in demand. Mxzs' economic model http://forums.civfanatics.com/showthread.php?t=227872
is loosely the basis for this.

Instead of a citizen working a tile, let's say each citizen produces an amount of workforce, for example 5,00:strength:. Resources from tiles can be aquired by spending workforce, and the amount depends on terrain, which resource and improvements. Getting a :food: from a flood plain could cost 2,00:strength:, or 4,00:strength: from a plain. For the purposes of this post the :strength: can freely be turned into :gold: (this is not how I imagine it to turn out, but that's for a later post to explain if ever)

Now I want to give each hex (Yes, hex. I believe a hexagonal grid is needed for this idea to work properly. And incidentally, it looks and feels much better;)) a "transport cost", for example:
River: 0,05:traderoute:
Coast: 0,06:traderoute:
Road: 0,15:traderoute:
Land (Unimproved): 0,50:traderoute:

As a resource is transported, their transport cost is expended from the workforce of the buying city. I'll explain with an example:

In populous yet hilly Rome, 1:food: is worth 4,00:strength:. In fertile Alexandria the same 1:food: is worth 2,00:strenght:. Rome is 15 coast hexes away from Alexandria so the total cost of buying the :food: is
2,00 + 15 * 0,06 = 2,90:strength:
This is cheaper than local food, so Rome will import grain from Alexandria.
If this had been a roaded land route the total cost would have been
2,00 + 15 * 0,15 = 4,25:strength:
and no deal.

Since I think trade should be positive for both cities, they should share the gain equally:
The in-between of 2,90 and 4,00 is 1,10.
So Rome pays Alexandria 2,55:gold: (2,00 + 1,10 / 2)...
Alexandria expends 2,00:strength: to farm the:food:...
Rome expends 0,90:strength: (15 * 0,06) to bring the :food: home...
Alexandria has now earned 0,55:gold: from the transaction, and Rome has saved 0,55:strength: compared to what the local food costs.

Note that the Roman citizen doesn't go to Alexandria to farm himself, he pays Alexandria 2,00:gold: to make an Egyptian do it. Alexandria can then use the gold it has earned to buy resources of their own, for example Italian wine..

This trade model leads to the possibility of having large cities in arid areas, breadbasket cities to supply your empire, and cities that get rich from selling goods. Yet it limits the trade early on, as the transport costs will be very high initially, and then get significantly cheaper as you advance technologically. It also makes city placement more strategic, as rivers and oceans will be the be mode of transport at least until railroads. And you have to protect these routes from barbarians and enemies.

I also believe this transport cost model could be a way of getting rid of the fat cross once and for all... :rolleyes:

I have expanded this trade model significantly in my head (luxury resources, army supply, intermediate traders reaping off the rewards), but I'll outline the basic idea first to see if there's any positive response;)
 
This sounds excelent. I intend to return, give you more (well, some actually; this barely counts as a thought)

EDIT: I presume this would be automatically done, right? Well, under merchantalism, you could make the player micro-manage every foreign trade route- and under state property, make them do every single one!
 
Since I think trade should be positive for both cities, they should share the gain equally:
The in-between of 2,90 and 4,00 is 1,10.
So Rome pays Alexandria 2,55:gold: (2,00 + 1,10 / 2)...
Alexandria expends 2,00:strength: to farm the:food:...
Rome expends 0,90:strength: (15 * 0,06) to bring the :food: home...
Alexandria has now earned 0,55:gold: from the transaction, and Rome has saved 0,55:strength: compared to what the local food costs.

Note that the Roman citizen doesn't go to Alexandria to farm himself, he pays Alexandria 2,00:gold: to make an Egyptian do it. Alexandria can then use the gold it has earned to buy resources of their own, for example Italian wine..
This section I don't understand. What do you mean by the 'inbetween'?

Maybe the best system for this (sticking just with food) would to be to partly separate population growth from food. Allow people to starve, but say that if there's a surplus (of any size) there will be growth; at constant rate.

'Grow' would be pre-selected as a target for the city; so the city would try to keep a surplus of food (but as small as possible, as the marginal benefit drops to 0 for all food past (population*2+1).
After that the city would try to maximise its profit (I think it would be easiest to trade goods for money, then money for goods, rather than goods for goods. Keeps accounting easier) by selling the food to other cities. Starving cities would obviously have a high marginal utility(which can be calculated :)). After having 'basic supplies'- maybe one :food: per population food wouldn't be so useful; the starvation would be slowed considerably, or maybe their productivity would just fall.

A city with :food: = 2*pop. would have a moderate demand for food.

And you could devise supply and demand diagrams for food! (and later other wares!) Actually, we don’t need to for the moment, it can be done on the spot (because each population point is assigned individually, decisions really are made on the margin)

To your example...

I think you need to separate the marginal utility from the marginal cost of a unit. So saying ‘one :food: is worth 4:strength:, and they’ll import if it’s cheaper, implies that they’d import if it cost them 50:strength:, but only 40:strength: domestically. This might be the case for food (gotta eat…) but it’s unlikely to be so for anything else; and keeping one system would be best.

Ok, so we’ll assume cities act rationally to maximise profits (which can then be taxed, or used to invest). We’ll need some more information here…

Rome currently has :food:=2*pop. One more :food: will cause growth in 10 turns.
Assume a discount rate of 10%.
Let the current wage rate is 10:gold: per population point. (or 2:gold: per :strength:)
Let P=Price of food.
The interest payments have to be smaller than the return for it to take place. Where they are equal is the marginal utility. The return is 10:gold: - P*2 (taking into accounts variable costs)
The interest rate is the result of a geometric series.
a = P (Price of food)
r = 1.10 (discount rate)
n = 10 (turns)
Total cost of growth = a(1-rn)/(1-r) = 15.937P..
And so the turnly interest is 15.937..*0.10 = 1.59P

So 10:gold: - (price of food)*2 = 1.59*price of food*
10 :gold: = 3.59*price of food
10/3.59 = 2.78:gold: = marginal utility of food.

Or, if a man can live on one bread a day,
So (wage rate for hungry man=h):gold: - (price of food) = 1.59*price of food*
h :gold: = 2.59*price of food
h/2.59 = :gold: = alternate marginal utility of food.
The actual marginal utility would be whichever is higher.

The calculation as to the utility of the food before last (one involved in feeding a man) is a lot easier, because we don’t have to deal with the interest rate.
10 :gold:=2*P
5 :gold:=P
So the marginal utility of the food before last is significantly higher.

 
Now, to the marginal cost of that food.

If 1:food: requires 4:strength: to produce in Rome, it has a cost of (4/5 population points) * 10:gold: (wage rate) = 20:gold:. Basically it’s not worthwhile Rome having any more farmers. I think this cost is too high: a population point in civ iv, working a farmed grassland, could expect to make 3:food:.
I think 6:strength: to one pop. point would be more sensible, as its more divisible. If we adopt 6:strength: = 3:food:, 2:strength:= 1 :food:
10:gold: = 1pop = 6:strength
5/3 (1.67):gold: = 1:strength:
10/3 (3.33):gold: = 2:strength: = 1:food:
Which is slightly higher than 2.78:gold: = marginal utility of food, so that farnmer will not be farming, and that :food: will not be created in Rome. Even if Alexandria didn’t exist, it just wouldn’t be worth their while. It is worth their while, however, to create the last bit of food, because that one’s marginal utility was 5 gold.

If we add in Alexandria, with, I presume, the equivalent of irrigated floodplains and a lower wage rate (province rather than metropolis), the story changes slightly…

Assume the wage rate here is only 6:gold:
6:strength: = 4:food:, 3/2:strength: = 1 :food:
6:gold: = 1pop = 6:strength
1:gold: = 1:strength:
3/2:gold: = 1.5:strength: = 1:food:
Which is significantly lower than 2.78, the marginal utility of food in Rome. Presuming no transaction costs (obviously false, but this is just an example) Alexandria will grow food. (Whether this will go to Rome, Alexandria or elsewhere will depend on their marginal utilities for :food:. We could, if we wanted, calculate Alexandria’s, but I don’t feel like it.

(I’ve assumed no other reasons for demand for food throughout; no luxury feasts etc.)
 
Throughout this whole discussion, I’ve left out the issue of how the wage rate is determined. The wage rate (presuming all labour is homogenous, as it seems in civ) is determined by the intersections of the supply and demand curves for labour. It could be re-calculated each term, so the relevant ones are the short-term supply and demand curves for labour.
I don’t know how to upload pictures, sorry.

We can assume the short-run supply curve for labour is vertical. In the short run, there’ll be no migration, and it’s hardly rational for a city to have its pop points idle. In the long run, workers would move from low wage rate cities to high wage rate cities (the influx of whom should raise and lower the wage rate respectively, so no unlimited migration, for this reason at least)

Demand is more complex. Hang on, no it isn’t!- well, not by much. The demand for the first :strength: is equal to the amount of income that :strength: can create (so in a high-capital city, it will be higher). This will probably be very high- in Rome it might be running a bank. Then each successive :strength: will have a lower value, creating a downward-sloping demand curve.

Where the two curves intersect is the wage rate.

The long-run supply curve of labour is sloped for two reasons. Firstly, a high wage rate should make it worthwhile to buy more food, causing population growth. This is only a very minor effect though (Malthus wasn’t right). More importantly, thus far we have been assuming each city acts rationally. Next, we assume each Population point acts rationally!

We’ll assume that population points gravitate towards the cities with the highest expected wage (basically the wage rate, adapted to take into account their odds of unemployment and education. The odds of unemployment would be lower for highly skilled population points, and their wage rate might be higher.) (Woo, rational expectations!). Moreover, they go if the expected increase in wage is greater than the interest on the cost of getting there. The cost of getting there is not simply the same as the cost of moving resources. To this, we have to add the cost of wages forgone by travelling (another geometric), any entry or exit fees, and a final percentage of the cost again, because people are risk-adverse, especially when moving region. This would be increased by enemy soldiers, risk of the ship sinking, economic upheaval (in the target city mainly) and any boarder-police. (If the population point cannot afford the fees to get in, they will attempt to sneak in. What this means is that if the cost of moving is higher than the benefit paying the fees, the population point will estimate if the cost is significantly lowered by becoming an illegal immigrant).

All these additional costs should help to prevent massive movements of labour. And don’t forget, as they move they depress the wage rate; disinclining their ex-countrymen from following!

To stimulate the downwards-stickiness of the wage rate, it can only fall by 1:gold: per turn. If you were to have unions, or government interference, it would fall even slower. This will allow unemployment :)

Education, investing in a workers human capital, could increase :strength: per pop. Point (or at least for some. A trained engineer might get twice as many :strength: when using them on a mine or factory)



I recommend to anyone interested in economics Price Theory: An Intermediate Text
By David D. Friedman
Published by South-Western Publishing Co.
©David D. Friedman 1986, 1990

Taking a course in Economics at A level would be an excellent idea for anyone; it ain’t this complicated!
 
Quite honestly, I think this is too confusing for new players.
 
Quite honestly, I think this is too confusing for new players.
Really? Do new players all understand the python?
The beauty of economics is you don't have to understand it, it just works (so long as you leave it alone, same as the code).

Now, when you start trying to boost your exports and running expantionary budgets, then would be a good time to learn what you're doing.
 
Thanks for your feedback, it's funny how we think very much alike. My biggest problem with this economy model is also determining the wage rate in each city. Maybe on the basis of how much each citizen earned on average the few previous turns(s)? As to city growth, I woould like to make that separate from food surplus, as I think that is getting too old for Civ V. Maybe relate it to happiness level/wage rate/etc. instead?

My economy model is unfortunately far from finished, but I believe I have an interesting base model going.. I wil be offline for a month now (being in the army. sigh..), but I'lll see if I can come up with something in the meantime.

To squid: Yes, it will be complicated, as I intend it to be. I would like civ V to be a contrast to revolutions, far more complex and realistic game.It will however have to be more or less fully automated, otherwise you're in micromanaging hell.
I envision the player should be able to regulate trade by taxing different goods, or denying trade altogether. The ability to do so will depend on your current civics.
 
Alike thinking
Well, I’ve had a year of Economics, so I suspect anyone with more would be pretty much dead-set on realistic economic representation.

Wage Rate determinants

I’ll think. I think the system I described should work. More skilled labourers would have a separate wage rate. I think we could have a limited number of ‘professions’, like

Slave (only 4:strength: )

Engineer, apprentice
Engineer, skilled
Engineer, metalwork specialist
Engineer, mining specialist
Engineer, machinist

Artist, apprentice
Artist, skilled
Artist, celebrity
(into musicians, painters and writers after the appropriate technologies)

Scientist, graduate
Scientist, researcher
Scientist, theorist
(And into chemists, physicists and biologists after the appropriate technologies)

Monk
Priest
Bishop
Cardinal

Merchants wouldn’t exist, as their role is now automated

Banker
Comodities trader
Venture capitalist
Etc.

Economist

Philosopher

Teacher
(other types of skilled workers would teach particular subjects, teachers are basically primary school level)

Then again, maybe this is too much. :S We would need huge populations, it should be about 10 max. But I suppose each city doesn't need to have every one...

Growth

I agree with you basically: a bumper harvest doesn’t promote breeding particularly :) But I think there ought to require a surplus, to represent their being enough food to prevent malnutrition. And if people have enough food to survive, they can turn their minds to more (re)productive pursuits.

What does determine population growth? Besides immigration.

Government interference
To be honest with you, I think we could get rid of economics civics. Give the player the options to ban, subsidise per unit, subsidise to a certain cost (keep :food: at 1:gold), tax at a flat rate per unit, tax as a percentage of costs (rising prices increase revenues on goods with cost-inelastic demand), tax with different brackets (for socialists to wield on income), adjust to a certain level (subsidise or tax! For control freaks), install price ceilings and floors through price controls, and quality regulation. Oh, and quotas. This would allow you to be free marketers who were acting under the influence of a strong farm lobby, or communist planners who needed to allow in foreign fish-vendors to prevent mass starvation. Oh, and Nationalisation? Tax on profits…

Each control would have an admin cost of course, and potential increase crime/corruption/maintenance.

Good luck with whatever you’re doing in the army.
 
Wow, that's out of the box.

Here's a system closer to civ 4, that I thought a couple of years ago:

I never liked the idea of trade being generated out of thin air, a commodity must move.

Each trade route is clickable. Options are general trade (current civ trade mechanic), send or recieve food or production, which is followed by a pop-up target city list. For your initial example, you go into Alexandria, click on a trade route, select "send food" and then select Rome. Then an amount of food (could be determined in a way similar to how civ currently determines the amount of trade per route. Perhaps exactly the same without foreign/intercontinntal bonuses) is sent to Rome from Alexandria, an equal amount of gold is sent to Alexandria, and an equal amount of trade is generated in both cities.

So basically I'm saying keep the current system but add the option to transfer food or production between cities that players specify.
 
And then I tell alexandria to send the food back, generating gold for Rome, and commerce for both cities, leaving me with lots of free commerce and gold? :p
 
And then I tell alexandria to send the food back, generating gold for Rome, and commerce for both cities, leaving me with lots of free commerce and gold? :p

The rule of the existing system that you can't have multiple trade routes between same two cities remains, preventing that abuse.

The food or production transfer that I suggested takes up trade route slots, so nothing is free.
 
tl;dr
Civ4 doesn't need advanced economic models, go play Capitalism II.
 
The rule of the existing system that you can't have multiple trade routes between same two cities remains, preventing that abuse.

The food or production transfer that I suggested takes up trade route slots, so nothing is free.

Ahh, true. But you could still send it one-way then back. Or, infact, Rome-Pompei-Alexandria-Athens-Rome-Alexandria-Pompei-Athens etc.
Your idea certainly seems an improvment, becuase commerce shouldn't be magiced from nowhere- but private firms and individual's trade isn't represented except in the commerce it offers. Hammers and food are the tools of the state- the true wealth-creating sectors are only represented in terms of the taxes they generate.

From what I gathered, Capitalism II allows you to play the role of one entrepenur, not a leader. This is macroeconomics, that is micro.
 
Rome-Pompei-Alexandria-Athens-Rome-Alexandria-Pompei-Athens
I bow to the master abuser :)

private firms and individual's trade isn't represented except in the commerce it offers. Hammers and food are the tools of the state- the true wealth-creating sectors are only represented in terms of the taxes they generate.

I agree, but I never liked the logic of civ that each city has to produce its own food, which is never the case in reality. That was the main reason I came up with that idea of a trade system where you can send food.

Well, with the current system, at least merchants generating food could be viewed as food brought from other cities.
 
Well, with the current system, at least merchants generating food could be viewed as food brought from other cities.

The Great Adam Smith, having failed to bring about the end of the Corn Laws, turns his hand to importing bread... from nowhere... :)
 
Several good ideas here to increase the need for micromanaging.:sad:
Earlier incarnations of Civ required you to specify where and how to trade specific goods. Civ4 got rid of this and good riddance. In the end it just produces commerce, so why would a player want/need to mess around with this? Much easier to let the computer do the math.
Civ is about being a leader of a civilization, not an accountant. :king:
 
All my posts (before the one beginning 'alike thinking' involve no management at all, micro or otherwise. The computer builds buildings, improves terrain and trades resources all by itself.

You can interfere if you wish, to tailor you Empire to your own desires, but at a cost to efficiency.

Micromanagement is punished, not rewarded :)

Additionally, I've thought of a way to simulate civics. The spread of communism would give you extra happiness from nationalization and spending, Adam Smith would make tariffs cause unhappiness and so on. The economic systems predated them, so you would impliment those refroms before if you wished (and had the basic infrastructure) but the changing tide of world opinion affects how happy your people are with you.

Potentially leaving you with a choice... be an elected leader, but suffer the whims of the people, or a dictator :)
 
Or play civ 2 with the food caravans. I prefer the idea of each city operating within it's own BFC. It is a system of checks and balances. High food=Low production (except slavery) Under your sytem it would come down to a few Uber cities rather than many specialized cities. Your production, food, commerce would end up being the sum of all cities distributed as you see fit. The same result could be obtained without complex trade routes. Quite simply have a food total, commerce total and production total for your entire empire. Then assign each one to cities as you see fit.
 
All my posts (before the one beginning 'alike thinking' involve no management at all, micro or otherwise. The computer builds buildings, improves terrain and trades resources all by itself.

You can interfere if you wish, to tailor you Empire to your own desires, but at a cost to efficiency.

Micromanagement is punished, not rewarded :)


:)

Then what does the player do? Just build units and wage wars? And unless you completely overhaul the Ai, then basically you're talking about letting the city govenor run your cities. That may work on noble and below but it's a recipe for disaster after that. Because the computer will do exactly what the Ai opponents do, the difference being the Ai has research, growth and production bonuses. So you're just doing the exact same thing at a slower pace.
 
Top Bottom