AI Heroes

redazncommieDXP

Warlord
Joined
Jan 5, 2007
Messages
176
I feel that the AI does not know how to use heroes effectively. As heroes are so powerful, this causes a major imbalance in favor of the player.

1) The AI doesn't preserve its heroes sufficiently. When I play, I am rather cautious with my hero. I use him aggressively, of course- he's my city killer- but he always travels with his stack and he almost never attacks if he has less than a 90% chance of victory. This keeps him alive and lets him rack up big promotions to turn him into something truly terrifying.

2) The Ai doesn't hunt heroes aggressively. When I see an enemy hero, I pursue him ruthlessly with everything I have. I sacrifice numberless units to ensure his demise. However, I can camp a hero in front of an enemy city with 2-3 escorts and face no murderous dogpile. Of course, I try to keep my heroes well protected and away from the enemy stack of doom, but all the same I feel that the enemy does not take sufficient aggressive action to deny me the use of this powerful unit.

Has anyone else had similar experiences?
 
Yes, it's well known that the Ai doesn't understand the need to nurture specific units to make them more powerful. Hopefully this is something that can be addressed when Kael has the time to get back into modding for a while.
 
Perhaps Kael should look into putting together a team. This is too big a project for anyone to handle on their own. I could certainly offer writing expertise and some light XML coding. I'd work for free of course.
 
There is already a team afaik. Nikis-knight does some of the writing for e.g. and they have guys to make the unit models. I'd assume other people besides Kael work on the actual coding too. Still, with Kael away I would guess that not much can really proceed right now.
 
I could certainly offer writing expertise and some light XML coding. I'd work for free of course.
If you have the technical expertise to improve the AI handling of heroes then make a modmod with your improvements. Then people can try it out, and if your changes are good then they will be incorporated into other modmods, or possibly into the main mod itself.
 
If you have the technical expertise to improve the AI handling of heroes then make a modmod with your improvements. Then people can try it out, and if your changes are good then they will be incorporated into other modmods, or possibly into the main mod itself.

I definitely have no such expertise lol.

That said, would you consider it an exploit/cheat to properly nurture your hero? I mean, my hero and my mages are the BACKBONE of my assault force. They take empires. Hero control and magic support are probably 80% of my game.
 
No I don't think you can consider it cheating to nurture a hero. The fact that heros, something so core and basic to FFH, can become so strong over time surely suggests that it is intended for them to do so. It is a serious limitation for the AI that they are unable to understand this strategy, and although I have no skill whatsoever in modding AI, teaching it to use a single unit in that way seems like a tricky thing to do, especially because it doesn't really apply only to heroes, but also to national units, world units, and any unit that has happened to pick up a substantial amount of xp.

Purely speculating here, but perhaps it is possible to teach an AI to ascociate a certain promotion with a particular style of behaviour? In that case, perhaps heroes, nationals and world units belonging to the AI could receive this promotion. Any unit that reaches a certain level (adjusted for AI xp bonuses from difficulty settings) would also receive this promotion. Then you just have to do the hard bit and actually teach it what to do with these things.
 
That said, would you consider it an exploit/cheat to properly nurture your hero? I mean, my hero and my mages are the BACKBONE of my assault force. They take empires. Hero control and magic support are probably 80% of my game.
There are a lot of tasks that the AI performs more poorly than a human. AI management of heroes is a big problem right now, because the AI does not escort them, but has never been very good. In time, perhaps improvements will be made. Until then, there are a number of ways to compensate the AI for its poor performance - the most straightforward of which is to increase the difficulty setting at which you play. Of course this won't make the AI use its heroes more wisely, but it should make the AI more challenging even if it throws its heroes away.
 
Would it make sense to train the AI to create an escort specifically for the hero? Like to build defensive units with an "escort" unitAI, which gets them to pick an "important" or "vulnerable" unit and follow it around? Escorted units would include: settlers, workers, heroes, great people, high priests and all arcane.
 
Actually the approach I am intending to utilize is that the Hero carries an AI_HERO designation, and that AI type is set to look for and gather units of decent strength. AI_HERO will dominate stack mentality until the stack size exceeds 8 units, at which point it will switch to AI_HERO_PARTY, which will follow attack/harass rules making strong use of Lemming Warfare when the odds are bad, and employing the Hero when odds are favorable. Group size dropping back below 5 will revert the stack to AI_HERO, at which point it will once again seek out and absorb new units. Any AI controlled unit which breaks over Level 6 will swap to AI_HERO as well.

I am contemplating adding in a sub-AI type, since this Hero application being used on any unit which breaks level 6 would mean it may also get slapped on defenders, but the AI can replace defenders rapidly, so it may be a good thing for them to send out a high level longbow with some supporting champions to pillage the neighbors.


I am trying to remember, but as I recall it the escort function for settlers and workers is actually written into the AI_ATTACK routine, such that if there is an undefended settler/worker nearby they will aim to guard them, prioritizing that second only to an unguarded city. The Settlers just refuse to move until defended/escorted, and the workers happen to stay near cities naturally, so just accept a guard if one happens to be granted to them. It may be worth reversing that mentality for them, but I am thinking that it is not, as workers may not have any escorts available, but might wander a large empire trying to find one instead of working, and settlers most certainly should NOT leave the city until defended, even if just to pop over to another city without leaving your borders (could be high movement units just out of your LoS)
 
The big improvment in the AI would be to plan where units in general will end their turn and be safe. Putting escorts with good units would be a step forward but it would be a lot simpler if they had enough (artificial) intelligence to find their own protection.
 
Actually the approach I am intending to utilize is that the Hero carries an AI_HERO designation, and that AI type is set to look for and gather units of decent strength. AI_HERO will dominate stack mentality until the stack size exceeds 8 units, at which point it will switch to AI_HERO_PARTY, which will follow attack/harass rules making strong use of Lemming Warfare when the odds are bad, and employing the Hero when odds are favorable. Group size dropping back below 5 will revert the stack to AI_HERO, at which point it will once again seek out and absorb new units. Any AI controlled unit which breaks over Level 6 will swap to AI_HERO as well.
I really like the sound of this idea. I think it will be a huge improvement.

I am contemplating adding in a sub-AI type, since this Hero application being used on any unit which breaks level 6 would mean it may also get slapped on defenders, but the AI can replace defenders rapidly, so it may be a good thing for them to send out a high level longbow with some supporting champions to pillage the neighbors.
Exactly. Non-hero defensive "AI_HERO" units could have a much higher odds threshold, so that they only risk attacking when success is virtually guaranteed, and thus essentially just act to escort other units to combat.
 
Actually it already does it. It picks a fastest route through the terrain with the highest defence in the end.

When my computer opponent moves Kyra Kythiel alone into a hilly forest to attack my stack of 30units, the tile defence isn't enough to protect her. Who'd have thought it?
 
When my computer opponent moves Kyra Kythiel alone into a hilly forest to attack my stack of 30units, the tile defence isn't enough to protect her.

And not even enough to make it clear that Kithra is male... ;)

But I've always wondered why the comp always does it. I don't see too many stray AI units in regular BTS.
 
I really really doubt the AI does that always. Haven't checked on FFH, but in the wildmana version Kael merged the AI once in Conquest Mode did some pretty cool things with the Heroes. For example when I declared war on Lanun they moved Saverous into the city I wanted to attack. Pretty good move since a Defender with fear and several firststrikes is tough to beat.
 
Yeah, AI treats heroes as normal units.
In my experiences, AI Basium always dies ridiculously early and mercurians lose a powerful hero and traits. Basium on my side or opposing side doesn’t matter. Once I tried to protect him with Chalid and radiant crews, however I could not predict Basium’s crazy behaviors with the commando promotion.
 
The AI does has a David Bowie approach to Heroes: We can be Heroes, just for one day
 
Back
Top Bottom