onomastikon wrote:I've let a game run on for as long as possible, and I've noticed that NONE of the AI factions ever, ever has any metal and ever, ever has any use for its tons of superfluous money. Even the poorest AI factions on the brink of extinction have huge sums of cash and, apparently, cannot figure out how to spend them.
Certainly the AI will run into the same problems that the human player has, namely, there is not enough metal, no matter what you do, to use the production hammers you have to produce the things you want which require metal, which is basically everything.
Coming across this thread is really amusing for me, because I ran into the exact same problem myself and went about solving them around half a year ago
Solving this problem with how the AI mismanages its metal economy was in fact the initial goal of the economy AI overhaul I worked on a while back.
The main cause of the problem was twofold:
1. Above all the other causes, the primary problem was with how the AI chose what ships to build. The economy AI would look at all the available designs and choose
the most expensive one to build. If you think about it, it's kind of an anti-optimal strategy.
2. The AI had no awareness of metal as a distinct resource from industrial production (hammers). The AI was evaluating the build cost of ships by using hammer cost + metal cost. This is a grave mistake for the AI, as the two are not interchangeable and cannot simply be added.
I was able to correct both issues by recognizing that the fundamental resource that underlies both hammer and metal income is
time. Hammer and metal income by itself has no intrinsic value, and the hammer and metal cost of ships are only meaningful to the extent that they bottleneck our ship production.
Anyways, there were two conclusions:
In the case of (1), we recognize that we want to build up our military power as fast as possible, whether it is because we want to replenish our losses, catch up to rivals, or maintain superiority. In all cases we benefit from building the ships that have the greatest
combat power/cost, NOT cost!
In the case of (2). As mentioned above, hammers and metals have no intrinsic value by themselves. Therefore, the "cost" in the "combat power/cost" metric we developed above must be specified in terms of
build time. Again, time is the fundamental resource that allows us to unify hammer and metal cost.
There's a third point, that was also needed to really solve the issue: If, due to limited metal income, we can build at most 10 ships in 10 turns, we don't want to be building them on 10 separate planets if it will take the same amount of time to build them on 2 or 3. The other 7 planets can then be freed up to e.g. build improvements, or use e.g. research/trade/mining focuses.
There were also several other improvements to the economy AI, but what I've mentioned here seemed sufficient to prevent the AI from strangling itself on metal shortages (in fact, I then had to deal with the AI being swamped with metals it wasn't utilizing
).
However, I encourage you to check out the improved AI yourself and let me know what you think.
On Steam, you can access the testing branch using the code "alphatesting"