Real Strategy (AI)

Real Strategy (AI) 2.3.1

Thanks. Tedious, yes. And trial/error is not really efficient here...
 
Hi @Infixo I got a modding question about your changes in regards to "AiFavoredItems" and Resolutions. Do you know how the AI reacts in regards to Option A vs Option B?

For example you have these two lines:
('ScienceVictoryResolutions', 'WC_RES_PATRONAGE', 1),
('ReligiousVictoryResolutions', 'WC_RES_PATRONAGE', 0),

Does this translate to the following choices when WC_RES_PATRONAGE is up in the WC?
-Voting option A when following VICTORY_STRATEGY_SCIENCE_VICTORY
-Voting option B when following VICTORY_STRATEGY_RELIGIOUS_VICTORY

I'm working on a remake of the World Congress, but want to understand how to make the AI "understand" the changes, and you seem to have already done some work in this area. Thank you for your time.
 
Last edited:
@Nerevatar tl;dr Hopefully yes :)

Long answer
Since there is no documentation nor source code available, we can only guess and deduct.
AiFavoredItems (ListType, Item, Favored, Value)
My understanding is that "Value" is percentage-based and you can tune preference like +25% etc.
Favored is like a binary choice, but not hard, rather "strong incline/disincline". Maybe once we get to see the code it will turn out that it is a strong yes/no, but now I'd rather go with "preference".

Then, there is no connection between them, you need yo actually test to see which parameter is used in which list and make sure it works.

Since Firaxis uses Resolutions so I assume this type is handled. They are using Favored, so this field should matter.

And my assumption is that "1" means more-or-less "this is a favored option" and "0" means "don't go there".

So, for WC_RES_PATRONAGE and my mod I wanted this to be preferred option when following Science Victory and no-go for Religious victory. Other victories - no preference.
 
@Nerevatar tl;dr Hopefully yes :)

Long answer
Since there is no documentation nor source code available, we can only guess and deduct.
AiFavoredItems (ListType, Item, Favored, Value)
My understanding is that "Value" is percentage-based and you can tune preference like +25% etc.
Favored is like a binary choice, but not hard, rather "strong incline/disincline". Maybe once we get to see the code it will turn out that it is a strong yes/no, but now I'd rather go with "preference".

Then, there is no connection between them, you need yo actually test to see which parameter is used in which list and make sure it works.

Since Firaxis uses Resolutions so I assume this type is handled. They are using Favored, so this field should matter.

And my assumption is that "1" means more-or-less "this is a favored option" and "0" means "don't go there".

So, for WC_RES_PATRONAGE and my mod I wanted this to be preferred option when following Science Victory and no-go for Religious victory. Other victories - no preference.

Yeah a lot of guesswork is needed, which makes sharing experimental data all the more important :) thank you.

Have you tested this, or is it more based on intuition/gut-feeling and a general knowledge?
 
The mod seems a bit outdated with the pace of the patches, how does it work lately? I can imagine AI changes to the vanilla game can make conflict with RTS
 
It still works, haven't played without it since the start of the NFP, so I can't really compare. But I have noticed that the AI in youtube fan streams still look less competent than with this mod on. However, the mod has not been updated for a while so it is not in sync with the new updates. And newly added civs probably haven't been assigned their victory disposition yet. Maybe the modder has lost interest smh. And to be fair, the mod seems like a lot of maintenance, especially with updates coming out every month. Maybe the creator will give this mod a big update when NFP is finally done.
 
I played this mod with Warfare Reloaded and saw some really good results with the simulation. Just no nuclear wars?
 
Hey, I noticed your planning on updating the mod, I ran a few games and here's some feedback,
not sure how much of it you can or cant address.

- AI doesn't prio campuses enough anymore, even those with special campus districts (main issue with the mod honestly)
- The AI is fast to settle good spots, but sometimes settles slightly too far away from their other cities to settle next to a natural wonder
(losing too much loyalty or behind/next to another civs city)
- When I spectated one game, many AI didn't actually take a tier two government.
- Sometimes the AI is slow/doesn't build walls, feels worse than the base AI at building them.
- Have never seen AI use a nuke (in base game either)
- AI builds lots of units, including planes later on which is good
- AI is overall better at war and defending themselves
- AI wasn't targeting trebuchet when defending as it would target a catapult. (new unit maybe?)
- no issues with war declaration or passiveness, its the same as the normal AI

I have also tried it on multiplayer and ran into a lot of desyncs after the early game. Might be worth looking into because we did not have huge desync issues before all the updates
 
@croco235 Thanks for the feedback. Please find my comments after =>


- AI doesn't prio campuses enough anymore, even those with special campus districts (main issue with the mod honestly) => This can be addresses by the mod. Priorities need to be adjusted.
- The AI is fast to settle good spots, but sometimes settles slightly too far away from their other cities to settle next to a natural wonder
(losing too much loyalty or behind/next to another civs city)=> I need to adjust the settling params. FXS did some updates here.
- When I spectated one game, many AI didn't actually take a tier two government. => Cannot be solved by a mod, DLL stuff.
- Sometimes the AI is slow/doesn't build walls, feels worse than the base AI at building them. => Can be adjusted in the mod.
- Have never seen AI use a nuke (in base game either) => I've seen maybe once. This is mostly DLL issue, I don't think this can be solved via a mod.
- AI builds lots of units, including planes later on which is good => That is a good news!
- AI is overall better at war and defending themselves => Also a good news!
- AI wasn't targeting trebuchet when defending as it would target a catapult. (new unit maybe?) => Tactical level is in the DLL - cannot be addressed by the mod. But I'll see how trebuchet is defined, a unit needs a proper definition to be properly handled by AI.
- no issues with war declaration or passiveness, its the same as the normal AI => War triggering is DLL-level stuff, cannot be changed by a mod.

I have also tried it on multiplayer and ran into a lot of desyncs after the early game. Might be worth looking into because we did not have huge desync issues before all the updates => I got some reports on Steam, however I am not playing MP at all. And have no idea where the issue might come from, as there are no random functions used (main cause of desyncs). Maybe it's the overall mod complexity as there is a ton of logic here.
 
Do you know what AI_BASE_LUXURY_VALUE in GlobalParameters stand for?
Nope. If I had to guess - something with trade valuation. Usually if there's _base_ in the name, then there is some sort of formula behind it. To test the assumption - change it and see how trades are valued.
Another guess - could be something used in selecting tiles for improvement but since there is nothing similar for strategic nor bonus... probably not.
Or could be something used to evaluate amenities - luxuries are base for amenities.
Guesses, guesses...
 
Their is currently a discussion about a major AI flaw in the general forum ( https://forums.civfanatics.com/threads/ai-disbanding-its-military.670213/ ) - it seems that AIs going bankrupt will disband all of their military, probably going way over the automatic disbanding you see when going negative with your treasury. This might explain overall why so many AIs are seen without any significant military force.

Real Strategy (AI) is a clear improvement over the base game; I can support the observation of @croco235 after having played first into a Prince game without this mod and then another with it enabled - as expected for the difficulty, I'm still the strongest player in the ranking, but especially my war opponents throw something at me and they are far from defenseless. I wonder what this means in regard to the AI issue above - I see 3 possible reasons why the AIs with this mod are suffering at least less:

1) Some changes of Real Strategy (AI) directly make the AI acting more sane when going in debt
2) Overall AI economic performance and/or treasury managment is significantly improved, so that AIs are less likely to stumble into bankruptcy
3) The AIs still can fall victim to it, but the overall better performance leads to them replacing units in no time

Just posting my thoughts here in case it helps taking this great mod further :)
 
Top Bottom