My AI frustrations

As I continue to play, I'm going to consolidate the frustrations I have with the AI:

 

  1. First, and most annoyingly,  I find them constantly neglecting obvious treasures around their capital city and in their own territory. Free stuff, so why can't they be more focused on getting it? 
  2. I still hate that I can't even toggle off seeing AI city building queues. 
  3. They tend to settle on the good, but not best, squares. 
  4. They don't seem to be participating in quests. Am I wrong?

To be continued...

8,828 views 15 replies
Reply #1 Top

First, and most annoyingly, I find them constantly neglecting obvious treasures around their capital city and in their own territory. Free stuff, so why can't they be more focused on getting it?
End of quote

I do believe that this was a design decision to stop the AI from being too efficient from taking these goods. They toned the AI from grabbing everything in sight so it leaves the player with the ability to find goodies later in the game. (But that was a long time ago when that was discussed. It could very well be an AI error)

They tend to settle on the good, but not best, squares.
End of quote

This one is a difficult one to say a comment on. From the human perspective we can decide what squares are better rather quickly and in each circumstance. There are times when choosing the numerically best square is not the "best" square on the plot.

Should the AI settle quickly if they notice another player nearby or monster to have a city in the location and beat you to the spot (I've done this to the AI), thus, it would be better if the AI did settle quickly if it were a pioneer race.

Should the AI settle in a spot that will cause a chokepoint in the land preventing the Human player from entering a particular area unless they have an agreement or are at war. This may lead to a sub-optimal spot, I've done this as well, but not always.

Should the AI settle in the best spot next to a dragon, or settle in a spot that is a few spaces away so the level 1 town will not intersect the dragon, but a level 2 town might. I've chosen he sub-optimal part (which leads me to say that the auto-build should take into account the immediate border expansion into account and choose not to build in such a way to ensure the border doesn't include a monster. Unless there is no choice, then choose the monster of least damage potential)

Should the AI settle in the best spot if it is next to a wildland. I surely wouldn't unless it was on the side of the land and not at the entrance... some wildlands have distinct entraces.

Each of these scenarios leads to the problem of evaluation by the AI, it becomes difficult to classify some of these objects in terms of a decision process, like the "entrance" to a wild land. I could redesign them and the AI will now have to relearn that wildland that I created, but each time it is entered into the game. Not something that is worth the time to figure out for one, and implement for the other.

What would constitute a chokepoint? a player could easily cast raise land around the border and still get around, but in a chasm that is not an option. Leads to rather convoluted decisions to be made there as well.

In all, I would prefer the AI to settle on the best squares, but the good squares are decent enough for me.

They don't seem to be participating in quests. Am I wrong?
End of quote

Yes you are wrong. They do participate in quests, if the quest doesn't have the tag that forbids them. But they also, do not encounter the same quest that you do. For example, they do not fight any of the monsters or do the encounters in the quest. Kind of hard for the AI to read what everything is saying and guess at the consequences. Thus, it does a random role based off the spawn rating (I think) that determines if the AI was successful at that particular quest. This leads to the extra problem that the AI doesn't get some goodies that are provided in the quests.

I would like to see the AI, do a little more with questing. But that might be a little too much to program. It would probably require that the quests all have to have an AI scripted quest line, so if an AI encounters the quest, the "AI" quest portion is streamlined for the AI to follow. This would redefine the entire questing system, but it is not unforeseeable change.

Reply #2 Top

I don't understand why the AI leaves goodies lying around. A human player wouldn't, and neither should the AI. It doesn't necessarily need to attack every lair; most obviously it might not have a powerful enough army, but also not clearing all lairs is a valid strategy if you want to use the generated monsters to level your heroes. But it really should pick up undefended loot.

Other issues with the strategic AI for me:

5) It doesn't build stacks correctly from individual units. It can build decent stacks, but this seems to break down at times (possibly after you've killed or broken up its biggest stacks?). This is at its worst if you use Tornado, when the AI will keep its units separate and allow them to be picked off, but it's a more general problem as well. There needs to be some logic that says building a maximum strength is a high priority goal if units are close together. Sending size one armies off to get picked off is just dumb. Not grouping units together which are in the same square also seems dumb. They're probably heading for the same place, and even if they're not, it's almost always better to have larger stacks than to have lots of one unit stacks.

6) it doesn't level its heroes correctly. There should be standard levelling paths which the AI can follow depending on class and the exact role of that hero. Is this a summoning mage or a damage focused mage? What weapon type does this hero use? Does that weapon type use a shield? Does this hero have access to chain or plate? Is this a support hero or a melee hero? Etc. etc. If it wouild be helpful to have hints, maybe we could save hero designs like we save unit designs.

7) It doesn't take Outposts when it seems obvious to do so.

8) It doesn't defend its cities correctly. If you wait long enough it will generally send defenders on a wander, despite your large force sitting nearby.

9) It seems to build units in non-fortresses when there isn't any obvious need to.

10) It doesn't seem to refocus its production on units rather than buildings if it has suffered major losses or is in a war against someone with more power. It should put unit building at the front of its queue. As it is, at the moment if you kill two or three stacks the war is more or less over.

11) It doesn't seem to prioritise production and unrest reducing buildings as much as it should.

There are probably others but that seems like plenty to be going on with!

As I've said before I don't think the AI is terrible. But it would be nice if the worst errors could be eliminated.

Reply #3 Top


I'm going to repeat a bunch of stuff that parrottmath said and add some of my own stuff.

1.  At first, they said it was a design decision to leave goodies lying around because finding goodies is "fun" for the player... which it is!  Later, Brad said he wanted the AI to scarf all the goodie huts so he says he changed that on the higher difficulties.  For whatever reason, the ability of the AI to scoop up goodie huts changes with every patch.  Having said that, I prefer the AI leave a few things around for me to get.  I'm a player and I like to have fun and I like treasure.  By the way, if you've ever forced an AI sovereign to surrender, you'll see they've accumulated tons of uber equipment and items without needing to scarf up every goodie hut out there.

2.  Some of their city locations are a little suspect.  Some are bad and some are too good (that 5/4/2 spot wasn't there when I looked for a spot).  Parrotmath brings up some good points that sometimes the AI may be avoiding a monster or something, but sometimes I think it just goes for the first spot it finds.  I see that a lot in outpost placement too.  For example, if it had settled one more tile to the right, it could have gotten both the iron mine and the shard.

3.  They do participate in quests.  That's why I try to open every quest hut I see even if I don't finish the second half of it just to keep the AI from doing them.

4.  For people that think the AI doesn't make good stacks, you need to play every faction and make customized units.  Then when you play against those factions in future games, you will come to fear the stacks of doom you helped create!  I do notice a few bad stacks here and there, but you should see the Ridiculous game I'm playing now... I'm getting hammered by waves and waves of 9 army stacks with 6-units-per-troop made up mostly of customized units I created in previous games... argh!

Reply #5 Top

#2 on city location, I suspect that sometimes the AI hasn't scouted the entire area when it sends out a pioneer.  The pioneer may reveal a better spot while it approaches the target location, but the AI wont change targets.

#5 on stacks, I think the AI doesn't grok what happens when a Tornado hits its stack.  When that happens the AI forgets what it was doing with that stack because it forgets the stack ever existed.  From its perspective it's got a bunch of single-unit stacks, none of which are particularly useful on their own.  And so they'll only reform into a stack once it decides to take up a new quest or assault.

#6 on hero leveling, in FE the AI picked its champion traits randomly.  It's probably the same in LH, but with the skill trees, it would make more sense to do some weighting.  Basically, the AI should weight towards picking things out of the specialized skill tree.  And once its started down a path, it should have extra weight on finishing that path rather than going broadly across the entire skill tree.

The AI has two major problems.  One, it uses terribly flawed and inexact metrics (like the power ranking) to gauge relative strength.  Two, it doesn't seem to be have any mechanism for telling how its been doing.  It determines each turn as a blank slate, seemingly failing to take into account the results of previous turns.  It doesn't remember that the huge army it sent to stop your advance failed, it just sees that you have a big army and it has nothing.  It doesn't seem to be able to figure out that you are methodically gobbling up its territory, it just sees that you are big and it is small.

A smaller problem it has is inflexibility.  Once it makes its mind up to do something, it follows through regardless of what changes in the meantime.  It's one of the causes for poor settlement locations and likely responsible for #7, #8 and #10 in your list.

Reply #6 Top

loved random traits for my awesome lvl50 sovs they where usually ass war mage def by that time. or just mage

 

Reply #7 Top

I've been trying to balance things with regards to the difficulty levels so that the AI gets more aggressive about quests and goodie huts based on the intelligence. So on easy, they'll leave lots of quests and goodie huts around.

Now, with regards to quests, as was mentioned, they use the spawn rating to determine whether they succeeded or failed (if they fail, their army is wiped out and if they succeed it succeeds).  

Some quests (Mimbly for example) just can't be done by the AI.  it wouldn't make sense.  It's one of those things in a single player game where you have to try to find ways for the AI to play the same game the player is without ruining it for the player.

Reply #8 Top

Quoting Frogboy, reply 7

I've been trying to balance things with regards to the difficulty levels so that the AI gets more aggressive about quests and goodie huts based on the intelligence. So on easy, they'll leave lots of quests and goodie huts around.

Now, with regards to quests, as was mentioned, they use the spawn rating to determine whether they succeeded or failed (if they fail, their army is wiped out and if they succeed it succeeds).  

Some quests (Mimbly for example) just can't be done by the AI.  it wouldn't make sense.  It's one of those things in a single player game where you have to try to find ways for the AI to play the same game the player is without ruining it for the player.
End of Frogboy's quote

In regards to the quests, then it is important when designing quests that have no possibility of destroying a players army, that the AI shouldn't be allowed to do these types of quests?

Reply #9 Top

I've started to watch numerous "Monster" stacks and stacks from "quest zone areas".  I have noticed that AI cities are completely ignored by these wandering stacks.  EG. A Strong Guardian Statue army started next to a enemy city with only an archer inside, and moved past it over 4 turns to approach a huge stack belonging to me south of the town.

 

Working as intending or is this something that needs to be fixed?

 

Reply #10 Top

One thing I can tell you for certain: The monsters don't recognize an AI player from a human player. If it seems like they're "picking" on your cities it's a placebo effect.  

Reply #11 Top

Not true Brad.  In a recent game, I watched "Morian, the Ruin of Summer" get parked behind an AI city for hundreds of turns (not kidding).  All it did was stand there and eat the occasional Settler that wandered by.  There was one time Morian decided to walk to my city (~16 tiles away) so I moved him back to his parking space (Control-T). 

I thought about taking that tile space before the AI did excepting the fact Morian was tromping around, an AI settler walked up next to him and plopped down the city.  Last I recall it was close to hitting level 3 as Morian stands there polishing the Turnips.

I'd like to stop using the cheat code to move units around.  Just get tired that the beasties unfairly target my cities & units as they rarely seem to take the AI Player's units into account.  Not to say I haven't seen AI cities taken down by monsters, but there's a definite lack of consistency in how they target nearby trespassers.

Reply #12 Top

I've also spent many turns next to very dangerous dragons and strong skeleton groups for 40-50 turns with them not attacking a single city of mine. They were within 3 tiles, and in my city borders. In fact, to try to test my militia armor mod, I teleported monsters ALL around my city waiting for one to attack, much to my dismay after 100 turns they didn't attack it... :( I surrounded my city with 8 monster groups, including slags, butchermen, bandits, trolls... they would not attack my city... it was a pain.

Reply #13 Top

Quoting Frogboy, reply 10

One thing I can tell you for certain: The monsters don't recognize an AI player from a human player. If it seems like they're "picking" on your cities it's a placebo effect.  
End of Frogboy's quote

I played around with that very thing back in the FE beta and can confirm that, once seen by the player, they treated both my units and the AI's units the same.  

The thing that was different is how they acted before I discovered them.  I posted back then about a dragon that chilled in its lair for probably dozens of turns with an AI city right next to it.  Once I uncovered the terrain, it moved out and started chasing the AI.  I reloaded and didn't discover the dragon until several turns later and found that it was still chilling in its lair.  It wasn't until I discovered the dragon that it became active.  I can't find the post though.  

 

Reply #14 Top

Really interesting comments from sweatyboatman. The point that the AI doesn't re-evaluate targets as it sees something new makes a lot of sense based on the behaviour I've seen. So for example, the AI very effectively sent its stack to attack my capital, but ignored my outpost along the way, when it could easily have taken it with an (at most) one turn delay on its primary target. Even if it didn't bother garrisoning them, that's still a turn where I lose the production, and if you're on the defensive you're usually not in a position to be retaking outposts anyway.

Re: #5, yes clearly it's not good at reassembling stacks. But it really should be possible to fix this. If it's "forgotten" what the army was doing, i.e. it has nothing better to do, then it should look to combine into stacks before doing anything else. If units end up in the same square they should look to become one stack. There are very few occasions, especially when at war, where it makes sense to have small stacks as opposed to larger stacks. Once it's at maximum stack size, then look for something to do.

The main reasons I can think of for having smaller stacks:

1) Picking up more loot/ doing more quests

2) Sending reinforcements/ training new units

3) Putting faster units together

It doesn't do number 1 very much anyway. For number 2, it should presumably be possible to set muster points where they can assemble into proper stacks. (I suspect that this logic not working as well as it could is a reason why stacks seem to get smaller after you kill the first few.) Number 3 is a fairly minor consideration and probably not relevant to the way the AI plays.

In general, it would be great if armies could do a quick re-evaluation at the start of each turn to see if it should "change it's mind". So in other words if it can build a bigger stack with units within one move, or take an outpost, or take some loot, it should look to do that. After that it would probably have to re-evaluate its target (perhaps bearing in mind what the original goal was?), but that seems desirable anyway. And if it's got closer to its original target, presumably if that's still a valid target it will refocus on that target anyway.

Above all, especially in enemy zone of control, it shouldn't be sending in 1 unit armies, and if they get separated (e.g. by Tornado) it should be looking to rebuild stacks at the first opportunity.

Reply #15 Top

As for Mimbly and the AI, maybe Mimbly should be a random event for the AI?