Resource icon

AI+ v13.1

Yep, I'll do a steam release, more convenient and not everyone is on civfanatics.

So, it does seem like they did something on dll side. I was just watching an AI+ game where Germany successfully took out America on turn 15 (online speed) with a warrior rush,then proceeded to take 2 city states before turn 40 and hit industrial in 1300 AD. The kicker? This was on KING!
That's not your average game of course, but still shows how scary the AI can get sometimes

The aircraft compatibility issue is fixed now, but unless I'm mistaken it seems the new aircraft change doesn't really affect the fighter type aircraft. Has anyone seen fighters be used appropriately since the patch?
 
Yep, I'll do a steam release, more convenient and not everyone is on civfanatics.

So, it does seem like they did something on dll side. I was just watching an AI+ game where Germany successfully took out America on turn 15 (online speed) with a warrior rush,then proceeded to take 2 city states before turn 40 and hit industrial in 1300 AD. The kicker? This was on KING!
That's not your average game of course, but still shows how scary the AI can get sometimes

The aircraft compatibility issue is fixed now, but unless I'm mistaken it seems the new aircraft change doesn't really affect the fighter type aircraft. Has anyone seen fighters be used appropriately since the patch?

So did Germany get anywhere near to a domination victory?
 
So did Germany get anywhere near to a domination victory?

They probably could've taken it quite easily, but didn't. They were at war with England, were much much stronger and took out most units, but sadly didn't take their cities.
There's one awkward bug in now (unrelated to AI+ as far as I can tell) where they will take down a city completely with siege weapons, but then refuse to attack it with melee units standing right next to it.
After England there still would've been France, which could've been an easy conquest, but they were distracted too much by England to attempt it.

City conquests later in the game do actually happen quite frequently though, I've witnessed quite a few civs getting completely wiped out in modern. But yeah sometimes these annoying issues still show up.
 
Can confirm it's unrelated to AI+ as Gort also came across the bug when running his tests "how fast can deity AI take undefended city".
 
I wonder if it is related to low amenities? (AI refusing to add new cities to empire if negative; similar to settling behavior)
 
I wonder if it is related to low amenities? (AI refusing to add new cities to empire if negative; similar to settling behavior)

You know, that would make a lot of sense.
 
I'm pretty sure it's that it perceives its units as too weak to attack the city, thinking it will have massive losses. The stalemate sometimes ends when a new unit type shows up.
 
I'm pretty sure it's that it perceives its units as too weak to attack the city, thinking it will have massive losses. The stalemate sometimes ends when a new unit type shows up.

But how can it be that AI doesn't see relative power?
I mean, if a city has zero defense, zero counterpower - then even a warrior can take it with little loss...

Is it a bug or simple something that is forgotten to be coded...?
 
I'm pretty sure it's that it perceives its units as too weak to attack the city, thinking it will have massive losses. The stalemate sometimes ends when a new unit type shows up.

That and a city's ability to heal seem to influence ai attacks. If it can't siege and the strength level isn't much higher than the city, ai tends to avoid attacking with melee.

When ai has sieged cities in my games, that's when conquest tends to occur.
 
Last edited:
But how can it be that AI doesn't see relative power?
I mean, if a city has zero defense, zero counterpower - then even a warrior can take it with little loss...

Is it a bug or simple something that is forgotten to be coded...?

It may be ignoring the fact that the city lost health/walls when determining whether to proceed, I'm not sure. All I know is that if I see this stalemate appear, it either never ends, the units run away, or it is solved when a better melee unit shows up. I've never observed that it was the old melee units that end up taking it anyway.


That and a city's ability to heal seem to influence ai attacks. If it can't siege and the strength level isn't much higher than the city, ai tends to avoid attacking with melee.

When ai has sieged cities in my games, that's when conquest tends to occur.

Yeah it might be related to that, I don't remember whether I've ever seen it with it being 'sieged'. It could be something like the city healing up just enough for melee to not want to go in, if the melee units are then selected to go before the siege weapons, you could end up permanently stuck.
Has anyone figured out conclusively when a city is considered sieged anyway? I saw a weird instance yesterday where just one enemy unit adjacent to a city was enough, while occasionally 5 units won't do..
 
For a city to be sieged, all available surrounding tiles need to be within uncontested enemy zone of control.

So, if a city has open tiles all around it, three units exercising zoc could be setup to initiate siege. The ai is usually competent about setting this up in multiple instances.

This would also mean that a city with a garrisoned unit exerting zoc could not be sieged, but I'm not entirely sure. Considering that one ranged promotion is the ability to exert zoc, it would make sense.

Would it be possible to find the variable that controls the willingness to attack cities that are not sieged? Or is that a code change that would require the DLL?
 
Last edited:
One thing I've noted is that AI's will not settle new cities if they are currently attempting to take over another city. Ex: In one game i was in a declared friendship with Sumeria. Sumeria was also attacking a city-state I was allied with, so I protected the city-state by placing troops directly next to the city center. There are only three open spots, which my troops occupy - the rest are mountains. For the last 50 turns, Sumeria has been attacking the city-state with a crossbow and doing nothing else. No new cities have been settled. No new attacks have been commenced.
 
For a city to be sieged, all available surrounding tiles need to be within uncontested enemy zone of control.

So, if a city has open tiles all around it, three units exercising zoc could be setup to initiate siege. The ai is usually competent about setting this up in multiple instances.

This would also mean that a city with a garrisoned unit exerting zoc could not be sieged, but I'm not entirely sure. Considering that one ranged promotion is the ability to exert zoc, it would makesense
.

Ah interesting, using ranged units to surround an enemy city is probably why it sometimes seemed to fail.

Would it be possible to find the variable that controls the willingness to attack cities that are not sieged? Or is that a code change that would require the DLL?

It's not in the xml, sadly enough I have almost no variables (or anything else) I control that can affect unit-level behavior, those few things I have available are all operation/army based.


One thing I've noted is that AI's will not settle new cities if they are currently attempting to take over another city. Ex: In one game i was in a declared friendship with Sumeria. Sumeria was also attacking a city-state I was allied with, so I protected the city-state by placing troops directly next to the city center. There are only three open spots, which my troops occupy - the rest are mountains. For the last 50 turns, Sumeria has been attacking the city-state with a crossbow and doing nothing else. No new cities have been settled. No new attacks have been commenced.

It's definitely less likely it'll settle, but it still will occasionally. The worst case scenario tends to be that the spot it desires most is close to the enemy, or close to barbarians it is ignoring during war. City spot evaluation is not affected by nearby enemies, so it may be continuously trying to get to a spot and then keeps backing off.






So apparently I need to download 27GB of asset files to be able to build my mod using modbuddy, and the steam upload tool doesn't take my notepad-based modinfo. I'll probably release v10 tomorrow, but it seems like the steam version will have to wait a few weeks...
 
Alright, so v10 is out now. Ended up basically retaining most of the code anyway. The vanilla AI definitely got stronger, and the leap between vanilla and AI+ doesn't feel as big anymore, but most of the changes still feel like they improve the AIs play.
I did end up removing my settle behaviortree, as it seemed to be slowing the settling down. And also felt like I could afford dropping the few effects left that changed the game, trying to keep it as light as possible.

Will try to find some room on my harddrive so I can do a steam release later on as well.
 
Great job, looking forward to trying it out. One question, on preferences in particular around campuses -- any way to prioritize repair of districts, specifically spaceports. On vanilla, I see the AI repairing everything but that. I'm almost tempted to see if I can find where we can significantly reduce the cost of repair as I am thinking that may be the culprit. For example, I have seen Monty have a spaceport destroyed, so he just builds a new one in another city.
 
Unfortunately I can't touch repairs, neither the ones done by workers nor the ones in cities. It's quite a big issue indeed with some players leaving half of their lands burning through the entire game
 
Hi, whenever i launch a game, my units have their name changed into : "Behavior End" "Core end" etc... It's only happening with AI+ ON, whenever i turn it off, units names are back to normal.
 
Top Bottom