AI priorities

WileyNg

Prince
Joined
Aug 17, 2013
Messages
595
Location
Hong Kong
As titled.
AI seldom trains melee units in late game.
All they do is spamming gatling guns and a few cannons. And then try to encircle the city, even if that means these units have to embark on water.

The result of that is their inability to take a city because they would keep shooting even though the city's hp has dropped to zero. This is a major bummer for me because AI could not take a city so they virtually declare war to waste away their units. Is there a way to re-adjust AI's perference to military units? like making them favors more a good combination of melee, ranged, and siege units in an army.
 
As titled.
AI seldom trains melee units in late game.
All they do is spamming gatling guns and a few cannons.

The result of that is their inability to take a city because they would keep shooting even though the city's hp has dropped to zero. This is a major bummer for me because AI could not take a city so they virtually declare war to waste away their units.

I'm pretty new, and i love the mod. So hi everybody and good job to the few dev who work on it.
That said.

You should first say your version.
I play 3.16 and i've only seen this issue with some city-state and they aren't supposed to take city .
 
Which units, buildings, or wonders should the AI build more, or less?

For example, I made the AI value Courthouses much more in cep v3.16.1.

Moderator Action: Merged threads as requested, changed thread title to match this post.
 
I have seen this myself quite a bit.
The AI does tend to favour RANGED units when declaring war and since these can only do damage and not take cities you can just wait and wear them down. Once, many moons ago, I saw the Shoshone spend nearly 15 turns wasting Composite Bowmen after Composite Bowmen on a city that had been reduced to 0 health! They just kept sending them in to eventually die but never took the city. Peace was eventually declared and all that happened was the death of 10s of units.
Sadly I think the selection choice of units might be out of the scope of this mod.

If it is possible, the AI needs to know that cities can ONLY be taken with melee units and send some with their expeditionary force.

Naval battles are better, they do tend to use melee ships more wisely.
 
To start with, I think AI should favor producing a good combination of different unit that specializes in different fields. In my game AIs are using Gatling guns a lot, this leaves their army vulnerable to cavalry and a significant disadvantage against cities. There are only 4 main choice of land units available, namely the siege unit, cavalry unit, soldier unit and ranged. Is it possible to make AI check what units they do and don't posses at the moment and produce whatever they are lacking?

For example if Mongolia's default army composition
Spoiler :
2 unit of siege, 5 unit of cavalry, 2 unit of soldier, 1 unit of archer

Everything that Mongolia produce need to base on this so that it fits the ratio.



Or let say Japan historically favor soldier a lot (their special units)
then their army composition could be
Spoiler :
1 unit of siege, 1 unit of cavalry, 5 unit of soldier, 1 unit of archer
 
What about buildings? Anything we could do differently with those? That part of the AI is easier to alter than armies. :)

--------------

Firaxis obviously did not teach the AI to recognize archers can't capture cities (or if they did it was done poorly). This part of the AI is in the c++ game core that's not easily modified.

We can encourage the AI to build a better mix of units, but we can't make the AI use those units correctly. I agree the AI should look at its current army mix when deciding what to build. I don't think Firaxis programmed it that way. It appears to select units on an individual basis, based on values set before the game begins, without much consideration of the composition of the rest of the army.

I encouraged a decent unit mix to some extent when training the AI to spend gold in cities. Firaxis told the AI to ignore gold for getting units or buildings! This made it easy to train the AI without worrying about it conflicting with the (non-existent!) vanilla game gold purchasing. However, their faulty training of AI production would likely override any changes I attempt to make to production choices.

I could look at my gold training code some more. I currently encourage the AI to have a bare minimum mix of units like WileyNg described, but I don't have that scale up to large armies. Scaling it will probably take a lot more work than simple priority adjustments (like "build more units to capture cities"), so I'm going to focus on the easier priorities in the short term.
 
Can you put in a trigger that if a city stays x turns on zero health, it then changes hands? ("After a long siege, the defenders of Istanbul had to give in and opened the gates to the Americans"). That is of course if the data is registered somewhere and only for the AI. This would obviously lead to a lot of bugs and is the opposite of easy, so scratch that again... ;)

One of the main problems of too many ranged units is probably that they don't die as easily and the building code doesn't take fallen units into account, thus always producing the same, but only one unit type dies away.

A lot of the ideas that come to my mind are of the "if... then" nature (i.e. for every x archers built, replace it with a spear), that's not helpful as well...

The simplest solution for the moment is probably to turn off buying ranged units with gold alltogether and up melee ones comparatively? Then see how that affects the composition?
 
Can you put in a trigger that if a city stays x turns on zero health, it then changes hands?
I think human players would be infuriated by the AI being able to break the game rules so blatantly.

The simplest solution for the moment is probably to turn off buying ranged units with gold alltogether
I'd be leery of reducing AI ranged units too much: they are effective en masse even in the hands of the AI in a way that melee units aren't, they can focus fire and cause the human player to lose units. I think it's possible that reducing AI ranged units would make the AI less capable in warfare, not more.

The no-melee-unit-left situation certainly happens, but it's not that common, and it's very dangerous for the human to focus on the melee first, because if you don't kill *all* of them, then you will lose your city. Normally it's a better strategy to target ranged units first when you can, to stop the AI from being able to hit you without taking damage itself.
 
...The no-melee-unit-left situation certainly happens, but it's not that common, and it's very dangerous for the human to focus on the melee first, because if you don't kill *all* of them, then you will lose your city. Normally it's a better strategy to target ranged units first when you can, to stop the AI from being able to hit you without taking damage itself.

Have to disagree with you there. In my experience it is fairly common and my cities can effectively be at zero health for a number of turns and stave off capture by targeting the MELEE units until reinforcement arrives.

Of course this is a last line of defense stategy, I generally prefer it if my cities don't get smacked at all.:D
 
I experienced that too.
About one melee for four ranged units ratio.

It would be great if sieges units were able to destroy buildings. For example, once a city health reaches zero, the rest of the inflicted damages should apply to a randomly chosen building.
It makes sense and it helps the AI by weakening a player 's city.

But it probably can't be coded ;(


Envoyé de mon iPhone à l'aide de Tapatalk
 
Top Bottom