1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

AI Heroes

Discussion in 'Civ4 - Fall from Heaven' started by redazncommieDXP, Dec 14, 2009.

  1. redazncommieDXP

    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?
     
  2. Ekolite

    Ekolite The Mighty Jungle

    Joined:
    Sep 15, 2007
    Messages:
    5,449
    Location:
    Celtia Atrebatia
    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.
     
  3. redazncommieDXP

    redazncommieDXP Warlord

    Joined:
    Jan 5, 2007
    Messages:
    176
    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.
     
  4. Ekolite

    Ekolite The Mighty Jungle

    Joined:
    Sep 15, 2007
    Messages:
    5,449
    Location:
    Celtia Atrebatia
    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.
     
  5. Emptiness

    Emptiness []

    Joined:
    Jan 7, 2009
    Messages:
    1,922
    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.
     
  6. redazncommieDXP

    redazncommieDXP Warlord

    Joined:
    Jan 5, 2007
    Messages:
    176
    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.
     
  7. Ekolite

    Ekolite The Mighty Jungle

    Joined:
    Sep 15, 2007
    Messages:
    5,449
    Location:
    Celtia Atrebatia
    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.
     
  8. Emptiness

    Emptiness []

    Joined:
    Jan 7, 2009
    Messages:
    1,922
    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.
     
  9. WCH

    WCH Prince

    Joined:
    Mar 26, 2008
    Messages:
    491
    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.
     
  10. xienwolf

    xienwolf Deity

    Joined:
    Oct 4, 2007
    Messages:
    10,589
    Location:
    Location! Location!
    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)
     
  11. DaveGold

    DaveGold Emperor

    Joined:
    Dec 1, 2009
    Messages:
    1,058
    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.
     
  12. Deon

    Deon Lt. of Mordor

    Joined:
    Jan 13, 2008
    Messages:
    2,956
    Location:
    St.Petersburg, Russian Federation
    Actually it already does it. It picks a fastest route through the terrain with the highest defence in the end.
     
  13. Emptiness

    Emptiness []

    Joined:
    Jan 7, 2009
    Messages:
    1,922
    I really like the sound of this idea. I think it will be a huge improvement.

    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.
     
  14. DaveGold

    DaveGold Emperor

    Joined:
    Dec 1, 2009
    Messages:
    1,058
    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?
     
  15. Lone Wolf

    Lone Wolf Deity

    Joined:
    Dec 4, 2006
    Messages:
    9,891
    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.
     
  16. Sephi

    Sephi Deity

    Joined:
    Jan 25, 2009
    Messages:
    2,908
    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.
     
  17. Ribusprissin

    Ribusprissin Warlord

    Joined:
    Mar 11, 2009
    Messages:
    114
    Rule 63. Personally, I'd pay to see rule 34 employed on FFH ...
     
  18. mansamusa166

    mansamusa166 Chieftain

    Joined:
    Jan 5, 2010
    Messages:
    10
    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.
     
  19. JonathanStrange

    JonathanStrange PrinceWithA1000Enemies

    Joined:
    Dec 25, 2005
    Messages:
    1,306
    Location:
    TThe Dreaming
    The AI does has a David Bowie approach to Heroes: We can be Heroes, just for one day
     

Share This Page