Community Feedback Needed: Biggest AI issues

Kael

Deity
Joined
May 6, 2002
Messages
17,403
Location
Paris, France
Its that time. I need to know specific things the AI needs to be able to do to make it competitive. Try to shy away from global requests "teach it to use the spell system" as thats to big to be meaningful. Instead I need surgical examples that are seriously hampering the AI.

Good examples would be "Hyborem doesnt sac manes to make his cities larger" or "the elves wont build improvements on forests". Obviously both of those arent problems but thasts the kind of things Im looking for.

My big hitter right now is teaching the AI about when/where to build unit enabling buildings. I think its better in 0.32, but Im still working on improving it.

With patch 0.32 "b" we will have access to jdog5000's AIAutoPlay. To use it go into the python console (you need chipolte in your civilizationiv.ini to do this) and type CyGame().setAIAutoPlay(100) to have it run 100 turns without you. Of course you can change the numebr to however many turns you want it to do.
 
The AI does not seek out and acquire Goody Huts, nor Equipment.

The AI does not seek out any Tiles or Units to Improve via Spells (Spring/Vitalize/Sanctify & Enchanted Blades/FireArrows)

Sidar will never settle their Shades. I am not sure if they ever Wane any units (gifted them 20 Shades, none settled)
 
Sidar will never settle their Shades. I am not sure if they ever Wane any units (gifted them 20 Shades, none settled)

Thats an intentional block. We wouldnt want an AI that sacrifices all its powerful units. What do players use to determine if they should wane a unit or keep him?
 
I've noticed in 2 games that Khaz built nothing but thanes of kil, and would have like literally 100 of them sitting in their cities with nothing else.

AI doesn't seem to build much defenses, or would use defensive units to attack. For example, many cities don't have longbow defending them or they would use longbows to attack. I'm thinking in particular the Dovilla would attack with nothing but stacks of javlin throwers, I've rarely seen them get their champion unit, war machine or really any of the higher tier units deep into the game.

I don't know if it's they dont tech properly, but most of the time near the end game, where I've researched most techs, the most AI civs still running around with tier 2 only the few top ones have tier 4.

This is all playing on monarch level.
 
Issue: Terraforming never happens with the AI.

Solution: At the beginning of the turn, if an AI has a unit with spring that doesn't have the SpringScript attached to it, attach it to that unit. The script will cause it to seek out desert squares in it's territory, and turn them into

Repeat this for all relevent spells. The idea here is that one unit (Maybe non hero) will be used by each AI for this purpose, if it happens to get the option.

Issue: Kuriotate AI's build Cities too close together.

Solution: Tell them not to? Not sure exactly how to fix this one.


Issue: Kuriotate AI's improve the terrain around their settlements, which is no doubt horribly inefficient.

Solution: Prevent AI's from working non bonus squares not in the radius of a city.

Issue: Sidar do not wane units.

Solution: Wane units only if they are 1) Non hero 2) Exactly level 6, 3) Not arcane.

Honestly, the AI isn't handling high level units well ANYway, I think they'll get better use out of a waned unit than a high level one in the long term.
 
I've noticed in 2 games that Khaz built nothing but thanes of kil, and would have like literally 100 of them sitting in their cities with nothing else.

I think the AI is designed to spread its religion, as in the past I've held out from giving the Khazad Open Borders for a long time and the turn I eventually give in they flood my territory with tons of Thanes. I think the AI is building up Thanes just so it can spread RoK to everyone it can.
 
Well, the AI really needs to understand that certain buildings are needed for better units. Yeah, big surprise there... More specifically, Archery ranges. Been playing a Doviello game on prince. Lucian and a few beastmen with shock took a continent by turn 195. Literally only three or four good units. Didn't even use fodder units as anything but to occupy the towns I took. Archers would have stopped me in my tracks there.

Another thing involves the AI's handling of stacks. Whether or not they are having success in attacking, the AI will have the entire stack attack a given target. It needs to, somehow, be able to look ahead and see that further attacks, after the initial failures, will not bode well. Something like a check on how much damage the defender took, how many more nits it would take to kill that unit, and how many units are left to attack and defend. Yeah, kind of a tall order there.

This leads into the last specific I can think of. Pillaging. I had a Lanun game where the Svartalfar were doing some nasty things to me with horses. Learned the weakness of an all archer defense there... Anyways, the AI could have rampaged unchecked throughout my lands, destroying all my hard earned towns and plantations. Instead, it kept attacking my hardened defenders, killing a few but giving the survivors enough XP to keep getting stronger and stronger. Perhaps the AI could check the odds or capturing a town and, finding them wanting, proceed to pillage important resources, connecting roads, and move on to another target. Would have been infuriating to play against, but that's kind of what I'm hoping for here ;)

Arg! One last thing. First towns need a second warrior sooner than a worker. Lucian and a sacrifice scout wiped out the Bannor on turn 25 or so. Stupid stupid Bannor.
 
Teaching them to build prereq buildings would be nice but the real problem is getting them to chase the techs that enable those buildings in the first place.

Most AIs seen somewhat decent at getting the recon line techs (early rangers on high difficulties) but the reason for the lack of metal troops is the fact that they put off bronze working and iron working for too long.

EDIT: See the above post? 99% sure that it happened not because the AI was refusing to build archery ranges, but because he didn't even have the archery tech.

Oh, also, Fafnir, I believe pillaging is a personality variable. In both normal BtS and FfH, some AIs do it aggressively, some don't.
 
Issue: Forest-locked non-elven civs put off forest chopping techs for a very long time. If capital + 1 or 2 of the first 3 cities have heavy forest density, that civ will lag way behind in all categories due to lack of infrastructure.

Solution: Either move chopping down the tech tree some, or put greater stress on AI to beeline for it. I see this happen to Amurite civs very often it seems.
 
Thats an intentional block. We wouldnt want an AI that sacrifices all its powerful units. What do players use to determine if they should wane a unit or keep him?

Blocking Wane makes sense. What makes no sense is that I went into Worldbuilder and gave them Shades, in their only city, and so many they would lose money on support, so had to disband, settle, or live through a strike. They settled NONE of them (one went off to protect a worker... not sure about the rest).


As for what I use to determine if I should shade a unit: I am not at war, and the unit is now obsolete (I meet the requirements to Upgrade it, but the upgrade is buildable, not a minimum level requirement Unit). What I see other people using a lot: They decide right when they build a unit (primarily Priests/Adepts) that it is going to be a shade when it grows up. (to match that for the AI you could make the Sidar have an objective target for number of free specialists per city, like they already have for number of defenders per city, and have it attempt to fill this objective with Adepts)

At the very least, some knowledge of the ability to set up a city with a specific "farming" goal would be ideal for most civs, and one of the farm objectives for the Sidar should be an auto-XP (adept or priest) city to churn out shades.
 
A higher focus on founding religions that aren't in the game, and a generally more aggressive religion founding policy. I often go through entire games where the only religions are RoK and FoL. Another thing is the terrible defense policy during the early game of the AI. They often leave only 1 unit to guard each city and only beef up the defense after the borders have settled down. This makes them especially vulnerable to raging barbarians and barbarians in general.
 
This might be a couple issues, but it involves units such as Orthus attacking till they fall over dead. Is the AI told when to retreat and heal? It could be quite dangerous for a lucky lizardman to run out of borders, heal, and come back for more. Instead they attack the next turn. Also Lucian keeps dying early in the hands of the AI. Probably a different issue though (Raging Barbs is on).

I second the equipment comment. AI doesn't seem to capture it or pick it up when they own it.

Units told to explore run headfirst for the first animal they see (usually an elephant). Speaking of elephants, where's the code telling them to move to the exact tile I plan on moving to next turn?

Sorry for babbling. I'm trying to think of things that made me go "wha?" in my last game.
 
yea lately the elephants have been attacking (or my scouts were attacking them) my scouts. I just put it off as a pissed off bull elephant in musth (mating season really) or something like that. It happens rarely though because the elephants themselves are rare. I actually lose more scouts to bears and the occasional lion before they get some strength.
 
solutions for Saldaphon shades:
He should be doing them only if he have several lvl 6 units., If he reaches some certain amount (3, 5 , whatever) he should sacrifice weakest unit to use in best city oply as shade. There should be counter, that will also tell that he already did that, and he will be able do that again at 2*n-1, where n is that starting number after he was able to do 1st shade. 3rd shade aviable when he have 3*n-2 and etc. The number n should be tested and deicided properly. If lets say its good to give him to sacrifice about 1/3 of his units then n=3.
 
I find it extremely annoying that the AI places cities 1 tile away from a river or coast. The Barbarians might be the biggest offenders here, but AIs that actually settle settlers do it too. I am often forced to raze these cities in order to build new ones in sane locations. When you improve Kuriotates city placement, could you also block cities from ever being placed in such dumb locations?


Having automated units do suicide attacks (or wipe out animals you'd rather be able to capture) is also really annoying. Can you block auto exploring units from attacking? Maybe make them stop when they find a rival instead?



For the shades, I'd first say that if it is a religious hero it should definitely wane before switching religions. (The same goes for Royal Guards if they are about to switch out of Aristocracy.) Otherwise, Heroes should not wane. I probably would not block Archmages with level 3 spell spheres from waning (adepts and mages should never wane), but would stop the shades they became from joining cities. In other cases, I'm thinking that it might be good to take the unit's strength into account. Also, it might be good to block the AI from Waning while at war. Lastly, units with negative promotions should wane if they can. Units with Enervation (and disease and plague, if priests are not available) should be more likely to wane, sine they won't get much more xp. Lastly, units that are likely to turn against you (those with Crazen, Enraged, or Burning Blood) should wane and be settled before they can turn barbarian.



Not really relevant, but when you address issues with elven workers could you also stop them from clearing forests when when building routes? I added a Highway route (basically a railroad) that requires clearing forests, and found this makes the elves destroy empires full of ancient forests.


Can you improvements from being built over a mana source? (And while you're at it, allow Citadels to act as cities again? ;))



I really think that all the buildings that currently do nothing but allow units need some other bonuses (xp, defense, trade routes, etc). This would be more fun for humans, and the AI would be more likely to build them. This would let them have more advanced units (without needing to turn off AI building requirements) and make their normal units start out stronger.
 
Also, I think someone said somewhere that the AI wasnt taking fair deals if done by the player. However, the diplomacy is a complex issue that may have to take the back burner for now.

edit: found the post http://forums.civfanatics.com/showpost.php?p=6857373&postcount=2

The reason for that is that the AI isn't redding out resources it already has. It will accept fair deals if you offer resources it doesn't have... but the only way to find out about such resources is by trial and error.

Explanation:
http://forums.civfanatics.com/showthread.php?p=6019613#post6019613
http://forums.civfanatics.com/showthread.php?p=6019711#post6019711

Fix:
http://forums.civfanatics.com/showthread.php?t=246070
 
This isn't a problem, it's supposed to work that way. AI personality, and current opinion of you, is directly related to the deals they consider 'fair'. Not just X science for X science.
 
Back
Top Bottom