Strategic Resource AI Valuation Rework

axatin

Prince
Joined
Jul 24, 2022
Messages
479
We had an earlier discussion about the AI's valuation of strategic resources, see this thread. As explained there, when calculating the valuation of an item of a SR, the AI basically uses an era-dependent base value, applies some resource-specific modifiers (double value for uranium, don't sell aluminum if going for SV etc.) and then calculates the valuation of each resource item in the deal based on the number of excess resource items. This is obviously very different to how a human player would think and it's an approach that's not suitable for getting a realistic resource valuation.

I think a complete rework of that logic would be needed, and I'd like to use this thread to discuss a potential outline of it.

The general idea would be that AI valuation of a SR is based on the question how many items of the resource the AI needs and on how strongly it needs them. So, I'd like the AI to evaluate the following questions:
1. Which buildings that require the SR can/could we build in our cities, and how valuable are they to us?
2. Which types of units that require the SR can/could we build? How valuable is each unit of that type and how many of them do we want?

Evaluating these questions gives us a list of units and of buildings in cities together with an estimate of their value. (example: we want to build 3 more lanciers and we want to have an agribusiness in 2 of our cities)

Selling logic:
1. We don't sell resources it the number of excess resource items left would be lower than the number of items we want to build. (when calculating excess resources, we only include the items we actually own, not those we're importing)
2. We charge a high value if we'd be left with only few excess resources more than the number of items we want to build, otherwise we charge a low base value.

Buying logic:
1. We take the list of item valuations from above and remove the n entries with the highest valuation, n being the number of excess resources items that we currently have. This leaves us with a list of valuations for the buildings/items for which we'd need to buy resources from someone else.
2. We use that list to determine how much we'd be willing to pay for each item of the strategic resource in the deal. We pay nothing for resource items we have no use for.


To determine the valuation of the items in the list:
We use the weighting that is also used by the AI to determine what to build next in a city. This should make sure that Train Stations are valued higher than Agribusinesses, that unique units have a higher value than normal ones, that units are more valuable while at war, and so on. For a building, we also take into account the economic weight of the city we're considering to build it in. The number of units we want to have would depend on how many units we're below the supply cap.

This is only a first draft of how the logic could be and a lot of details are still unclear and need to be worked out. I'd like to hear your thoughts on the general approach, and any ideas for improvement are welcome.
 
To determine the valuation of the items in the list:
We use the weighting that is also used by the AI to determine what to build next in a city.
While city production logic is better than in vanilla, it still has issues. I'm skeptical.

This approach also sounds like a lot of work.
 
There's still the case of already lacking resources.
In the case of buildings, it increases the maintenance cost so the buy value should be less than or equal to the extra maintenance.
In the case of units, they should value it higher if at war. Not being able to heal is a big problem.
In the case of nukes, it literally doesn't matter.
 
Top Bottom