Simple Ways the AI Could Be Better

hambonecu

Chieftain
Joined
May 27, 2007
Messages
25
Combat vs AI is extremely easy in this game because the AI doesn't have a clue. I play immortal and beat the AI easily because they simply throw away all their units. Watch Sidon's Youtube videos for how to destroy AI units on Deity. I think there are many simple changes to the AI that could be made to improve the difficulty of combat. Here are a few:

1) Prioritize ranged over melee military techs. Get crossbowman, cannons, artillery before infantry.
2) Don't send units into enemy territory if you see more than one or two enemy units. They will simply be eaten up by enemy ranged.
3) Don't make that many melee units. A good ratio is probably two to three ranged to one melee and/or one horse unit.
4) Use citadels. When you have extra great generals, put a citadel into the territory in which you are attacking. It doesn't really matter where (OK it does, but any use is better than no use because citadels provide huge bonuses and because extra great generals come frequently).
5) The AI withdraws from combat way too early. If you send in some units and they are damaged, you have committed yourself to the attack. The AI should press forward rather than withdrawing and allowing additional damage from my ranged.

These are a few easy changes that would make the AI much more difficult from a combat perspective.
 
One thing that I've noticed with UI combat - it will feed you every last unit it has as long as you keep the war going, even though falling back and drawing you in would be a better strategy.

If you are in a strong position, you can simply stand there as the UI feeds units to you to kill. If you are besieging a city, the UI can take the ranged unit that is defending the city and bring it out for you to kill. There was an instance where I couldn't break into the city because of the crossbowman who was effectively holding me off. Then the crossbowman leaves the city and is instantly toast! Thank you, UI.

The UI will keep hitting a particular unit no matter what. You can position a unit where it is next to a healer or has a healing promotion. The UI will attack endlessly. Your unit takes the experience, heals and sits there for more. You get one promotion, you get another, and another etc. just by sitting tight. If you like, rotate other units into the same place to spread the promotions around!

This has taught me never to keep hitting on the same attacking units when defending a city because they will promote/heal. Hit a unit once or twice, 3 times at most to get a kill, but if it takes more than 3 to kill it, spread hits around to other units. Better to have several wounded enemy that may be picked off with help from your supporting forces than to have a badly wounded unit that will heal next turn while other healthy enemy units keep on coming. If you can't take out a unit with three hits, count on it regaining health to fight on.
 
Combat vs AI is extremely easy in this game because the AI doesn't have a clue. I play immortal and beat the AI easily because they simply throw away all their units. Watch Sidon's Youtube videos for how to destroy AI units on Deity. I think there are many simple changes to the AI that could be made to improve the difficulty of combat. Here are a few:

1) Prioritize ranged over melee military techs. Get crossbowman, cannons, artillery before infantry.

I don't like any tech path that forces all AIs to take the same tech route and limits their already marginal ability to adapt even further, particularly as this has a knock-on effect on all other victory conditions and tech progression. If you know all AIs are going for the same techs, you can grab the paths with the best Wonders yourself (while the AIs waste hammers going for the same Wonders simultaneously, when only one can be successful) and exploit the AI's failure to, say, reach Civil Service before you do. Net result is that the game as a whole becomes easier for the human; moderately improved combat performance isn't sufficient to compensate.

2) Don't send units into enemy territory if you see more than one or two enemy units. They will simply be eaten up by enemy ranged.

May work against humans with a decent unit mix. Will just prevent the AI from ever successfully attacking any other AI, particularly on higher difficulty levels where they have so many units each. It also obviously very much depends on what units the AI sees, what terrain is there, and numbers of units/tech levels of the units involved. All of which are difficult for an AI to factor in. You have three archers. AI has three Panzers. Retreat or not? Solving one flaw by adding another is not good design - which is precisely why it's hard to make "simple" improvements to the AI. See my response to point 5.

3) Don't make that many melee units. A good ratio is probably two to three ranged to one melee and/or one horse unit.

For a human that's good - for an AI, not so good. The AI is always going to play worse than a human, hence it will lose more units. If it has mostly ranged units, it will lose them more quickly and/or will struggle to capture defeated cities. I've had games where the AI has run out of melee units and just keeps firing with its ranged/sieged units regardless.

4) Use citadels. When you have extra great generals, put a citadel into the territory in which you are attacking. It doesn't really matter where (OK it does, but any use is better than no use because citadels provide huge bonuses and because extra great generals come frequently).

More important than teaching the AI to use its own Citadels is teaching it to deal with enemy Citadels. Simple rule with no downside: If you have a unit in an enemy Citadel, always pillage. Citadels rarely kill units now, since the effect is no longer cumulative and the AI is programmed to retreat damaged units, but AIs still get caught by impassable Citadel roadblocks - move to Citadel, get damaged, retreat, move to Citadel, get damaged, retreat, move to Citadel...

Or better yet just change the Citadel rule so that its effect only works on enemies of the last civ with a unit occupying the Citadel hex.

5) The AI withdraws from combat way too early. If you send in some units and they are damaged, you have committed yourself to the attack. The AI should press forward rather than withdrawing and allowing additional damage from my ranged.

This is actually a G&K change for the worse, as a result of complaints that the AI would pointlessly suicide its units in vanilla. So it will now almost always run or fortify to heal with damaged units. It seems a tricky balance for the AI to calculate.

The best fix is just to go for the peaceful victory conditions - being able to beat off AI attacks won't help you get ahead in the science or culture race on higher levels. Domination is either too easy (on low levels) or just a long drawn-out slog to the end where the AI's only option is to spam so many units you can't reach and capture all their capitals before time runs out (higher levels).
 
It's easy to agree with PhilBowles on several matters so I'll just add one easy solution even though it's a bit contradictory with posters above: stop the endless moving & just shoot at something.

Surely there're times when retreating & healing is wise but swapping units without even attacking anything is the worst possible function for units. AI has enough units few to be sacrificed and still get a healthy bunch surrounding city/cities with a bit of added conviction.
Other minor thing is lack of units with 3+ movement points - apart from Alex it's very rare to see a horse based unit to capture a city. At least one horseman or something similar should go with the ranged units. This would also prevent the absurd & far too common situation when AI's ranged units keep the @ 0 hp without a melee unit in sight to capture.

And without being a language police a minor note for clif9710: if you replace UI with AI your post would make much more sense.
UI usually stands for User Interface as AI is Artificial Intelligence; in this case a computer controlled civ.

G
 
It's easy to agree with PhilBowles on several matters so I'll just add one easy solution even though it's a bit contradictory with posters above: stop the endless moving & just shoot at something.

In my last game, Prague had a good set-up having been allied with Montezuma and subsequently attacking an undefended Roman city. But instead of keeping the Trebuchet where it was and continuing to bombard, it moved it next to my city, wasting a turn of firing.
 
Anyone else LOL when no barbarian archers (not sure about AI) refuse to capture citizens now with G&K?
 
I don't like any tech path that forces all AIs to take the same tech route and limits their already marginal ability to adapt even further, particularly as this has a knock-on effect on all other victory conditions and tech progression. If you know all AIs are going for the same techs, you can grab the paths with the best Wonders yourself (while the AIs waste hammers going for the same Wonders simultaneously, when only one can be successful) and exploit the AI's failure to, say, reach Civil Service before you do. Net result is that the game as a whole becomes easier for the human; moderately improved combat performance isn't sufficient to compensate.

I'm not necessarily talking about a fixed tech path. But if you have a choice between artillery and infantry, maybe you should think about taking artillery. There are embarrassingly long periods where my artillery goes unchallenged simply because the AI has not gotten the tech for it yet. There would at least be something of a challenge if, instead of nothing in the city I'm attacking, there would be one artillery. Even 1 artillery to stand against my 5 means that I'm not simply slaughtering the AI uncontested.

Further, all siege techs are on the path to other victory conditions and are good to get anyway. Early ones must be researched to advance. Artillery in particular requires fertilizer, which provides food -- something that the AI loves anyway. Rocketry -- rocket artillery -- is required for space race victory. Not a really tough choice.

For a human that's good - for an AI, not so good. The AI is always going to play worse than a human, hence it will lose more units. If it has mostly ranged units, it will lose them more quickly and/or will struggle to capture defeated cities. I've had games where the AI has run out of melee units and just keeps firing with its ranged/sieged units regardless.

OK clearly I was using a little bit of hyperbole in my original post. However, don't you think that instead of "run all my melee units into an enemy" they could do "run my melee units, and have ranged units behind them, firing"? I think the strategy is usually superior.


More important than teaching the AI to use its own Citadels is teaching it to deal with enemy Citadels. Simple rule with no downside: If you have a unit in an enemy Citadel, always pillage. Citadels rarely kill units now, since the effect is no longer cumulative and the AI is programmed to retreat damaged units, but AIs still get caught by impassable Citadel roadblocks - move to Citadel, get damaged, retreat, move to Citadel, get damaged, retreat, move to Citadel...

Or better yet just change the Citadel rule so that its effect only works on enemies of the last civ with a unit occupying the Citadel hex.

Yes, I agree that AI should pillage all citadels when they reach them, and that that definitely has priority over AI using its own.

The best fix is just to go for the peaceful victory conditions - being able to beat off AI attacks won't help you get ahead in the science or culture race on higher levels. Domination is either too easy (on low levels) or just a long drawn-out slog to the end where the AI's only option is to spam so many units you can't reach and capture all their capitals before time runs out (higher levels).

That's fine, the idea that peaceful victory conditions revive the game from combat silliness is OK. However, it doesn't change the fact that the AI sucks at combat.
 
Capturing a Citadel should change the tile ownership to that of the occupier (not the surrounding tiles but the Citadel tile should be capture-able).

The AI is pretty good in my opinion. I don't think there are "simple" ways to make it better. It does seem to retreat more often which is good but it lacks the ability to retreat and then counter from a position of strength. If the AI retreated to mass forces while the player stretched themselves too thin, it would provide more dynamic play. As it stands, the AI seems to retreat when it's forces are outmatched. This encourages the player to press their attack as they know their forces are stronger. If the AI used the fog of war to pivot forces to a flank, it could be deadly.
 
It's easy to agree with PhilBowles on several matters so I'll just add one easy solution even though it's a bit contradictory with posters above: stop the endless moving & just shoot at something.

This. AI unit shuffling is particularly obnoxious when you're capturing their capital and they have a steady flow or units shifting in and out of the capital. Does everyone want to take a picture before it burns down?
 
This. AI unit shuffling is particularly obnoxious when you're capturing their capital and they have a steady flow or units shifting in and out of the capital. Does everyone want to take a picture before it burns down?

They want to fiddle, like Nero.
 
One thing I noticed watching a video LP, is that the AI does not fight for their capital. In this game Arabia lost it's capital, making peace before the next turn. Arabia had great war bombers vs. invading artillery, they should have captured their capital back, or at least kept fighting while they have the tech advantage. This AI has no resolve, who doesn't fight for their capital? At least try to get the capital back, don't give in the turn you lose it.

I don't remember in my vanilla games the AI giving up their capital so easy after it was captured. As far as I know it seemed harder to get peace at that point.

The AI also goes after crap units with its bombers, while it's capital is under attack. What it should have done is destroy at least an enemy artillery per turn, and deal with infantry. Instead it is bombing hakkapeliittas way out on the flank (placed there to deceive the stupid AI.), and a couple of infantry in front of Mecca. The AI should prioritize it's targets. ALWAYS defend the capital first. Destroy enemy artillery, make that priority. Make the enemy infantry have to fight their way in there. Is it really that difficult to program the AI to play with some semblance of common sense? I am not sure what to think of this game at this point. It is frustrating to watch this AI do such dumb things. I hope you devs look at this. GIVE THE AI FIGHTING SPIRIT!
 
One thing I noticed watching a video LP, is that the AI does not fight for their capital. In this game Arabia lost it's capital, making peace before the next turn. Arabia had great war bombers vs. invading artillery, they should have captured their capital back, or at least kept fighting while they have the tech advantage. This AI has no resolve, who doesn't fight for their capital? At least try to get the capital back, don't give in the turn you lose it.

I don't remember in my vanilla games the AI giving up their capital so easy after it was captured. As far as I know it seemed harder to get peace at that point.

Is that the Sweden game by Buzzdowan? It sounds so much like it.

In the Maya video by MadDjinn, he took Japan's capital, despite Japan's technological superiority and immediately asked for peace afterwards.

I agree with you. The AI should fight for its capital after it had been captured.
 
You know, I do not see these complaints in my games (i.e., the AI does not behave the way that others are stating, except maybe in very rare instances). On the contrary, in my games, the AI does exactly what some people are asking. For example, the strategy of pushing melee units backed by ranged firing from behind... the AI almost always does this in my games.

I think that perhaps it might vary depending on specific AI personalities/leaders as well as specific contexts. The OP sounds like a totally different game from mine.
 
You know, I do not see these complaints in my games (i.e., the AI does not behave the way that others are stating, except maybe in very rare instances). On the contrary, in my games, the AI does exactly what some people are asking. For example, the strategy of pushing melee units backed by ranged firing from behind... the AI almost always does this in my games.

What happens when you focus fire down their ranged? Does the melee retreat or just suicide into your ranged?
 
What happens when you focus fire down their ranged? Does the melee retreat or just suicide into your ranged?

They usually retreat and try to draw me into an ambush, or they use terrain to their advantage (including using fog of war that they should not be aware of... but that's the AI for you). They also coordinate efforts when they should not do so (enemy AI, other AIs that are supposedly enemies, barbs, and CSes... all coordinated against the human in most instances).

The only times I see a melee suicide into my squads is if they choose to eliminate a unit that I am attempting to retreat. I do the same thing from time to time, of course, as does anyone.

There are a few times that I have seen the AI get confused by terrain features. I chalk that up to the random terrain generation.
 
The AI also goes after crap units with its bombers, while it's capital is under attack. What it should have done is destroy at least an enemy artillery per turn, and deal with infantry. Instead it is bombing hakkapeliittas way out on the flank (placed there to deceive the stupid AI.)

City defense by the AI can be sad. I always have along some wounded or weaker units to bring up for the enemy city to chew on while I sit pounding it with my artillery while full health infantry units stand by the walls safely.

I am pleased that I now have to take the city down to zero before it will fall. The change from 20 to 200 points (10 going to 100 for units) was a good move in GK
 
Combat vs AI is extremely easy in this game because the AI doesn't have a clue. I play immortal and beat the AI easily because they simply throw away all their units. Watch Sidon's Youtube videos for how to destroy AI units on Deity. I think there are many simple changes to the AI that could be made to improve the difficulty of combat. Here are a few:

1) Prioritize ranged over melee military techs. Get crossbowman, cannons, artillery before infantry.
2) Don't send units into enemy territory if you see more than one or two enemy units. They will simply be eaten up by enemy ranged.
3) Don't make that many melee units. A good ratio is probably two to three ranged to one melee and/or one horse unit.
4) Use citadels. When you have extra great generals, put a citadel into the territory in which you are attacking. It doesn't really matter where (OK it does, but any use is better than no use because citadels provide huge bonuses and because extra great generals come frequently).
5) The AI withdraws from combat way too early. If you send in some units and they are damaged, you have committed yourself to the attack. The AI should press forward rather than withdrawing and allowing additional damage from my ranged.

These are a few easy changes that would make the AI much more difficult from a combat perspective.

What makes you think any of those changes would be easy to make? (1 and 3 might be, but 2 and 5 certainly are not.)
 
Personally, I'd just like the AI to accept that the war has gone into a stalemate that neither of us can win, and therefore accept a peace treaty that doesn't have me handing over 3 cities, all of my gold/gpt and every luxury resource.

*mumblegrumle*

Spoiler :
I have been at war with Rome since catapults were current, we're up to artillery by now and he still refuses to accept he cannot win. My mood isn't helped by the fact that I've just been backstabbed by two other civs, while I was trying to press for a Roman city to speed up things a bit.

The screenshot is just before Babylon declares war.
 
It's easy to agree with PhilBowles on several matters so I'll just add one easy solution even though it's a bit contradictory with posters above: stop the endless moving & just shoot at something.

Surely there're times when retreating & healing is wise but swapping units without even attacking anything is the worst possible function for units. AI has enough units few to be sacrificed and still get a healthy bunch surrounding city/cities with a bit of added conviction.

G

To add to this point, there are many situations where you have a unit that is going to die on the next turn, no matter how you move it. In those situations it is always advantageous to attack with it and have it die than to have it sit there and heal or try and move it away. The AI should be coded to understand this.
 
2) Don't send units into enemy territory if you see more than one or two enemy units. They will simply be eaten up by enemy ranged.
5) The AI withdraws from combat way too early. If you send in some units and they are damaged, you have committed yourself to the attack. The AI should press forward rather than withdrawing and allowing additional damage from my ranged.

What makes you think any of those changes would be easy to make? (1 and 3 might be, but 2 and 5 certainly are not.)

You are right. The logic for 2 and 5 would be more complicated than I have stated above. It would require some listing of situations and prioritizing, etc. This is more than just a simple fix. However, there are definitely situations where the AI does stupid things and I think that at least identifying those situations, and preventing the stupidities, could be a somewhat simple matter.

For example, right now, the easy way to destroy AI armies attacking your cities is to have a lot of ranged and focus fire their units down, one by one, prioritizing ranged, or if melee is in 1-2 tiles of your city, attacking melee. For example, in the medieval era, if I have 3 crossbowmen, and there are any terrain features around my city, I am virtually guaranteed to hold off an attack. It seems like in those situations, that the AI will not really care that it cannot win, and will attempt to attack anyway. This will cause the AI to throw away all its units.

It is situations like these that cause me to believe that the AI is just stupid. Perhaps these no-win situations should be programmed into the AI. Then the AI can take appropriate measures. For example, get horses to flank (if the terrain allows -- the AI can pull off feint maneuvers by attacking with a frontal force and then taking your crossbowmen out with horses from the side). Or if these things are not possible, don't attack that city. This is surely not simple to program, but you can see that not having a solution is frustrating. I can't imagine that some measure of trial and error cannot come up with at least a clever seeming solution.

Regarding 5, yes, withdrawal and advance logic is probably very difficult. However, there are some simple situations where the logic can't be that difficult. As hobbsyoyo said:

To add to this point, there are many situations where you have a unit that is going to die on the next turn, no matter how you move it. In those situations it is always advantageous to attack with it and have it die than to have it sit there and heal or try and move it away. The AI should be coded to understand this.

I agree with this. If withdrawing, the AI should attempt to withdraw to a square to which none of my units can fire. If such movement is not possible, the AI should instead attack one of my units with that inevitably dead unit. Many many times I've seen AI units just wander back and forth in my territory, and it makes it very easy to just kill them with ranged.

I should add to all of my comments that I recognize that with the balance patches and the recent expansion, effort spent in retooling the AI would be essentially wasted after each new patch. For example, horseman rushes worked well upon initial release, but were greatly reduced in effectiveness afterwards. Obviously, an AI programmed to perform horseman rushes would have to be reprogrammed. This would lead to wasted developer efforts. However, I feel that there are probably some situations that might be universal. The always pillage citadel idea is a great example. Also, sometimes, units end turn without firing at me or without pillaging my improvement. This should never happen.
 
Top Bottom