Resource icon

AI+ v13.1

@PYITE It's part of my own personal mod, but I believe Moraelin's Tougher City States accomplishes the same thing.

@Leyrann I'd rather the AI be more aggressive towards CS's than less. Imo, it's easier to buff CS's than to try and micro-tweak aggressiveness and possibly create other issues with the AI.

@Siesta Guru Was looking back on post #357 and the newest core.xml file. So, it should no longer be necessary to change these three values for Epic/Marathon games, correct? Was wondering, though, why the code for above emperor and below emperor have the same value of -3:
Code:
<Row ListType="DefaultCitySettlement" Item="SETTLEMENT_DECAY_TURNS" Value="9"/>
        <Row ListType="BE_RAPID_EXPAND_SETTLEMENT" Item="SETTLEMENT_DECAY_TURNS" Value="-3"/>
        <Row ListType="AE_RAPID_EXPAND_SETTLEMENT" Item="SETTLEMENT_DECAY_TURNS" Value="-3"/>
 
@Laurana Kanan: I'd just like to see slightly less city states getting conquered than currently, and to be honest I have no idea what the best way to do that is. Fact is, though, that people are discussing wheter something should be done against current agressiveness or not in one way or another.

All that said though, I do like your idea to just buff city states more. I mean, it makes no sense to reduce AI agressiveness against city states, except if there's a reason for them to keep them around and get envoys, so something like this should be much better.
 
14 turns! I got owned by Gorgo and Vicky in 14 turns. Was on immortal, otherwise have been dominating on that level pre v9.

Well done Siesta -- well done!

I will say that it is absolutely idiotic that both declared war within 10 turns, but I guess they sensed blood.

Time to start over.
 
I ran into the same issue a few others have mentioned. The AI starts out as very aggressive early on but after awhile slows down to a near stop. I started a game with a total of six civilizations on a small map. All but 3 CS's were gone by turn 150. At about turn 200 all six Civs were still alive but Spain was left with just one city. For the next 200 turns no cities were taken except for four I took from Egypt after Cleo attacked me. I could see the other Civs battling each other over cities but ownership never turned over. Meanwhile, all the other Civs kept denouncing me for being a Warmonger even though they were going after each other as well. Gorgo kepts saying I was too close to her borders even through I had no one withing three tiles of her land. *sigh* (This game would be more fun if the other Civs would give more information about WHY they are getting upset).

Anyway ... back to the topic. I really enjoyed the game with this mod. It was a lot of fun all the way through. The only issue is that all the Civs got very boring after about turn 200 (except for Egypt attacking me).
 
I tested and I think it's great =]

Some suggestion:
- AI never kidnap my worker and colonizer, even in war or from barbarians. Also, I can kidnap easily a worker in water
- In my match, AI not protected port and marine resource, then, I easily pilfered resources
 
I also noticed a significant improvement comparing to vanilla.

- AI is agressive at the beginning and can actually conquer cities with walls
- My worker got kidnapped by a foreign scout (really got lazy, thanks vanilla :-( )
- AI pillages tiles on a regular base
- Have to focus more on military which makes the game more interesting

Overall great job. Thanks a lot for your time and commitment! Your improvements are amazing without the SDK.

Some issues/input based on 2 finished games with v9 on standard speed, King and Emperor difficulty, map size Standard:
- AI seems to neglect building districts, which hurts in the long run (lack of gold and science in industrial area and beyond). Holy sites are fine. Being constantly at war doesn't seem to be helping either.
- AI doesn't seem to use siege weapons although in range of a city. They are still moving most of the time. Battering rams seem to do the trick to conquer cities.
- City states are sacked too often for my taste.
- Once I encountered 2 Barbarian settlers and 3 workers next to an AI French city although there were 2 French knights nearby. I waited 3 turns but they didn't try to get their civilians back (didn't move at all).
- The AI buillds aerodroms but no planes

Thanks again.
 
AI doesnt go for goody huts...
Builds solo airplane in city center but does not use it at all...
late game AI looses all of it units....not sure why(maintence?)
rebels appear at some point and rampage trough well developed AI lands not being contested....
 
I'm not saying attacking city states more often is always better or worse, but having the option to tweak this aggressiveness would be nice. Maybe there is one already, but I know almost nothing about modding.

AI doesnt go for goody huts...
Builds solo airplane in city center but does not use it at all...
late game AI looses all of it units....not sure why(maintence?)
rebels appear at some point and rampage trough well developed AI lands not being contested....

I saw them build aerodromes and later they filled with airplanes. Depending on the speed you're playing, it might take a while before they build planes.
I had the same problem with one AI (England). She had no money and no units.
The rebels is because the AI doesn't stop settling cities and build very few entertainment districts. So it's an amenity problem I think.
 
Absolutely incredible and amazing job... fought a long war with Chinese, actually had upgraded units and brought siege weapons!

Nicely done!
 
I've been running AI only simulations with the mod in place and I've identified two main areas of AI behavior that could still use work.

First, the AI is not placing nearly enough value on Commercial Hubs. If there was even a brute force fix that made AI automatically build them in every city it'd be far better than the status quo, where the AI all but ignores their existence. Commercial Hubs are the most important district in the game, and the benefit of the trade route may be difficult for the AI to weigh correctly...but something needs to fix this, cause it'd make a huge difference in the quality of the AI's play.

Second, I want to commend you on the excellent job the AI is doing keeping a well-stocked and modernized army. In my simulations the AI is consistently upgrading and maintaining a proper balance of forces. However, the AI is lacking in knowing what to do with these forces during peacetime. They mostly keep them within their own borders in a dense tapestry of units, instead of fanning them out and establishing a defensive perimeter around their empire.

One effect of this is that even with dozens of units on the board, they don't necessarily do a great job of protecting their settlers. It is not uncommon to see an AI with every hex inside their empire occupied with a unit, sending a settler out into the unknown. Even with an escort, they are likely to encounter threats that change the AI calculation and make them turn around.

So I think what we need is a Power Projection strategy, used during peace time, that tries to position and fortify units 2-4 hexes outside of current borders.

Or a Land Grab strategy that positions military units around a hex that is intended for expansion.

Or other similar strategies for peacetime use of military forces.
 
On some of my test runs (deity/information era start/domination victory only) I've seen my army disband itself due to spies siphoning money. Could be that's what's happening to these armyless AIs.
 
I've just finished a marathon game on deity (huge pangaea map). I've noticed that they are going for science victory and some for culture and religion victories. I had to use spies to damage their space ports, which is something I've never done before.
I did ran into a small problem with spies, though I'm not sure if this mod is the cause of it. The AI kept attacking one commercial district from the same city over and over. This allowed me to intercept their spies quite easily, and gain promotions for my spies.

Hmm, interesting observation on the spies. I can't directly change spy behavior, but there's a small chance this is a side effect of increased desire for gold. Not sure what I could do about that though.


The AI settles cities 4 hexes away from their other cities. As long as there is room to expand, they will, and they spam settlers. Then they quickly build a lot of farms. They have so much population that they get amenity problems, since they aren't much fond of building entertainment districts. This spawns rebels everywhere.

Yeah I've noticed this too, sometimes they do get entertainment districts, but will usually ignore them. There's no good way for me to really impact their entertainment district desire smartly (as in, build them more when unhappy) though. This is the type of stuff I would really like dll access for, as I'm sure it'd be an easy thing to do there.



I have a bug I think may come from AI++. In my savegame germany declared war with me but it is kongo troops that attack? under diplomacy I am friendly with kongo and hostile with germany, but still it is kongo troops.

That's bizarre... It's such a weird issue that I can't really imagine it's the cause of any xml based changes, so my hunch is it's a rare vanilla glitch. If you keep seeing it though, could you share your database.log file in my games/civ 6/logs ? That may give answers.




Created an account to give this mod a major two thumbs up. I just finished a game as Japan where I had Poland as my neighbor. Her and Spain kept me in check all game, taking all the city states and essentially cornering me on our continent. Near the end of the game she out teched me and attacked with her mech infantry. Throughout the game the AI made smart, meaningful decisions (even building airports and bombing my tiles) and I must say I'm quite pleased at the progress of this mod. Keep up the good work!
*edit (Had to add it seems the taking of fortified cities has been improved as well, they rolled in with siege units and took my capital down to basically no health, I only saved it by blocking the open tiles with melee units)

That's great to hear! thanks for the feedback! I'm almost a little surprised to hear you say they used their aircraft succesfully haha, they often just sit on them not doing much (and haven't really found any way to influence this), did they also attack units with them?


AI's don't attack people they like, except very early in the game. Just like the real world, really. After all, if it wasn't like that, a country like Canada would not exist anymore, with how superior the USA's firepower is. The same for all European countries but Germany, England, France and maybe one or two others. And everything even remotely close to Russia, China, etc. We humans are typically sociopaths when we play this game, never ending up liking someone and not attacking them because of that. (*cough* except Jadwiga *cough*)

Yeah it makes some sense that they barely care, but I think ideally they do care a little more, since it'd make diplomacy a bit more useful this game. Especially if you manage to be friends it should be quite diminished. Which it is to some degree, has anyone noticed friends declaring war too much? Like it's ok if it happens every few games, but if the friendship basically doesn't matter, wed have a problem.
 
few comments :
- i saw few settlers without escorts on the ocean ; i declare war to england for taking them ; after that despite many caravel close from my cities, england don't try to destroy my sea settlement and some units (knights) on the ocean
- my neighbour who is so strong in comparaison to my (more units, cities, technologicly advanced) don't attack me. perhaps because he has my religion

In the naval game the AI is indeed quite weak still, it doesn't do boat attacks. I'm hoping to be able to fix this in a future version, but I think the odds are pretty low that this can be done.

Was the neighbour already at war with someone else? If not well, there's definitely a bit of randomness to it, it may've just been that, or that you happened to position all your units exactly on top of the city he was planning to take. Which makes it significantly less likely they'll attack.


I did a little revisit of this mod.

V9 is amazing, the difference from V8 is simply unbelievable. In fact I have had such success with this mod I was able to start an AI battles series with 1v1's.

Here is the mod spotlight video where Scythia kills Rome in just over 200 turns, it was a great test and I have had many domination victories from multiple civs:

I have tried it out with other mods, but it seems to run best mostly vanilla, there are a few instances where lack of resources slow the AI down, but that was mostly on my 1v1 map.

Watch out for my AI battles series, all thanks to AI+ V9!

That was fun to watch, thanks! I was starting to get worried there that they'd end up in permanent peace at some point, but schythia pulled through after all. What difficulty level was this on? Prince still?



@PYITE I'd rather the AI be more aggressive towards CS's than less. Imo, it's easier to buff CS's than to try and micro-tweak aggressiveness and possibly create other issues with the AI.

Hmm, there seems to be quite a bit of disagreement on how many city states the AI should take. I guess for now I'll ust work on making the city states a little tougher.

@Siesta Guru Was looking back on post #357 and the newest core.xml file. So, it should no longer be necessary to change these three values for Epic/Marathon games, correct? Was wondering, though, why the code for above emperor and below emperor have the same value of -3:

Yeah I don't think you really have to change the values anymore, it feels mostly ok on both ends of the gamespeed spectrum now.
They both have the same value there because I wanted the same value here for the regardless of difficulty during the 'rapid expansion' period. I could've also just used a strategy that activates on all difficulty levels for this particular value. But since I was already using two different ones for some other values, I figured I'd just stick with it.



I tested and I think it's great =]

Some suggestion:
- AI never kidnap my worker and colonizer, even in war or from barbarians. Also, I can kidnap easily a worker in water
- In my match, AI not protected port and marine resource, then, I easily pilfered resources

Thanks for the feedback! The no kidnapping issue that takes place sometimes is quite an annoying one that I have no idea how to solve unfortunately, that one is probably going to remain in the game for a while.
The lack of ships is one I'm working on. It's easy to make them build more, but getting them to do intelligent things so far has been hard/impossible, making it almost a waste in hammers to even build them.
 
First, the AI is not placing nearly enough value on Commercial Hubs. If there was even a brute force fix that made AI automatically build them in every city it'd be far better than the status quo, where the AI all but ignores their existence. Commercial Hubs are the most important district in the game, and the benefit of the trade route may be difficult for the AI to weigh correctly...but something needs to fix this, cause it'd make a huge difference in the quality of the AI's play.

I used to have them force-build commercials in much earlier versions, but found that that didnt give them enough room to build all the other ones. Especially since I've also been forcing the industrial district, which to me feels even stronger than the commercial one. But perhaps since the nerf of factories, I ought to be forcing commercials instead of industrials, or just remove the force on industrials so they'll have more room for commercials. Thoughts?


Second, I want to commend you on the excellent job the AI is doing keeping a well-stocked and modernized army. In my simulations the AI is consistently upgrading and maintaining a proper balance of forces. However, the AI is lacking in knowing what to do with these forces during peacetime. They mostly keep them within their own borders in a dense tapestry of units, instead of fanning them out and establishing a defensive perimeter around their empire.

So I think what we need is a Power Projection strategy, used during peace time, that tries to position and fortify units 2-4 hexes outside of current borders.

Yeah you're right, this would improve the AI by quite a lot. There's no way for me to do anything here without dll access though, so I'm afraid we're stuck with this for a while.


On some of my test runs (deity/information era start/domination victory only) I've seen my army disband itself due to spies siphoning money. Could be that's what's happening to these armyless AIs.

That could definitely contribute but having looked at their gpt etc, it seems they can fall into this state even without that. Some tall civs end up producing so much building maintenance, that they just can't come close to running even without significantly investing in gold and picking the right policies. Especially on the latter, they do a terrible job, often picking traits such as reduced cost for terrain purchases when they're sitting at -40 gpt.
 
Hey. On the 9th version of the mod game is played with new colors. Thank you very much!
When a planned release of a new version of the mod?
 
I used to have them force-build commercials in much earlier versions, but found that that didnt give them enough room to build all the other ones. Especially since I've also been forcing the industrial district, which to me feels even stronger than the commercial one. But perhaps since the nerf of factories, I ought to be forcing commercials instead of industrials, or just remove the force on industrials so they'll have more room for commercials. Thoughts?

So full disclosure, I'm playing along with a mod that adds MANY new districts to the game. Like, over a dozen more. When I run AI-only simulations, here's what I see:

-The first available districts get built en masse by almsot every civ. This includes the Holy Site (ew), and three new districts I added with yields of food and production (much better decision for most civs).

-Naval districts get built by coastal cities at an acceptable rate. They seem to like using their "useless" ocean tiles.

-Industrial Zones get built at about exactly the right rate currently, which is 1 every 2-3 cities. Civs like Germany and Japan seem to build them more, which is also good.

-Didn't see a single Commercial Hub, Campus, or Theater anywhere in one eight player FFA. In another, saw a single Campus and a few Theaters, but no Hubs.

-Even before the enrf of factories, I would argue that Commercial Hubs were the superior district by a small margin. After the nerf, I don't believe it's close. If I were to give each district a relative rating out of 10, Comemrcial Hubs are currently 10 and the next closest district is 7. In the status quo, I believe that "correct play" mandates a Commercial Hub in every single city regardless of chosen victory condition.

At the very least, the AI needs to be building 2 for every 3 cities.

Yeah you're right, this would improve the AI by quite a lot. There's no way for me to do anything here without dll access though, so I'm afraid we're stuck with this for a while.

That's unfortunate :( Looks like we'll be waiting together for those mod tools we've been promised!
 
Last edited:
Wanted to respond to the question about aircraft attacking units. I didn't notice it happening in particular, but I also didn't move much near them so it could be possible they weren't in range. They definitely had two bombers in an aerodrone in their nearest city and razed some of my bordering tiles. Also I was using TCS' improved aerodrone mod which makes them more beneficial and not take a district slot, so that could be why the AI was more inclined to build them.

And to anyone who wishes to complain about the AI taking City States think of it this way: you can conquer them except for the CS they took and then take that one last and liberate it to remove some of your warmongering penalties!
 
Hello,

I tested this v9 with most excitment since I was feeling I couldnt enjoy civ6 anymore before a real AI patch that might take ages to come.

And the result is... drumroll... very good! This is indeed the best breakthrough in AI for battle so far!!!!

I'll divide my results in 4 points :
1) Game setup and comments about the playthrough
2) What really went well AI wise and setups I might try for next games
3) What is ok even though some people see issue
4) What still could be improved

1) Deity / online speed (but with 8 ages of pace) / Continent/small/6 civs / Played france
Had a bunch of mods :
- 8 ages of pace but with slightly lower values than original mod, this makes online speed more like a simply "fast" speed, but with the ability to keep up prod vs science in the end. Which is ok to me
- AI+ v9
- Smoother Difficulty with even more increased value for gold/prod (+160%/+160%) and keep 1 extra AI settler, cause I'm insane ;)
- Chao Quick UI (UI only mod, not relevant here)
- More Lenses for CQUI (UI only mod, not relevant here)
- Unit report screen (UI only mod, not relevant here)

AI was really aggressive at start and took many city state more or less early (but not all, 2 left alive).
My 2 neighbors declared war on me, hopefully not at the same time. The first one nearly wiped my defense units out because they were mainly exploring/going for barbs and I didn't see him coming. I admit I reloaded like 4 turns earlier here.
Overall they were really good until 500 AD. Once I made peace with both and reinforced my army, I started attacking, after that, it was a little to easy.

Strangely, even though I put difficulty values ultra high, game still went quite easier as it went.

2) Early city attacks : very good
Upgrading : mostly good when they had the strategic resource. BUT one of them didnt build improvements on them even though it was in the middle of his territory, so... couldnt improve.
Tactical battle : mostly good for land (way better than before)

For my next game, to improve AI, I might try :
- Play pangea or whatever with nearly no water because AI on water is cakewalk
- Set strategic resources to a lot because AI its bad at trying to find a strategy (type of unit wise) that fits his lack of some resources. I dont like that it will also make it easier to get for human but... dont see how else to do.
- To add even more gold to AI (but not prod, 160% seems ok) because late game he doesnt have that much units (equal to less than early game lol). It seems they build very few to none commercial district and so get poor easily even with +160%
- To try to give "move and shoot on same turn" promotion to all siege (saw a mod for that), and tweak them slightly less strong to compensate. Mod maker suggests it's one of the best thing to make AI use it better cause it handles moves OR shoot very badly (ie dont shoot)
- To lower a bit ranged unit efficiency cause AI use it much less well than a human and they are indeed a bit OP atm. But I feel 8 ages of war (mod) is too much changes in the game.
Ofc this is not to be added to AI+ which is about AI only, keep it that way. I just wanted to share ideas to players to improve their own setups.

3) I didnt see AI unit got disbanded but might have missed it. I indeed saw less units endgame than early.
I didnt see ALL CS taken over, "only" 3/5, and that felt ok to me, I found it really cool in fact.
I didnt see rebels appearing

4) What is still an issue :
- What sometimes feel like erratic behavior in defense. They sometimes keep 6+ units near a city unattacked while you take 2-3 cities not that far away. And then suddenly throw them at you (which is cool, but a bit late^^). It felt a bit like "random defense strategy". I understand it might be difficult to prioritize operations and all.
- naval battle, total cakewalk, both about ships themselves and about land units waiting in sea to get killed by boats or ranged from coast.
- air units, mostly unused
- Unit type built. For example one of my neighbor (spain) had mostly catapults but not enough melee/ranged and another (japan) had 90% samurai.
- Ranged unit not always attacking if like 1 tile too far away. Since ranged are a bit OP, that hurts AI.
- District not enough built, my spies had nearly nothing to do lol. I really think it hurts AI a lot as game progresses and you need gold/etc from district to be competitive.
- As said, siege not always attacking, I think due to "move or shoot".
- Difficulty for AI to take city as game progresses (due to high city defense I guess)
- Overall, AI is still better at start than in mid/late game.

But I say it again : it's still a huge step forward! I look forward to DLL access, I didnt even know they plan to give it, do they?
 
That was fun to watch, thanks! I was starting to get worried there that they'd end up in permanent peace at some point, but schythia pulled through after all. What difficulty level was this on? Prince still?

It was on prince again. The Autoplay mod has an auto-war feature so they can't get in a rut, although it is kinda rare anyway. I have an entire series coming up feature AI battles. super fun stuff
 
About city strength and hp values, I tried to tweak them a bit, in gamechanges.xml.

I dunno if it's because I reloaded a save game to make my tests (with same unit ready to attack and same unit ready to get hit by city), but some values have effects and some dont:
COMBAT_POPULATION_PER_STRENGTH doesnt seem to do anything even on a 12 pop city, tried to make it 40 instead of 4, no change in UI, same damage to city, same %hp/wall left on city and same damage taken both on attack and defense.
COMBAT_GARRISON_MILITIA_MODIFIER works, used 16 instead of 6, both on UI, attack and defense results (the higher the less strength unless there is a garrison which override it ofc).
DISTRICT_CITY_CENTER doesnt seem to do anything, tried to make it -14 instead of -4, no change in UI, same damage to city and same damage taken both on attack and defense. Can it come from the fact that there is another update before? Maybe there are not done in the order of the xml? My biggest disappointment.

Reason I was tweaking : as many people, I feel city does too much dmg as the game progresses. It is one thing to have them resistant ("hp") but it's another that they shot too hard on units, it's especially hard for AI who is a bit dumb. Also a human can take easy advantage of this by focusing siege etc with city.
I know the biggest issue is the undisclosed progress per tech, just thought if I could tweak that I might lower it as game progresses; or better could we make a mod that modify the value based on era? (sort of era-malus but since era give bonuses much more important with techs, could work).

Siesta, or anyone, are you sure about what this actually does (and not just imply from the name)? Any information welcome.

EDIT: I validate that CityStrengthModifier on DISTRICT_CITY_CENTER in gamechanges.xml as no impact whatsoever IF NEGATIVE even with a new game. I guess it's a bug? setting it to -40 does nothing compared to -4 (just play on latest era), but setting it to 40 does indeed raise it up by 40 (and not 44= 40 - (-4)). That is sooo ducked up by firaxis, maybe many values cant be negative.

Conclusion 1 : you can keep it at 0 in AI+, wont change a thing. You just made cities without garrisons stronger by lowering COMBAT_GARRISON_MILITIA_MODIFIER but nothing else, I guess that's not what was the goal.
Conclusion 2 : the only significant way to change a thing about city combat strength atm is COMBAT_GARRISON_MILITIA_MODIFIER, which is dumb because not only it doesnt scale with anything (can we do it scalable by era somehow?) but also it means that city with a garrison might become really strong compared to those without.
Conclusion 3 : It might not be the place for a mod focusing only on AI but would it be possible to add a "default promotion" to all units that add +x combat value vs city both in attack and defense? I know ranged unit already have one but only for defense (tier 3 out of 4).

Any intel from modders welcome :)
 
Last edited:
Back
Top Bottom