The approach I am using in my current prototype for a space economy simulation is quite simple. Each trading entity keeps track of how much it has of each resource over time. When the amount of a resource increases over the past x minutes, lower the price. When the amount decreases, increase the price. That way each trading post will reach an equilibrium price where supply and demand will be equal and the stock will stay constant. This, of course, relies on two features you need in your game: * It relies on trading. You need lots of agents in the game world who try to make a profit through trading. These can be either human players or AI actors. * It relies on production output and consumption input adjusting to price developments. When production and consumption never change, then all prices will over time either go to the minimum or the maximum, depending on whether overall supply or demand is larger across the whole game world. So you need a dynamic economy system where the actors adjust their productivity depending on the profitability of their business. When the price for raw materials is low and the price for products is high, then that industry has to grow. When the raw materials are expensive and the products are cheap, that industry has to shrink. This can either be done by allowing agents to build (and destroy) production facilities or by having any automatic resource siphons or resource drains in the game adjust their output over time to the current prices.