Economy handled solely by you -> AI-handled Bartering -> AI-handled Money -> AI-controlled Crown Operations (socialism)
Basically, at first, the player handles the entire economy. They decide what structures to build, what housing to upgrade and what everybody gets from the stockpile. Later, the player can place certain industries (such as farming) under AI control so that they can cope with more macro concerns (such as colonization, trade, war, exploration etc). The AI script for despot-run economy is simple, just follow the commands of the player. The AI for money was coded and works somewhat as expected (the market seems too unstable but not sure on that without closer analysis).
In order to show why bartering presents greater difficulty in coding, it's better to explain through why money is easier for AI scripts. First the AI scripts assume everyone is rational and is out to maximize their money (classical/keynesian economics people should squee with joy). With money, a person would then work, place their product on the market and then proceed to raise/lower the price according to how well it sold. If it sold poorly, they would lower the price and if it sold well, they would raise the price. If a person makes multiple types of goods, they can sell each at a different price according to how well each sells. They then use this money to buy what they need (food, housing, materials to continue their job, etc).
Bartering requires that the person match up their needs with another person needs. Without the concept of money, the AI script has to be more discerning about what trade it conducts and reject certain deals. Imagine for instance a world populated solely by farmers, iron miners and blacksmiths. A farmer wants food and tools. An iron miner wants food and tools. A blacksmith wants food, iron and tools. So what how much does a blacksmith exchange food for hammers?
Here's my current approach.
First, whatever a person produces, he considers that as currency. So for a blacksmith, hammers/swords, what he can produce, is currency to him. Next, he wants to have food and iron. He produces hammers so he need not purchase those.
Let's pretend that the production rates are as follows...
Farmer: 100 food/day
Miner: 50 iron/day
Blacksmith: 10 hammers or swords/day
So initial pricing for the blacksmith would follow this idea. He can produce, at maximum, 10 hammers or swords a day. So at maximum he requires 10 food, 50 iron (for 10 swords or hammers) and also 1 hammer. He produces at maximum 10 swords or hammers each day. Logically, 1 hammer should trade for 1 hammer, which leaves the blacksmith with 9 swords or hammers to trade.
Next, the blacksmith looks at the labour cost of the goods required. So, 50 iron is 1 day's work and 10 food is 1/10th of a day's work. So in total the blacksmith requires to exchange 11/10 days work for his 9 hammers. He then attempts to split the hammers across the different goods according to the labour required of each. Thus,
(Rounding to nearest positive integer)
8 HammersSwords <-> 50 Iron
1 Hammer/Sword <-> 10 Food
So the initial prices for a blacksmith is,
(Rounding to nearest positive integer)
1 Hammer = 6 Iron
1 Hammer = 10 Food
Afterwards, the blacksmith treats barter pricing the same as other pricing, albeit with a lot more things to keep track. Since bartering is used while most of the economy is still run by the despot, there's only a few things that a person will track exchange rates for and thus keep the list short. Bartering quickly converts into a money-based economy (typically with food as the starting medium of exchange). So, much like money-pricing, when an individual finds that hammers to iron is selling poorly, then the person lowers the ratio (less iron per hammer). So rather than the overall price being changed, each individual exchange rate must be tweaked.
Much more complicated and time-wasting for an individual, is that they must reject trade which does not provide them with the goods they require. So, for instance, if someone where to offer the Blacksmith some clay for his hammers, he would reject it, as clay is useless to them. By having individuals keep track of the item for trade that is most used/rejected, societies develop a consensus on the most appropriate medium of exchange. Usually this is whatever food is consumed by society since by definition, every single person needs food. This is probably why all early societies used food as money.








--
I am a Star Wars Fan, Warsie Here
Real Nigga Representin' Da Souf Sydeee of Chi-City
--
Inverse Ninja Law
I'm gonna grab everything I can!
--
Inverse Ninja Law
Look at this game trailer: [link]
I love that thing she does at 1:02-1:03 - it's so sassy
--
Inverse Ninja Law
GRABBIN PEELZ!
--
Inverse Ninja Law
Thank you for the fav! ^_^
--
I like training Kendo. I'm sure Kendo is a noble martial art.
--
Inverse Ninja Law
Previous Page12345...Next Page