• Civilization 7 has been announced. For more info please check the forum here .

Did the AI improve recently?

Willgar

Prince
Joined
Sep 22, 2007
Messages
308
Was it a combintaion of recent FfH patches + the civ patch or maybe i am losing my ability to play - but has the AI got better?
In my last game, i wanted a nice comfy victory so selected the elves. However, in this game my main rival Decius (as Calabim) did a few things that surprised me.

1) He used balanced stacks with Mages, Melee, Assasins, Rangers
2) one of his heros stayed in a stack and did not attack recklessly
3) he summoned skeletons like crazy and used them as cannon fodder before committing better troops
4) he used spells like loyalty, valour, haste etc
5) he played nearly all of the game as CoE (i thought he was just not adopting religion at first but he is definetly CoE)
6) no single unit type stacks
7) he retreated when faced with my own defensive stack of doom

Was it just a lucky set of dice rolls or has the AI been improved?
 
Was it a combintaion of recent FfH patches + the civ patch or maybe i am losing my ability to play - but has the AI got better?
In my last game, i wanted a nice comfy victory so selected the elves. However, in this game my main rival Decius (as Calabim) did a few things that surprised me.

1) He used balanced stacks with Mages, Melee, Assasins, Rangers
2) one of his heros stayed in a stack and did not attack recklessly
3) he summoned skeletons like crazy and used them as cannon fodder before committing better troops
4) he used spells like loyalty, valour, haste etc
5) he played nearly all of the game as CoE (i thought he was just not adopting religion at first but he is definetly CoE)
6) no single unit type stacks
7) he retreated when faced with my own defensive stack of doom

Was it just a lucky set of dice rolls or has the AI been improved?

Yeap, we have started serious AI work. Not to say that it will ever be as good as a human, but its definitly getting better.
 
Cheers for the response. Guess i better improve my game then! This will probably be the first game i have lost as Ljosalfar at emperor level in many months. I guess i have got used to the poor AI and have tended to rush through games.

Thank you FfH team - for a single player, AI improvements are my single biggest wishlist item and you have probably just given me a reason to take a day off work :)

/salute
 
In patch E I wanted to vassalize the Khazad, but the Elohim (5th place) had beaten me too it, so with my stack experienced units, Including brigit - this about mid-game, went in to try and do so. However, this was on creation, and by coincidence or not, the Elohim used sanctuary as an offensive weapon! My primary units were trapped inland with some outposts and vassals, while my coastal empire had to fend off a 15 musketman + healers and more stack using rushed units. I delayed Govannan because their advance took away about 9 vassal mana - and I wanted Govannon with all spells free so I could rush Heroic Strength...

On the other hand, I delayed crushing the Khazad and therefore defending my choke-point vassals from the Elohim and vassals because I wanted to dominate / command Maros, or make him relocate to the last worst city of the Khazad and live, but whatever.
 
My current game has been one of the best i have played in FfH 2 in a very long time(apart from some confusion over Nox Noxis) . There is barely 1000 point between 1st and 4th place and the use of spells and stacks formations of the AI has been superb. Could anybody shed any light on the AI changes that have been made - other than the change logs.
 
Try plaing Doviello on Deity ! They usually spawn in my games (20 civs/huge) and become a huge superpower. I usually set them against the hippus (other superpower most of the time) and then have to sneak attack them.
 
My current game has been one of the best i have played in FfH 2 in a very long time(apart from some confusion over Nox Noxis) . There is barely 1000 point between 1st and 4th place and the use of spells and stacks formations of the AI has been superb. Could anybody shed any light on the AI changes that have been made - other than the change logs.

Sure, there is only one huge function in the SDK that was completly rewritten for FfH. Lots of little mods, lots of new functions, but only one base level functiont hat was recreated from the ground up. Its called the AI strategy hash.

The strategy hash is responsible for looking through all the available strategy plans and picking those that are reasonable goals. It is the heart of the AI. The goals influence what that player builds, how he deploys his units, etc.

The default civ4 strategy hash made its decisions about what strategys were viable based on Civ4 data. For example, it had a strategy for performing a land blitz against another player. It would be considered if it had some high movement units, a weak neighbor it shared a border with and a desire to engage in warfare. But to keep from getting its land units decimated it also required access to some anti-aircraft units it could group with its attackers to protect them. Since you could never get any anti-aircraft units in FfH this strategy was never adopted. Now its been rewritten without the anti-aircraft requirement so that the AI will consider rushes fo fast moving units as a surprise rush attack (the Hippus love this strategy).

Missionary creation was another strategy. And as one of the few strategy's the ffh ai would actually qualify for with the old strategy hash it tended to go with this strategy a lot. And when it did it made tons and tons of disciples. Now there is a limit for how many disciples it will produce and the availability of so many other straegys makes this musch less of a concern.

And on and on it goes. There are strategys for going for a cultural victory (which remains unchanged), spaceship victory (removed) and rushing for nuclear weapons (removed). Getting those out of the way and making the various mitlitary strategys make more sense gives us a better starting place to work from.

I still need to add strategy hashes for pursueing altar victories, tower victories, and either attempting to raise or lower the armageddon counter. But that hasn't been done yet.

Outside of that there was also a lot of tweaking around getting the AI to produce unit enabling buildings. This was actually locked itnot he strategy hash as well as one fo the strategys the ai can pursue is unit improvement which would key it to look at building buildings that enable upgrades.

That change improves everything behind it. Because the AI was already good at casting (except for "move to" spells) but it didnt make much difference because the AI wasnt fielding appropriate units because of a bad hash, or keeping the units upgraded because of the building problems.

There is mroe to go, and it will never be perfect. But we know what to do, and we have been lining up the pieces to do this sort of work for a long time. Now that we are here I think we will see good things.
 
You know, I've found that the AI is even better if you let Archery units attack at range, especially on defense. I don't think they ever turn down a chance to attack at range, and are also good at cleaning up the injured stacks (only Marksmen in my version can actually kill at range, and no one has range greater than 1).

Are you sure we can't convince you to include ranged attacks in FfH?



I still really think that spells that require terrains, features, improvements, and buildings need to have these things checked in XML/SDK, since the AI can't understand python prereqs and since these are common python calls that can sow the game down.
 
You know, I've found that the AI is even better if you let Archery units attack at range, especially on defense. I don't think they ever turn down a chance to attack at range, and are also good at cleaning up the injured stacks (only Marksmen in my version can actually kill at range, and no one has range greater than 1).

Are you sure we can't convince you to include ranged attacks in FfH?

We already have ranged attacks, they are the province of spellcasters. I have no desire to add that functionality to archers. If anything I would consider giving them a catapult like mechanic that allowed them to attack and then withdrawl at 50% health or some such.

I still really think that spells that require terrains, features, improvements, and buildings need to have these things checked in XML/SDK, since the AI can't understand python prereqs and since these are common python calls that can sow the game down.

Sure, but keep in mind that adding it to XML doesnt make it understood by the AI. The AI code needs to be written to have it able to react to the "move to" spell correctly. Once that is done the requirement will come out of python. But for now this is the most flexible way to do it.
 
^^^ I agree!
 
Actually, it wouldn't rock at all. That would be a serious nerf to the already weak archers, making them unable to kill on the offense or to get more than 1 xp from attacking. This would be especially bad for archer heroes. It would be better just to give archers a decent withdrawal chances.


Ranged attacks are just so much better though, and the AI uses it much more effectively. It doesn't like to risk moving garrisoned units out of cities, even if withdrawal is an option, but AI ranged attacks are ruthless.


(I'm not of fan of siege units being forced to withdraw either. I'll probably remove this feature and give them ranged attacks too. A range of 2 actually seems reasonable for dwarven cannons, imho. I'll probably seriously nerf their normal strength too, and bring back Flanking damage.)



I'd also really like to see SDK/xml able to handle the units that an offensive spell can handle, based on range, diplomacy, promotions (for Destroy Undead and Roar, ect. Ideally, it would be able to past a list of target units into python so the large python spells containing loops within loops could be reduced to just a couple lines. Something similar that passes the tiles within range would be good too.
 
The problem with giving archers ranged attacks is that they could then be used offensively in place of spell casters. A fix to that would be to only allow them ranged attack if they are up to full fortification. That allows them to range attack out of cities and be able to hit back a little, but it doesn't give them the ability to overshadow spell casters.
 
Can I suggest not giving the AI a route to cultural victory? There aren't enough ways to generate culture in FFH to make it a persueable goal, even for a human, in any reasonable way. I'd rather the AI didn't bother hoarding religions, or any such.
 
I'd suggest not playing with the cultural victory option enabled then. Not allowing the AI to pursue all the victory conditions available for a human player is a bit silly. It wouldn't be any easier/harder for the AI than it would be for you after all. The only difference would be you'd have competition in that area now.

The only concern I'd have about that though is whether or not the AI recognizes that certain conditions can't be met when you turn them off and adjusts accordingly.
 
Actually, it wouldn't rock at all. That would be a serious nerf to the already weak archers, making them unable to kill on the offense or to get more than 1 xp from attacking. This would be especially bad for archer heroes. It would be better just to give archers a decent withdrawal chances.

Hm, I think we read that differently. I thought Kael was talking about making archers be able to withdraw when they were at 50% health, not their targets. Otherwise, yeah, that would make archers useless.
 
I'm really glad the AI have improved. I got sick of fightin purely scouts and warriors. It was too easy. Thanks, FfH team! :)
 
The point though is that if they ran at 50% life they would rarely kill anything unless they completely dominated the battle. They would run at half life even if they were about to win.
 
Hm, I think we read that differently. I thought Kael was talking about making archers be able to withdraw when they were at 50% health, not their targets. Otherwise, yeah, that would make archers useless.

I guess that wouldn't be so bad, but I still prefer just giving ranged attacks.


It seems you focused on "...and then withdrawl at 50% health or some such" while I focused on "If anything I would consider giving them a catapult like mechanic." A plain reading of "catapult like" would imply that they too would withdraw based because of combat limits.



The problem with giving archers ranged attacks is that they could then be used offensively in place of spell casters. A fix to that would be to only allow them ranged attack if they are up to full fortification. That allows them to range attack out of cities and be able to hit back a little, but it doesn't give them the ability to overshadow spell casters.

Well, I personally don't mind casters having a little competition. If anything, it gives us a justification for making spells stronger without worrying about crippling the Khazad too much.

Hmm..what if they were given ranged attacks, but 0 range. Then you could add a promotion that boosts their range by 1, but can only be gained though a spell that can only be cast in a city or fort(/castle/citadel). Of course, for this to work Kael would probably have to add back a mechanism similar to how Forest Stealth worked, so that the promotion would be removed when the unit moved.

I don't suppose it would be possible to convince Kael to add different damage types to AirCombat, and let them be added by promotions, even though he doesn't intend to use these features? I really think that Flaming arrows should add fire strength at range too, and that the Nightwatch should be able to poison units from a distance.
 
I'd rather the AI didn't bother hoarding religions, or any such.

That would be really frickin nice! I hate how the AI always has one civ with 2 or 3 religions. It sucks balls.
 
Top Bottom