I’ve been working on a basic simulation for market economics for a little game I’m putting together.
In the game, there’s commodities, and “villages” where people produce and consume commodities.
Let’s use rice for an example. The villagers make a certain amount of rice, which goes onto the market. A certain amount of rice is available in the storehouses of the village to be traded about. Villagers and outsiders buy rice and eat it, and villagers and outsides bring in new rice and sell it.
So you have three variables here : Rice_IN, Rice_Out, Rice_Stored.
Well, I thought about it, and realized that the village has a “setpoint” for how much rice the village should have in it’s storehouses at any given time. If it’s the start of winter, the village needs full storehouses, while at the end of winter they should be near empty, and during the growing season the setpoint should change according to a linear curve between the start and end of the growing season.
The “price” for rice is a signal for how much rice “should” be in the village’s stores. If the stores are low compared to the setpoint, the price should be high, and if the stores are high, the price should be low.
The way most economies work, all the buyers and sellers hold various auctions to determine the market price. But why determine the price this way?
Instead, decide on your “setpoint” for the total amount of goods that should be on hand. Use a PID control algorithm to determine the “price” most optimal for keeping that setpoint.
This should work reasonably well for my little game, but this got me thinking…
What would happen if you tried to control market prices in the real world this way? You don’t get the classic shortages and surpluses you get with normal “price controls”, because if there’s a shortage, the price will go up, and vice versa.
Technically it still uses people’s preferences in that demand at any given price will determine the actual flow of goods. I suspect that using the PID algorithm instead of bid/ask would remove some of the irrational things current markets do. For instance, if actual supplies of a given good are still plentiful, but there’s bad news for the future, the price would not skyrocket.