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

Artificially Intelligent AI Mod

Discussion in 'Civ6 - Creation & Customization' started by notque, Mar 26, 2017.

  1. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    Decided to release a mod I'm working on, it works on different parts of the AI that bugs me. It will continue to evolve over the course of time, please let me know your thoughts.

    http://steamcommunity.com/sharedfiles/filedetails/?id=892288641

    Artificially Intelligent

    Modding Compatibility

    To get my AI to use buildings/units/districts etc that you create Unique, Set a TraitType, and the AI will prioritize building them. All you have to do is set the TraitType, just like Firaxis does.


    Feel free to use this mod or any of its components in any of your own mods, public or private, so long as you give proper accreditation.

    Delnar is a God
    AI+ and Harder AI are both Leaders of Civilizations.

    Changelog:
    Spoiler :

    v9 - 2017 Mar-28
    Updated for Spring Patch

    v8 - 2017-Mar-26

    * Add CPU ability to use siege while moving. Makes them use it properly into modern era. Only for CPU, humans still have normal requirements. Not the ideal situation, but it vastly improves the AI
    * Increase AI Settler and Builder priority. Weren't building enough in tests.
    * Increase AI preference for commercial hubs. All AI were in negative gold in tests, now they aren't. Also improved preference for Industrial zones, and campuses.
    * Lowered AI building of scouts, and using them as military. Had way too many scouts around.
    * Improved settler location for the AI, they generally pick better spots to settle now.
    * Removed City States desire to build recon units.


    v7 - 2016-Oct-31

    * Lowered the cap on settling operations to 2 (from 16 before, now 1) to make sure the AI doesn't spam settlers when they want new cities but already have settlers out
    * Added a permanent favored list that makes the Industrial Complex District a favored district for all major civs
    * Added a permanent favored list that makes all unique districts favored for their respective civs
    * Added the Dynamic/Phased turns bugfix (thanks to notque and FilthyRobot) because it's a harmless bugfix that's vital for multiplayer play

    v6 - 2016-Oct-30

    * Fixed a bug that was causing the AI to not move settlers around properly

    v5 - 2016-Oct-29

    * Added the Combat AIType to Scouts and Rangers so that they can participate in operation slots that only call for a unit with some combat strength (e.g. settler escort)
    * Made the cap removal on settling operations properly work by assigning it a significantly high cap of 16 instead of deleting the cap entry, which would cause a cap of 0

    v4 - 2016-Oct-29

    * Altered the way Settler flavor is increased so that it works properly now hopefully (done through a permanent favored list entry instead of through the pseudoyield's default value).

    v3 - 2016-Oct-29

    * Added a special thanks section to the mod's description
    * Fixed a bug that stopped the behavior tree edit for upgrading units from working
    * Increased Settler flavor by 50%. This is done modifying settler pseudoyield's default value, because apparently "pseudoyield" is what flavors are now called

    v2 - 2016-Oct-29

    * Fixed a lot of the mod's changes not loading properly (thanks to RushSecond and qqqbbb, kind of shows how rusty I am with non-DLL modding)
    * Removed the Cavalry UnitAIType tag from Indian Varu because they don't have high movement (thanks to notque for pointing this out)
    * Altered the priorities of certain unit move types to make the AI pillage districts and traders more, attack civilians less, attack encampments less, use air attacks more frequently, and (hopefully) properly make armies and corps.
    * Altered city attack operations so that they are less saturated with melee units
    * Altered simple city attack operation to allow for a lot more ranged units (raised maximum cap from 3 to 12)
    * Altered the Upgrade Units behavior list so that the AI can disband units that it would normally wish to upgrade
    * Allowed the AI to run one extra city defense operation for each war they are in to help defend against simultaneous attacks targetting different cities
    * Removed the cap on settling operations so that the AI can have as many settlers out simultaneously as it wants
    * Added a new operation that should function like an annoying harassment operation: one or two cavalry units should run around in enemy territory, pillaging districts primarily
    - Note: if you want to see an example behavior tree that's commented, this is what you should check out

    v1 - 2016-Oct-21

    AI-only changes:
    * Added the Explore UnitAIType to Spies because they can be used for scouting
    * Added the Ranged UnitAIType to Rangers because they have a range 1 ranged attack (like Slingers)
    * Added the Civilian UnitAIType to Naturalists because they have no combat strength
    * Added the Explore UnitAIType to Modern AT because they were the only melee land unit missing the entry (this just means the AI can use them as scouts if it wants to)
    * Removed the Explore UnitAIType from Modern Armor and replaced it with the Melee UnitAIType to make them consistent with all other Heavy Cavalry entries
    * Added the Civilian UnitAIType to Military Engineers because they have no combat strength
    * Added the Build UnitAIType to Legions because they can build the same improvements Military Engineers can, so the AI should be able to use them as builders
    * Added the Cavalry UnitAIType to Barbarian Horse Archers, Egyption Chariot Archers, Scythian Horse Archers, American Rough Riders, Russian Cossacks, Indian Varu, and Arabian Mamluks because they were all missing despite having cavalry movespeeds
    * Added the Explore UnitAIType to Barbarian Horse Archers and Scythian Horse Archers to make them consistent with the light cavalry roles in which they could act
    * Added a Ranged Promotion Class build preference for Tomyrisi because Scythian Horse Archers have that promotion class (not the light cavalry one)
    * Added a new, generic CitySpecialization to the city specializations list that is meant to act as a stand-in for split food-production preference
    * (Hopefully) altered the gold spending priorities of the default savings list so that splurge spending is rated less important than unit/upgrade spending
    * Tweaked flavors in the default flavor list to slightly value expansion over offense and value active defense over passive defense
    * Altered the preferred yield focus of the "build trade units" specialization to be production instead of gold because that would end up producing the trade unit(s) faster
    * Reduced current task bias from 80 to 50 to hopefully reduce AI railroading as much
    * Reduced turns to wait between trade offers from 10 to 3 to make it consistent with turns to wait between peace offers
    * (Hopefully) Reduced delay between denounce and DoW to allow the AI to truly execute surprise attacks

    Changes with some non-AI effects:
    * Added the Ranged TypeTag to Rangers because they have a range 1 ranged attack
    * Added the Melee TypeTag to Garde Imperiale because they were somehow missing it
    * Added the Naval Ranged TypeTag to Privateers, English Sea Dogs, Submarines, German U-Boats, and Nuclear Submarines because they all have ranged attacks
    * Increased the fertility rating of bonus resources from 1 to 2 to correspond to their usefulness vs. other fertility ratings (strategic resource = 3, river = 3, coast = 1)
     
    Last edited: Apr 2, 2017
  2. pokiehl

    pokiehl Emperor

    Joined:
    Mar 5, 2017
    Messages:
    1,065
    What changes did you make? What effects can we expect?
     
  3. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    I am working on updating the changelog now, I started with Delnar's AI Cleanup, and am adding from there. Updating the steam page now.
     
  4. pokiehl

    pokiehl Emperor

    Joined:
    Mar 5, 2017
    Messages:
    1,065
    Thanks!
     
  5. anansethespider

    anansethespider Warlord

    Joined:
    Oct 27, 2016
    Messages:
    289
    Gender:
    Male
    Thanks notque! Been looking for an update to delnar's for a while now.
     
    notque likes this.
  6. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    No problem dude. I've been waiting for some other team like Community Balance Patch to come over, and then I'd help them, but I'm sick of waiting, so I'm just going to tackle things as I can.

    There's a lot I've found wrong in testing, just ridiculous stuff. This seemed like a massive improvement, so I thought I'd release it where it stands, and keep working on all the horrible parts as I go.
     
  7. Smity2k1

    Smity2k1 Warlord

    Joined:
    Jan 10, 2015
    Messages:
    236
    How does this differ from AI+?

    Just curious, I'd never used the old AI Cleanup mod that this is based on
     
  8. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    It differs in the sense that it's different visions and perspectives, editing similar things, in similar ways.

    If you're happy with AI+, use it. If you want to try something else, use this. I'm going to be putting effort and time into the things that I cared about when modding AI in Civ 5 and Civ 4. Does it work out? Is it better, worse or indifferent?

    That's really for users to decide. I'm just trying to get the AI to be functional in all the same ways I wanted the Civ 5, and Civ 4 AI to be functional. YMMV.
     
  9. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    Update released today. Really moving nicely. Still lots of issues, but vast improvement to vanilla.
     
  10. Xaviarlol

    Xaviarlol Warlord

    Joined:
    May 27, 2011
    Messages:
    224
    Hey notque, will try your mod today. Am I correct in assuming that your mod is compatible with the new patch?
     
  11. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    It is, although I'm obviously still working on things. I've been focused on unit actions today, trying to get the AI to keep their units longer, get goody huts, and barb camps quickly, and properly, and otherwise play better on a unit level.

    Bit of a stuggle.
     
  12. Leyrann

    Leyrann Deity

    Joined:
    Jan 11, 2015
    Messages:
    4,016
    Gender:
    Male
    Location:
    Netherlands
    I'd love to see you working together with Siesta Guru to just build one big AI mod, is that an idea?
     
  13. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    List of items that I see that drive me nuts

    1. Firaxis patched it so Melee couldn't attack ships, but the AI doesn't realize that, and lines it's melee units up to ships to die.
    2. The AI using GPs is almost completely broken. Funny to watch the extra tile GP grabbing meaningless tiles that can't be worked.
    3. Often Scouts will just skip goody huts
    4. Worse than that, The AI simply does not understand how to destroy a barb camp. They go attack it, but they won't jump on the camp. So if it's anything other than a melee unit, attacking someone inside the camp, they just leave it until it spawns more destroying them.
    5. Most games, the Lake Wonder Huey is built in a 1 tile lake.
    6. AI cannot seem to defend themselves with the default behavior trees, or AI+s... they just don't understand keeping units, or going to a hurt city well.
     
  14. anansethespider

    anansethespider Warlord

    Joined:
    Oct 27, 2016
    Messages:
    289
    Gender:
    Male
    7. AI builds way too many units, makes itself bankrupt.
    8. AI doesn't move their units toward a potential enemy before declaring war.
    9. AI doesn't move their units toward an enemy after declaring war.
     
  15. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    Major updates today involving military, settle locations, nuclear weapons usage by the air, aircraft usage, and a ton of other crap. Let me know your thoughts, interested to hear input
     
  16. Xaviarlol

    Xaviarlol Warlord

    Joined:
    May 27, 2011
    Messages:
    224
    Thanks notque. Will give the new version a test run.
     
  17. Kruos

    Kruos Warlord

    Joined:
    Nov 3, 2014
    Messages:
    139
    I played a lot with AI+ pre-Spring patch, experience of play was really better than vanilla AIs, militarly speaking in particular. Since the Spring patch I played vanilla AI and I see an interesting thing : AIs had less military units (make sense as AI+ makes the AIs focus on military) but on the other side AIs were far better on all other aspects of the game, science, culture and religions. I do not know if it is linked to a big improvment by the patch or if it is AI+ which was focusing a little bit too much on military.

    That being said, I will happily give your AI mod a try notque!

    Also, I agree with what has been said above : it would be great if you and Siesta Guru join your forces together to crush the bugs hidden in the AI tree decisions, and give us a big powerfull AI mod! :)
     
  18. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    Everyone in the AI community ultimately learns and takes from each other. Hell, Harder AI has some super interesting stuff as well.

    It's all one bank of knowledge for us to withdraw from
     
  19. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    Modding Compatibility

    To get my AI to use buildings/units/districts etc that you create Unique, Set a TraitType, and the AI will prioritize building them. All you have to do is set the TraitType, just like Firaxis does.
     
  20. ITcore

    ITcore Warlord

    Joined:
    Dec 25, 2016
    Messages:
    248
    Gender:
    Male
    Location:
    127.0.0.1
    So you can't get the AI to prioritize building other unique buildings that are available to all Civs? I've used additional building mods before and the AI just seems to build them if they can build them, without regard of actually needing them or not.
     

Share This Page