After a bit of philosophical debate with my pillow, i came up with an economical model for the process system.
The problem: we have compounds, and processes that turn some of the compounds into other compounds. We want to know how much of each process we want to make in order to get the most useful compounds possible.
My propossed solution: we give each compound a supply value, a demand value, and use them to calculate a price. Each “useful” compound (as in the ones that have a final functionality in the game, like ATP and oxytoxy) would get their demand or prices inflated by some arbitrary value. Each process would then try to generate the most profit possible by transforming compounds (think of process as factories, buying raw materials and transforming it into more expensive stuff to then sell).
A big problem with this would be that the profits are linear with the amount of stuff converted, so the process would always be either turned off completely or working at max capacity. Some smoothing function (maybe based on future predictions about the effects of the production to the compound prices?) could fix that issue. Or having some other cost in the process.
The supply values are the easiest to deduce: it’s how much of each compound the microbe has (with maybe some future predictions if we feel like complicating stuff).
The demand and price, however, are more complicated, since they strongly related to eachother, and i dont’t know how to calculate them, or if that is even possible.
However, we could start giving some placeholder price to each compound and adjust it overtime according to offer and demand values, with the demand being fixed by the processes.
So, at each update interval, the prices of each compound would get lowered or increased depending on whether the supply was lower or greater than the demand of said compound.
Then each process would adjust it’s transformation rate to maximize it’s profits.
There are some problems with this model though:
This does not account for storage space. Having the price reduced by some “storage tax” or having some fictional “storage compound” could help with that, i guess.
There are some inefficiencies in the system, generated by the prisoner’s dilemma. Having some sort of Cournot competition could alleviate the problem, but that could be getting to complex for what we’re trying to achieve.
The smoothing function has to be easie to both calculate and minimize.
Any thougths about this?