Time for some AI love

Time for some AI love

With Legendary Heroes out, I can finally start reading how people are playing the “finished” game. Kael’s gotten me tons of reports and I’ve started tackling them one by one.

I am hoping to have the first batch ready for the next update (perhaps as early as next week). But that won’t be the end of it. I plan to take care of some low hanging fruit strategy suggestions first and then go on and deal with the more challenging aspects that will require a lot more play testing to do.

Stay tuned!

In the meantime, check out 8 out of 8’s video impressions of Legendary Heroes:

I think it is important to fix the auto-resolve bug where any attack that can target more than one target automatically targets EVERY enemy, greatly handicapping the AI. See http://forums.elementalgame.com/445327.

Just a couple of AI issues that I've noticed before that I think need to be looked at. I'm currently playing the 1.1 beta.

First, Kudos! I finally had the AI use a area effect spell on me. However, the AI was able to use Freeze several times in one turn and then did the same thing the following turn. That's breaking the rules.

I still find that the AI builds excessive pioneering units and just sends them off by themselves, even late in the game when it appears that there are no places to settle or even place a outpost.

As mentioned, when you get a sovereign to surrender, often they have something like 10 pairs of leggings and something like 10 horses and Wargs and will still be walking. I think the issue might be with equipping the item. Also they never seem to sell anything, but the AI seems to be rarely out of money, so it's not that big of a issue.

In diplomacy, when I'm at war with a faction, I shouldn't be able to trade with them. A tactic I use occasionally is to trade with a faction I'm at war with and take all their gold, horses/wargs, crystal and metal if I can, in that order.

The AI doesn't seem to put any thought into building units with increased initiative. Often I have all my units move at least once before the first AI unit gets a chance. This puts the AI at a real disadvantage in tactical battles. Increasing this one issue would make tactical battles much harder for the human player. Along the same lines, AI doesn't use spells that increase initiative either. Rather that using a Candlecloak spell, something that increases the initiative of all units would be a much better spell.

I rarely if ever see the AI with mounted units and the AI doesn't seem to put a premium on finding, exploiting, capturing or destroying warg or horse resources. These resources are the first thing I capture after a shard as the increased movement both stragtically and tactically is a big advantage. The AI needs to build stacks that all mounted units if possible. Also, it seems when the AI does build a mounted unit, it's always level 1 and is usually not that good. Because their war stacks are slow, I can usually use a Freeze or Tremor spell (or a tornado spell if the stack is very powerful) to slow or stop the stack until I can get a army in to address it.

It might help if there was a counter-spell that can be cast by both the AI and humans that either disrupt or negate the after effects of Freeze, Tremor and Tornado spells - this counter-spell might be unit based so unmobilizing a single unit isn't as costly as unmobilizing a stack of units.

I posted it sometimes, just want to be sure that it gets frog's attention:

My insight into tactical AI:

- swarm mechanic - i would like to make point, which can clearly be seen in fights of one against many (though applies to other battles as well). Let's presume a single dragon fights my army of 6 units. My units surround a dragon and start to hit him, but damage is low and it will take time to kill. Now, the dragon any time he attacks he should move out of the circle (if possible) and THEN attack. The optimal move is to move in such a way that dragon will have contact with one unit only, and preferably the one that moves next. In this case, instead of having 6 units attacking and having swarm bonus, we will have series of attacks, each one without full bonus (first unit - no swarm bonus, second one moves and has now +1 swarm bonus, third follows with +2 swarm etc.).

This example shows the problem with AI - due to new weapons and skill positioning became more, and more important. However, once AI unit is in the zone of enemy unit it NEVER moves to reposition itself, but ALWAYS attacks.

Instead i propose:

Before attacking unit checks if a better position is available. However, only those positions that end up with attack are considered (this to avoid running around and doing nothing). Priorities should be: avoiding being swarmed, finishing wounded unit, and finally, the maximization of damage.

In general, however, units that are swarmed should always move and attack, and not just attack whatever is close at hand.

Would like to see some diplomacy options implemented... right now AI interaction is rather spotty at best.

1. Ability to 'trade' cities. Say one takes an AI city, one can than ransom it it back to the AI for resources/peace. Or you liberate an ally's city from the enemy, and then have the ability to return it to your ally resulting in a big boost to relations.

2. Ability to mediate for peace between two warring AI factions. This may be harder to implement as you have to see both sides needs. But the AI already has a wage of how much it will expect in exchange for peace, usually the stronger faction is going to require some kind of compensation, if you were to mediate and pay off this value, that is already calculated i believe, then you can obtain peace between two factions. Maybe they can take into account their relationship with you. Its so weird to be allied with two factions, and then have them go to war with each other and have no say in the process.

Both 1-2 should not be too difficult to implement, but to balance the values might take a little bit of experimentation.

3. Ability to make true vassals of nearly conquered AI factions. Essentially if an AI player were to surrender they can instead be made into a vassal state. They would still operate autonomously, and keep their remaining cities, but would cease diplomatic relations. They would assume any treaties/alliances/enemies that conqueror has. and can be requested to paid an indefinite tribute. With 1) implemented you would be able to return some of the vassaled AI's cities to it so it can function properly.

That's really great news. I've put suggestions at other points in the forum, but to summarise them all in one place:

1) Please have standard skill upgrade paths for AI heroes to use so that it builds its heroes more effectively. E.g. death magic summoner, bow using assassin, club using warrior, etc. etc.

2) If the AI is not always building in all its cities (as is apparently the case from the Fog Of War thread) it certainly should be! It should also be using all its Essence slots all the time if possible, with Meditation as a fallback option if nothing else is suitable. The Fog Of War thread suggested that it seemed to only be adding one city spell at a time, there isn't really any reason to do this.

3) The AI should put units within one move of each other into maximum size stacks if it can. This is most obvious after Tornado, but it also seems to happen when it's sending reinforcements.

4) The AI should target Outposts and loot more. In general, if it has a target of opportunity (e.g. it has a more important target but comes within one move of something it can take) it should get the thing within one move. If it gets to its goal it should immediately get another goal (so it can use up movement points). Settlers who arrive at their desired spot should immediately build, and the AI should then decide what it can do with that city or Outpost.

5) The AI should prioritise production and unrest production buildings more, especially on higher difficulty levels. I understand that different AI personalities may have different priorities, but in general they don't seem to prioritise production as much as they should. I capture AI cities after 100 turns and they still haven't built workshops.

6) In normal circumstances the AI should only train units in fortresses.

7) If the AI has just lost a lot of units it should add unit training to the front of its queues.

8) If its in defensive mode (it has a large enemy stack in its borders) in an ideal world it would use a different flavour of strategic AI, where it focuses entirely on defending its cities, training more units, building defensive buildings, using strategic spells to immobilize the danger stack, and try to build up a powerful enough stack or stacks to repel the invaders. In general it shouldn't move its units from its cities unless they're helping to defend against the danger.

9) Is the problem with creating mounted troops simply that it doesn't have unit designs for the mounted troops? In general I can't see any reason not to build its normal units with wargs or horses if it has wargs or horses available.

10) Not really an AI issue but it does seem to be quite a serious exploit; giving a hero a horse and then waiting for monsters to leave their lairs so you can steal the loot is just too powerful. Either a: the main monster group should never leave its lair or b: the main monster group should never leave its lair on higher difficulty levels or c: it should be an option to say whether the main monster group ever leaves its lair.

Thanks again for creating such a great game, I haven't enjoyed a game this much in a long time.

As GC2 was brought up, I thought I'd chime in too. The behavioral AI in GC2 was top notch... each race felt different and felt like it had a personality. I didn't feel like I was playing against a generic AI but against that actual race. And each race had a different feel to it.

Any move to make the AI like it was in GC2 is a move in the right direction.

I'd like it if Kraxis would stop paying small, almost dead factions to declare war on me, when it's quite obvious who's doing the paying, I've never even seen said faction, and am more than capable of crushing him.

I hope to post some private builds this weekend. These would just be EXEs but the forums are a treasure trove of ideas.

Alstein pointed out the main thign which is that the AI, at this state, plays the game like I would. In GalCiv, I had the advantage of seeing lots of people play the game (and being able to spend crazy time on the AI). LH/FE have always changed so much during dev that I was playing a game of catch up.

I hope to post some private builds this weekend. These would just be EXEs but the forums are a treasure trove of ideas

Frogboy, I'm having some issues getting the AI to use custom sovereigns and custom factions properly it seems.

Also it was mentioned earlier in post #14 about AI becoming Vassals. That would be an awesome feature from my perspective (sometimes if you want a buffer zone where you aren't committed to dealing with enemy units, plus for any role-play purposes for a story you're playing it would increase immersion).

I like the idea of the AI playing differently depending on the sovereign's personality, although I assume it would be a lot of work because you'd have to come up with several different viable strategies.

The AI rushing the player as soon as it meets you could certainly be interesting, although I'm not sure if it would actually be a more successful strategy, as currently one of the better ways of beating an AI (assuming you don't already have an overwhelming advantage) is to let it kill its stacks on your well-defended city.