Resource icon

AI+ v13.1

I second Anase's suggestion to give more AI priority to building Commercial Hubs. It really is one of the top 3 districts that should be built due to the strength of traders, and I've noticed that the AI is pretty bad about managing it's gold economy; in my current game only Rome, the game's snowballing AI civ, has a positive gpt. Even if it can't effectively use domestic traders, at least an emphasis on creating international trade routes that return the most gold would be a huge boon to the AI's ability to maintain it's gpt.

Commercial hubs are clearly being built based on the Great Merchant progress but there's not enough gold being generated to offset building maintenance. If possible, I would suggest that the district priority be structured as follows:

1) Commercial Hub (Economic stability)
2) Industrial Zone (Increased productivity)
3) Preferred district or district related to chosen victory condition (In order to win the game)

Currently, while the AI puts up a great fight early it collapses in later eras due to the negative gpt over multiple turns.
 
I also vote to make commercial district top priority for AI. They are always top priority for me in every single game I play. Trade routes are so immensely important for income.
 
I also vote to make commercial district top priority for AI.
Well if they use it internally for growth and production, sure ! If they only do money with it... well it may just make it harder to them.

I played a couple of games with AI+9. Great job, it is a lot better.

Last game, I played small Islands (detailed and larger map mods) with England, so I started on a medium Island on my own. I got attacked by Rome and Pericles. They were kind of shy : not many units coming on my Island. The units were improved to the era they were in (they were several eras ahead of me).
Rome did struggle to get its army out of the water and on my land. I settled a city close to him but still went to attack my Capital with 2-3 knights and a catapult. They nearly took it until my walls were up, then nothing. It is too bad, I didn't have any defenses (only old units I didn't improve or that could match the opposition because of level difficulty and tech difference). They had other units in the water that stood there.

The usual subject to me is about settling. They still do a weird job in picking there settling spot : no fresh water most of the time while it should be a priority, especially when you end up 2 tiles away from river/mountain when a far better spot was to move 1 or 2 tiles. They only look for strategic/luxury resources it seems.

Finally, they were using enough district to keep me away in culture/science and GP generation (except for Admirals). I never managed to catch up in that last game (Immortal). I'm no pro (finding Emperor easy and struggling in Immortal) and in this game the AI reallly did leave me far behind (well not all of them).
 
Well if they use it internally for growth and production, sure ! If they only do money with it... well it may just make it harder to them.

I am confused by your comment - the point behind advocating commercial hubs is that the AI tends to run out of money often, even on highest difficulty levels. They should prioritize and use it for high gold routes if they are on negative or low income. If they have high income, growth/production/science/etc is fair game. Regardless, my understanding is Siesta Guru is able to tweak district priorities but not the trade route type selection. Which is fine because at least it increases the likelihood of them getting more gold.
 
I am confused by your comment - the point behind advocating commercial hubs is that the AI tends to run out of money often, even on highest difficulty levels. They should prioritize and use it for high gold routes if they are on negative or low income. If they have high income, growth/production/science/etc is fair game. Regardless, my understanding is Siesta Guru is able to tweak district priorities but not the trade route type selection. Which is fine because at least it increases the likelihood of them getting more gold.

I guess it depends on what the AI does after it has built the Commercial district. Does it rush buy traders? Does it rush buy Market, Bank, Stock Exchange etc? These rush costs add up and could cripple the AI financially even if using the policy card which doubles commercial building income.
 
Well, the existence of commercial districts is still a step in the right direction. As long as it's maxing its trader units - which I think was addressed in a previous version already. You could make the same argument about industrial district and rush buying workshops, or even military units, so the commercial district is no different. Independent of the possibility that the AI could always rush buy 10 units and sink itself into bankruptcy, prioritizing commercial district would at least help, not hurt.
 
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:

-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.

I think the extra districts probably do impact Commercial Hub desire, because they usually get a least a few in my test games. Based on the feedback from you and some of the others, I think I'll probably make commercial districts the most desired. Not entirely sure whether I want to force it, or just make it more likely to be picked though, I'll do some testing.

I am confused by your comment - the point behind advocating commercial hubs is that the AI tends to run out of money often, even on highest difficulty levels. They should prioritize and use it for high gold routes if they are on negative or low income. If they have high income, growth/production/science/etc is fair game. Regardless, my understanding is Siesta Guru is able to tweak district priorities but not the trade route type selection. Which is fine because at least it increases the likelihood of them getting more gold.

So I'm honestly not 100% sure if I can't change trade routes choices at all, or whether it's just impractical. The only candidate for trade route desire changes is that they may be affected by the desires for yields that I can tweak. Problem is, changing yields also appears to affect many other decisions, such as picking improvements, evaluation buildings, choosing districts, etc. So I'm stuck to having just one set of values here that works decently for everything. Over districts I have a bit more fine control because I can also tweak the desire for great person yields and can force district choices.

I guess it depends on what the AI does after it has built the Commercial district. Does it rush buy traders? Does it rush buy Market, Bank, Stock Exchange etc? These rush costs add up and could cripple the AI financially even if using the policy card which doubles commercial building income.

I've not seen it rush buy buildings a single time yet in the logs, but I haven't looked much for that. I don't think it should be a problem at least. It doesn't really pick that policy though, even when appropriate. It greatly prefers the purchasing cost reduction policy when it's running out of money for some reason.



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.

I'm betting they probably didn't. Haven't found a good way to fix these yet, especially since it's hard to get them to play nice with city attack operations (which for example at points require all units to be within a certain range).

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

Awesome! Looking forwards to it, hope you get to witness a 4 player domination victory game, which may be possible now.


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!!!!

Glad you you enjoyed it and thanks for the detailed feedback!

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


Yeah it doesn't scale well at all until the lategame yet. There's quite a few issues that cause this (policy choices, production costs and maintenance going up fast lategame), but I'm honestly rather surprised you actually managed to win your game with those settings. Smoother difficulty should already help with the AI keeping up, especially since you boosted it like that.

- 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.

This point surprised me a little. Were their cities also small, or did they have the population but just didn't build the districts? If it was the latter, there may be some compatibility issue going on here. At those high difficulty boost levels they really shouldn't even be able to build too few of these.

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.

This also sounds a little fishy. How were their tile improvements looking overall? A typical test game of mine on emperor has most tiles in their main cities improved, with some gaps in the cities on the edges.

- Play pangea or whatever with nearly no water because AI on water is cakewalk

Yeah... I'm working on this a little, but am not expecting to be able to get much done here. Both its military and its empire building abilities get completely ruined when you have to play with ships and the land is supbar.
They also don't realize that land units can't attack on sea for some reason, often making them swarm your boats.

- 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%

The issue with low lategame unit counts is also often a production issue. If for some reason it ends up losing many of them at some point (war or disbanding), it just can't produce units fast enough anymore either. The AI isn't as good at strategically building production cities, so you often have a bunch of cities, that despite their production bonus, don't actually produce faster than human cities. Humans also tend to be able to maintain and build upon a force throughout the entire game, but the AI often loses a bunch, so they need to completely rebuild everything for decent army sizes, which actually have to be significantly larger than human armies too, to even have a chance of competing.


- 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.

The defend city operations the devs put into place don't really seem to activate properly all the time and it's been hard to figure out the reason for this. I think it may have something to do with the target selecting algorithm, which at least feels as if it has some random factor in it (I Can't see it without code access). My hunch is that these don't get triggered like you might expect, but keep selecting random cities regardless of whether they actually need defending. Whatever is causing them to not launch these city defend operations properly all the time, may be connected to the way their city attacks and war declarations seem random too.


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?

Not sure. they promised some modding tools, but not the dll directly as far as I know. It may take years before they do, if ever.







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.

It may be loading related, but note that a value of 40 here would mean that the city gets one strength every 40 population, not 40 strength every population.

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.

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.

Hmm, strange, I swear the city center one worked for me. I've seen cities sit at -80 combat strength. I'll have to go retest this to see if you're right.


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.

Yeah it'd be pretty terrible if this is the only thing we really have. Even with the city center district option there isn't much, but at least it's something.

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).

Hmm, I think this is probably possible with unit abilities and traits. Haven't looked thoroughly at it, but you may want to have a look at how they attach special traits to units, such as the moving after combat for cossacks, then apply that technique to add some city damage trait (if that exists) to all units.


Other things that are possible: reducing the amount that damage scales with combat differences, increasing bombard strenghts on siege weapons, increasing the damage that melee/ranged do against city walls (I think COMBAT_DEFENSE_DAMAGE_PERCENT_MELEE in globalparameters may do this)






Rome did struggle to get its army out of the water and on my land. I settled a city close to him but still went to attack my Capital with 2-3 knights and a catapult. They nearly took it until my walls were up, then nothing.

There's indeed still some annoying thing going on where they will neglect to attack walls, even if they have siege weapons. On my end there's no discernible reason for this. I'm curious if the devs will end up fixing this one.

The usual subject to me is about settling. They still do a weird job in picking there settling spot : no fresh water most of the time while it should be a priority, especially when you end up 2 tiles away from river/mountain when a far better spot was to move 1 or 2 tiles. They only look for strategic/luxury resources it seems.

They actually value fresh water highly, but there appears to be some bug in the settle logic where they consider a spot 1 tile away from a river as having fresh water. Nothing I can touch again unfortunately, I can only shift the relative preferences for yields/freshwater/coast around, but even if they only care about frsh water, they still settle 1 tile away sometimes.


Does the mod change chopping yields?

Nope. Are you seeing some weird values?
 
Oh btw as a small update, I've been focusing a little more on a balance patch the last few days than an AI patch, so it might take a bit until a new version. v10 will likely not contain a lot either, I'm feeling like I'm mostly running out of movement room when it comes to big changes. The most glaring remaining issues all seem out of reach at this point, although there may still be a bit of hope for naval assaults and aircraft usage. I've been attempting something to get them to build medics/observation balloons/nukes, but with no luck so far.
 
Have you tried contacting any devs about getting the DLL code? Obviously they know people like you need it, but might help to speak to specific shortcomings you are experiencing.
 
Glad you you enjoyed it and thanks for the detailed feedback!
No problem! I was kinda "out of AI+" for while but you really improved the game here! I admit I didnt try winter patch without AI+ though ;)

The issue with low lategame unit counts is also often a production issue.
I thought many players saw AI disbanding units because of gold. I thought maybe I didnt see this because I had +160% ai gold but still wasnt enough for a large late game army. In trading screen I could see they were rather poor, so... maybe.

ut I'm honestly rather surprised you actually managed to win your game with those settings. Smoother difficulty should already help with the AI keeping up, especially since you boosted it like that.
Well answer is : use a lot of ranged (OP atm), focus prod/science/gold (but not food just for science). focus commercial/ports to get a looot of trade routes with maxing policies on them (increase gold by huge but also science/culture).
Also : if not sufuring a bad going war, always go and crush an opponent, friend or not :D I'm not saying it's nice, it just works well. Once you're done 1 opponent (sometimes but rarely 2), even if everyone hate you they don't DOW because your stronger. In short : play aggressive. I'm not saying it's the most fun for everyone, just saying it works really well. In fact I dropped last game before end because once again I known it's won long before end (2 more civs left to crush but with 50% my score so...)

It may be loading related, but note that a value of 40 here would mean that the city gets one strength every 40 population, not 40 strength every population.
Yeah but on a 12 city pop, since you putted 4, it should mean +3 and 40 means +0. And I didnt see value change. Didnt try with new games though (latest era etc to test).

Hmm, strange, I swear the city center one worked for me. I've seen cities sit at -80 combat strength. I'll have to go retest this to see if you're right.
100% sure : I tried it again with a new game as said : positive values works (add combat str), but negative values just means 0. Try yourself if you want to, you're sure this -80 wasnt done with COMBAT_GARRISON_MILITIA_MODIFIER ?
Also means you might want to set it to 0 (instead of -4) and set COMBAT_GARRISON_MILITIA_MODIFIER back to 10 (instead of 6) to compensate.

If you find yourself the will to create a separate mod that give a default +combat vs city to all units, You'll make a happy man :) I don't think reducing combat scaling is a good solution, it works well like this (dont want archers to kill tanks^^).

Keep up the good work!
 
I tested again CityStrengthModifier on DISTRICT_CITY_CENTER values : it does nothing if below 0 (==0). 200% sure, tested it with :
- only AI+ activated, modifying it in your mod (-150), still had 3 combat str at ancient era (new game, restarted civ 6 and all) for both me and all AI (reveal all)
- NO mod, modifying it in directly in Districts.xml, still had 13 combat str at ancient era (new game, restarted civ 6 and all), difference is due to 20 COMBAT_GARRISON_MILITIA_MODIFIER modification I did in your mod I guess for both me and all AI (reveal all)

btw I'm going to start an AI-ony game to watch with your mod and some others just for fun :)
 
Last edited:
Yeah just tested it myself too and you're right, well that's unfortunate. don't know how I missed that. Well, I suppose I'll revert it to 10 garrison strength as well then since this would've actually been a +4 buff to combat strength then (although still a little lower than vanilla due to the district changes).

Still do think that a slight change to combat scaling is probably appropriate, not just for city strength issues, but also because stacking combat buffs gets really OP really quickly. +5 from a great general, +10 from crusade, +10 from corps, +5 from promotions somewhere, +5 from terrain/flanking and suddenly your Cossacks are oneshotting plain units from an era above you. Which is also a significant advantage for humans, because AIs in their current state aren't near the level of coordinating combat bonuses. (and in multiplayer it appears a dominant thing too)

Reducing it a little would also shift the balance slightly towards the culture tree becoming more important, which right now feels significantly worse than the science tree.
Of course the pikemen vs tanks thing should ideally be avoided.. It should mostly be okay though I think, they seem to have designed the unit layout so that there's few weird cases, except of course for the AT crew rush being a good solution against knights..
 
regarding districts issue....

played a game with mod that sets min distance between cities to 4 tiles....it worked like a charm!

AI built all districtst more or less...rome was leading on almost all GPs, he disregarded campuses cause he had many cities and flat land..so logical choice - he went for high industrious empire....etc.
anyway try with +1 tiles...let AI have some room to build.

i use omnibus mod enhanced rules setup....with tiny tweaks in user.sql
 
So just to make sure, do your modifications somehow affect the city attack strength? In my current game I've just modded in to display the ranged attack strength for cities (CityBannerManager.lua, add GetAttackStrength() wherever you find GetDefenseStrength()), and I'm seeing values up to 97. The city ranged attack value depends on the highest ranged combat strength you've built so far, and according to this analysis it doesn't change when you create a Corps or Army.
But it seems it is. The 97 is for Brazil, which can build the Minas Geraes, which has the highest ranged attack value in the game, which fittingly would be 80 base + 17 armada = 97.
Of course there's also the Bastion policy, which adds another 5 to that, but 92+5 would also only be reachable by having a 75 ranged attack army (Machine Gun, Submarine, UBoat). And when I look at the map with reveal all, I only see the Minas Geraes armadas, and no other high ranged units.

Now right now I assume this has been changed in the winter patch, and that this can't actually be changed with the current modding methods, but I just wanted to make sure. Because a 97 ranged attack value is a very successful deterrant to go anywhere near such a city...
 
Last edited:
I must concur on the districts.

Currently in a 650+ turn game (I have 8 pace of time whichever it's called.. I also have it bumped up slightly because it was still off era wise (hitting god damn modern at 1500 in an epic game xD..).

The AIs with 6 cities or more has.... No units and their cities are all 16+ population? Like I kid you not (screenshots are supplied). The only ones with units are the ones with very few cities and I'm guessing - but not really because it is the only thing that would explain it - enough amenity to keep their cities happy. The rest have 0 military strength and their lands are being ravaged by barbarian units, but there are no camps I swear I have been god damn thorough - still their multitude of farms are burning (so is the rest really). I swear they have spammed farms, everywhere - except on bonus/strategic/luxury resources so they got that right at least - they do have the occasional commerce center, campus, theater square, encampment and industrial zone.
- In the beginning when they had less population and/or fewer cities things went quite well so much so that I had to play exceptionally defensively, but since we hit the later ages and their populations exploded... Not so much.
http://imgur.com/a/ZSL7u <---- screenshots

They need to focus -a lot- more on commerce centers followed by equal entertainment/industrial zones then encampments..
Also, they're city stacking a lot which obviously hurts their capabilities in developing proper cities, I'm thinking increases minimum city range to 5 might help them get more varied districts (not that you have to include that into the mod ;).. It's just food for thought).
If can be introduced a flat out amenity bonus to the AI that increase with eras (that would eliminate the need for them to build entertainment) or a percentage to AI amenity bonus so which would reduce the priority of entertainment districts.
And last but not least.. Would it require a proper DLL access to allow for the AI to change tile improvements for more favorable options like districts?

Otherwise thumbs up, I had a scare for the first many eras :D. Once the lack of districts have been fixed I'm fairly sure this will be close to perfect!
 
Last edited:
If can be introduced a flat out amenity bonus to the AI that increase with eras (that would eliminate the need for them to build entertainment) or a percentage to AI amenity bonus so which would reduce the priority of entertainment districts.

I agree with the idea to give the AI an amenity bonus that scales with difficulty level. Civ 5 used to have this anyway I believe in terms of extra happiness, so I don't see why not in Civ 6. I use Smoother Difficulty mod together with AI+ and I just brought this up in that thread.
 
Last edited:
+9 food and +9 shields for chopping down jungle on online speed, seems too little.

As far as I can tell this was ninja fixed in the winter patch. Prior to this there was a very noticeable bug with initial chop yields. As in a turn 1 chop would yield the same regardless of speed. Which made early chopping for online speed incredibly busted, and early chopping in marathon incredibly terrible, chopping is now scaled correctly for all game speeds.

EDIT: I am not sure if this is the case, but can we please leave any and all non AI tweaks out of this mod. I am of the opinion that the game is incredibly well balanced, minus AI decision making. I also play a lot of MP with friends, is this mod working for MP yet?
 
I agree with the idea to give the AI an amenity bonus that scales with difficulty level. Civ 5 used to have this anyway I believe in terms of extra happiness, so I don't see why not in Civ 6. I use Smoother Difficulty mod together with AI+ and I just brought this up in that thread.

I second this idea.

To move to another crippling issues with the AI -- around pillage and repair. As a rule (until this is fixed), I am not pillaging anything unless it is a city that I plan to take, keep and hold (and can manage the repairs myself).

Not sure if possible without the DLL, but would really like to see the repair costs either significantly reduced or changed for pillaging or spy destroying districts. An idea is a "simplification" of this process, moving away from the features of builders or production cycles. I think the challenge around the AI not repairing districts (and before you say it, I see it with farms/plantations as well, but every so often, they will fix those) is that the AI is having to choose "guns v butter" at a micro turn-by-turn level -- whereas a human player will think a little bit longer term for the investment needed to repair. In my mind, a simple answer would be for pillaged/damaged districts to be "autorepaired" within so many turns (maybe equal to the turns needed today to repair through production) and take away the "guns v butter" decision that currently the AI cannot handle. Pillaging and damaging the tiles still carries a steep opportunity cost, but it doesn't become game breaking. Today, if you see an AI opponent building one of the modules of the science victory, and you damage the spaceport, it appears that you PERMANENTLY destroy it given the AI's inability to repair.

So in my example, the IZ is pillaged. Let's say today, to repair the IZ itself is 4 turns of production, then 1 turn of production each for the workshop, factory and power plant. In the autorepaired approach -- on turn Pillaged + 4, the IZ is fully repaired (but the other buildings still require repair). On turn Pillaged + 5, the workshop is repaired, turn Pillaged +6 the factory repaired, and Pillaged +7, all is repaired. Automatically -- while during those 7 turns, something else is being produced in the production queue. Effectively, shifting the penalty from a time and production penalty to just a time penalty. And maybe this can further be expanded through policy cards.

I know this could be exploited by just parking units, pillage, let auto repair, pillage, etc., but at least the AI would have a fighting chance of simultaneously repairing AND building units to kick you off of the square (or building spys to counterspy). I also realize that this benefits the human player as well, but most of the time by the time districts are pillaged, we are talking 4-6 turns on normal speed to fully remedy -- which generally equates to 1/2 or a full combat unit produced. Obviously, if we could make the autorepair only for the AI that would be preferable.

In my view, along with helping with gold and amenities, implementing something like this would significantly add some semblance of strategic immersion with the new districts system.
 
Back
Top Bottom