1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Real Strategy (AI) 2.0

Making AI better. One bit at a time.

  1. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,811
    Location:
    France
    Thanks. Tedious, yes. And trial/error is not really efficient here...
     
    Infixo likes this.
  2. Nerevatar

    Nerevatar Warlord

    Joined:
    Mar 17, 2019
    Messages:
    192
    Gender:
    Male
    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: Mar 6, 2021
  3. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,785
    Gender:
    Male
    Location:
    Warsaw
    @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.
     
  4. Nerevatar

    Nerevatar Warlord

    Joined:
    Mar 17, 2019
    Messages:
    192
    Gender:
    Male
    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?
     
  5. FloodPlain

    FloodPlain Chieftain

    Joined:
    May 28, 2020
    Messages:
    34
    Gender:
    Male
    Hell infixo, do you have any plans to change things in light of the Barb update?
     
    goatdeer likes this.
  6. Sharp142

    Sharp142 Chieftain

    Joined:
    Mar 17, 2021
    Messages:
    1
    Gender:
    Male
    Does this mod work with the barb update?
     
    Sjru and goatdeer like this.
  7. Sjru

    Sjru Dragon

    Joined:
    Mar 4, 2010
    Messages:
    622
    Gender:
    Male
    Location:
    Argentina
    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
     
  8. goatdeer

    goatdeer Chieftain

    Joined:
    Nov 13, 2020
    Messages:
    72
    Gender:
    Male
    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.
     
  9. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,785
    Gender:
    Male
    Location:
    Warsaw
  10. FloodPlain

    FloodPlain Chieftain

    Joined:
    May 28, 2020
    Messages:
    34
    Gender:
    Male
    Should I still use this mod or not?
     
  11. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,785
    Gender:
    Male
    Location:
    Warsaw
  12. chrisgatt7

    chrisgatt7 Prince

    Joined:
    Mar 26, 2013
    Messages:
    368
    I played this mod with Warfare Reloaded and saw some really good results with the simulation. Just no nuclear wars?
     
  13. Junky89

    Junky89 Chieftain

    Joined:
    May 30, 2017
    Messages:
    21
    Gender:
    Male
    Location:
    Germany, Nürnberg
    Do you know what AI_BASE_LUXURY_VALUE in GlobalParameters stand for?
     
  14. Prometheus23

    Prometheus23 Chieftain

    Joined:
    May 1, 2021
    Messages:
    4
    Love this, thank you so much! great job!
     
    Infixo likes this.
  15. croco235

    croco235 Chieftain

    Joined:
    May 17, 2021
    Messages:
    1
    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
     
    Infixo likes this.
  16. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,785
    Gender:
    Male
    Location:
    Warsaw
    @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.
     
    nauberry and Prometheus23 like this.
  17. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,785
    Gender:
    Male
    Location:
    Warsaw
    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...
     
  18. Pfeffersack

    Pfeffersack Deity

    Joined:
    May 10, 2003
    Messages:
    3,012
    Location:
    Germany
    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 :)
     
    Prometheus23 likes this.
  19. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,785
    Gender:
    Male
    Location:
    Warsaw
    Infixo updated Real Strategy (AI) with a new update entry:

    Version 2.0 New Frontier Pass

    Read the rest of this update entry...
     
  20. timmychompchomp

    timmychompchomp Chieftain

    Joined:
    Oct 2, 2016
    Messages:
    64
    Gender:
    Male
    Last edited: Jun 28, 2021

Share This Page