View Full Version : Help, the IA is so stupid IA!!!


Darkvlador
Mar 06, 2009, 06:37 PM
Hello every body,i am french hardcore player of FFH2 (my only installed game) and i recently discover the FF version and it is....WONDERFULL, more civs (and what civs !) guilds, amazing unique features.... But, the IA is so weak it is unplayable. By comparaison, in FFH2 my upper limite is immortal (the IA crush me 90% before turn 200); at FF50 (patch G) their is no challange, i win in divine mode even by making IA civs team two by two. One of the big difference i had observed is the light terran improvement the IA performs; for example she rarely build mine, even on gold or copper (darwen territory at turn 150). I think it's a bug, maybe linked to the low rate ammenagent possibility before main tech. If something could be done it would be great because for instance the game is un playable (and it's the greater game of the universe). And after the FF taste i won't go back to FFH.

xienwolf
Mar 06, 2009, 07:18 PM
As soon as I get a chance to sit down with the code, AI ability to properly improve their lands is the first thing I'll be tackling. Ideally that alone will bring them back up to snuff and competitive. Sadly it'll be till the end of this next week before I get a chance to do so (but spring break then, so ideally I will have tons of time to refine it)

Darkvlador
Mar 07, 2009, 09:01 AM
merci beaucoup pour le futur addon

Honor
Mar 07, 2009, 12:34 PM
it's called AI.

Willgar
Mar 07, 2009, 12:48 PM
it's called AI.

Only in english :) in french it is intelligence artificielle

Tarquelne
Mar 07, 2009, 01:52 PM
Ia! Ia! Cthulhu Fthagn!

Honor
Mar 07, 2009, 03:03 PM
Only in english :) in french it is intelligence artificielle
I knew there was something going on when I noticed so many people were insisting on calling the good old AI "IA".

Salut. Je ma pelle Honor. Tres bien, tres bien. Au revoir!

That's pretty much all the French I know.

xienwolf
Mar 07, 2009, 03:29 PM
Going off the few instances where AI is used in base Civ, it is IA in French, Spanish and Italian, and KI in german. So we are quite the minority for going with AI in english :)

Ksi
Mar 07, 2009, 11:14 PM
Hello every body,i am french hardcore player of FFH2 (my only installed game) and i recently discover the FF version and it is....WONDERFULL, more civs (and what civs !) guilds, amazing unique features.... But, the IA is so weak it is unplayable. By comparaison, in FFH2 my upper limite is immortal (the IA crush me 90% before turn 200); at FF50 (patch G) their is no challange, i win in divine mode even by making IA civs team two by two. One of the big difference i had observed is the light terran improvement the IA performs; for example she rarely build mine, even on gold or copper (darwen territory at turn 150). I think it's a bug, maybe linked to the low rate ammenagent possibility before main tech. If something could be done it would be great because for instance the game is un playable (and it's the greater game of the universe). And after the FF taste i won't go back to FFH.

Vraiment ? Je trouve que c'est un peu plus difficile que l'original. Cependant, je crois que c'est car je sais pas tout les mecanisme de FF. De plus, je ne joue que les scions... :D

And yes, I cannot wait for a better AI, but for now Agressive AI and deity seems to do the trick. Usually one or two civs grow massive. I'm interested in how the AI works and I'd love if someone knew where to look at it. I understand basic modding/python but not much else.

xienwolf
Mar 07, 2009, 11:53 PM
Almost all AI is inside of the DLL. It is only hard to look at because it is scattered across all of the files (neccessarily). If you are comfortable reading python you should be comfortable reading C++, so poke your head in and browse around. As with Python, most functions/variables have nicely descriptive names.

notque
Mar 08, 2009, 12:06 AM
As soon as I get a chance to sit down with the code, AI ability to properly improve their lands is the first thing I'll be tackling. Ideally that alone will bring them back up to snuff and competitive. Sadly it'll be till the end of this next week before I get a chance to do so (but spring break then, so ideally I will have tons of time to refine it)

That would be awesome. It really takes awhile to understand the effects of your changes. I'm messing with the building AI trying to get it to come up with something a little saner, and it's more difficult than you would think.

It's a moving target, you change one thing, and a host of other things happen. It'll be interesting to see what you come up with.

Grimz101
Mar 08, 2009, 05:02 AM
If you want a challenge play with flexible difficulty, and high to low.

BrasucaJoe
Mar 08, 2009, 01:21 PM
Anyone else notice the Barbarians much more organized then it was in FFH2? No more single charges, providing me with free XP.....they come 5-6 strong now. And they put more priority in pillaging.

Something was changed, right? Or am I playing drunk to much and mixing things up...

Valkrionn
Mar 08, 2009, 01:24 PM
That's one of Xienwolf's changes, and one of my favourites. The barbs come in hordes now, rather than one at a time, and don't usually suicide on your cities. :goodjob:

xienwolf
Mar 08, 2009, 01:40 PM
Next patch they will be a bit more reckless when they are in horde mode though, so you should start seeing some city suicide attacks, but they ought to break off at some point rather than smash their entire stack.

BrasucaJoe
Mar 08, 2009, 01:44 PM
Very very well done, sir. Looking forward to more of your tweaks. Whats your favorite Civ, Xien? How about a quick, not to descriptive, walkthrough of oh...up to turn 200ish? Around there...

I am always looking to optimize my gameplay, so I can climb the difficulty latter. I can't seem to break away from Monarch, sometimes I even go Prince...

xienwolf
Mar 08, 2009, 03:39 PM
Unfortunately my favorite Civ is "Random" and my strategy for turn 200 is always the exact same:

CTRL+SHIFT+Z
Add two zeros to the end of the input field
Click OK
Hope it doesn't crash until after turn 200 (or preferably not at all)


Mostly I just understand the underlying fundamentals of the game anymore, at almost the exact same level that a computer would think about it (which is beneficial since I am trying to teach the computer). So I can tell you that early game food is important, late game either hammers or culture is important (depending on your precise goal at that point) and Commerce always rules the heavens. And for selection of tech paths, aim for your UUs/UBs, for some strange reason they tend to be along your most beneficial advancement pathways :)

Grimz101
Mar 08, 2009, 04:18 PM
I do wonder about the AI sometimes.. 400 turns into a deity game.. and the 2nd score AI does not even having mining yet..
has other advance techs tho.. but no mining!
Same story for fishing.

BrasucaJoe
Mar 08, 2009, 06:26 PM
Same here.....I was crediting it to good use of Pelemoc. But after thinking about it, and looking at the replay.....yeah, something is up.

Darkvlador
Mar 08, 2009, 07:06 PM
Vraiment ? Je trouve que c'est un peu plus difficile que l'original. Cependant, je crois que c'est car je sais pas tout les mecanisme de FF. De plus, je ne joue que les scions... :D

And yes, I cannot wait for a better AI, but for now Agressive AI and deity seems to do the trick. Usually one or two civs grow massive. I'm interested in how the AI works and I'd love if someone knew where to look at it. I understand basic modding/python but not much else.

Ou lala, pas dutout, sur FF2 en immortel je ne suis en bonne posture qu'avec deux ou trois peuples (Hippus, Calabim et golgoth-golem) car il y a des combos-tactiques très bourinnes, avec tout autre peuple gentillet c'est la tôle vers le tour 250 grand max. A ff50 l'IA n'amménage pas ses cases, ne construit pas ses Heros (heros elfe de début de partie au tour 175 et plus !!!) et n'est pas très agressive. Les relations diplomatiques sont bcp mais alors bcp plus facile; à FFh2 c'est une guerre tout les 50 tours si tu n'a pas une armée colossale même en ayant fondée une religion adoptée par tes voisins et avec le libre passage etc.... Cool d'écrire en français pour une fois, a tchao et vive les Scions.

No no no , on FF2 in immortal difficulty i am in good standing only with 2 or 3 Civs (Hippus, Calabim and golems) because there is mighty combo, with other kind civs i am crushed arround turn 250 big max. With ff50 the IA, sorry, the AI don't take care of the ammenagement, build hero lattly (Gilden arround turn 150-175 !!!)and is not very aggressive. Diplomatic relationship are much easyer in FF50, at FFh2 (immortal) "everywhere is war" arround once every 50 turns if you don't manage a huge and costly armie; even if your neigtbourg (difficult word in english) adopt your religion and trade with you. Nice to write in french for on time and long life to the Scion

notque
Mar 08, 2009, 08:54 PM
Next patch they will be a bit more reckless when they are in horde mode though, so you should start seeing some city suicide attacks, but they ought to break off at some point rather than smash their entire stack.

I really like the changes, but it makes Orthus even more of a beast. He seems organized, and instead of sitting on a city will move to the next. I watched him kill 4 civs today.

If he knocks the first one off, his promotions make him much worse, and he seems much less... wandering.

BrasucaJoe
Mar 09, 2009, 05:15 AM
I have never been defeated by a fully loaded Orthos...when I have at least 4-5 basic melee in town.....then keep building warriors til he is dead.

DioBrando
Mar 10, 2009, 02:48 AM
It's so awesome, i hear a french accent in my head when i read your posts. Nothing bad with that at all since i love french accents!

I agree with the AI being crippled in their techs, and it might have something to do with the 25% build rate to improvements that has been added in FF. When i played FF before (september-november maybe) the AI was just as good (if not better) as in FfH2. The battle AI has been improved in FF, at least if we are talking about barbarians. Barbarians don't bother me at all in FfH, but they REALLY piss me of at times in FF. It's as if they are TOO smart.

Damn pillagers.

WarKirby
Mar 10, 2009, 10:16 AM
CTRL+SHIFT+Z
Add two zeros to the end of the input field
Click OK
Hope it doesn't crash until after turn 200 (or preferably not at all)


What does this do ?

WarKirby
Mar 10, 2009, 10:22 AM
I agree with the AI being crippled in their techs, and it might have something to do with the 25% build rate to improvements that has been added in FF.

I can see why this would be an issue.

Personally, I'd advocate the simplest possible solution. All workers should follow these rules

1. Workers should only build things they can do at 100% rate, unless there are NONE of those to do, anywhere in the empire. ie, every tile they have the tech for is already improved, or they have no improvement techs.

2. Whenever a civilisation discovers a new tech, all AI workers, (and automated human workers) belonging to that civ should immediately stop and re-evaluate their current task. If the new tech has allowed them to create an improvement more efficiently, and they're currently doiung a 25% speed build, they should stop their current task, and search for more efficient improvements.

This might put the AI at a slight disadvantage, as it would be unlikely to ever get lumbermills before Ironworking, and such things. But it would stop them from getting caught up doing things that take forever, when there are easier tasks to do. And would likely result in a better AI overall.

As an optimisation to point 2, it might be better to have a list of techs which allow faster improvements, and only make the workers re-evaluate if their civ discovers a tech which is on that list.

I think these techs are

Agriculture (farm)
Crafting (winery)
Calendar(Plantation)
Education(Cottage)
Mining (mine)
Exploration (road)
Masonry (quarry)
Construction (windmill, watermill)
Iron Working (lumbermill. I think this is too late, personally, but that's an issue for another thread)

This list only covers those which have a 25% build rate mechanic, not things like fishing boats, etc.
Did I miss any?

BrasucaJoe
Mar 10, 2009, 12:56 PM
I think the workers should go back to the way they were when they could only build something like a farm, if they got agriculture...what if the AI sees they can make a farm without the proper tech and thinks...oh well, that can wait since my worker can do it anyway...just takes longer.

Inquizitor
Mar 11, 2009, 09:38 AM
Iceciro Has fixed the AI wonkyness with his version.

Part of the fix was to remove the improvment slow building thing. That improved things by leaps and bounds. He then went in and set tech paths for each civ. Now instead of just beelining an expensive tech or just randomly picking whatever they will actually build up the infatructure techs while still slowly progressing towards the civ specific techs.

The AI is actually giving us troubles and occasionally beating us now.

Iceciro
Mar 11, 2009, 09:48 AM
But we may suck. I'm not ready to rule out that we suck.

Valkrionn
Mar 11, 2009, 09:53 AM
I'd love to try this 'Fall Flat' you talk about. :goodjob:

xilr
Mar 11, 2009, 11:04 AM
I would so much like to see the AI fixed without changing the way workers are now. I cant express how much I like the 0.50g worker system (Havent downloaded 0.50h yet)

Iceciro
Mar 11, 2009, 11:10 AM
I'd love to try this 'Fall Flat' you talk about. :goodjob:

I'm slowly edging it towards something I could release and not be embarrassed about :)

notque
Mar 11, 2009, 02:45 PM
I'm slowly edging it towards something I could release and not be embarrassed about :)

Hasn't stopped me from releasing :)

Tarquelne
Mar 11, 2009, 02:49 PM
I'm slowly edging it towards something I could release and not be embarrassed about :)

How about we start making fun of you now? So you won't have anything to lose by releasing.

notque
Mar 11, 2009, 02:57 PM
How about we start making fun of you now? So you won't have anything to lose by releasing.

Well, I know for a fact his tech Ai system is hairbrained! :lol:

Iceciro
Mar 11, 2009, 04:30 PM
Honestly, I want to get all of the civs the upgrades I have planned. I still have the Khadi, Amurites, Banor, Malakim, Dovellio, Grigori left to go.

Then I have to make sure I didn't make any of them wildly imbalanced! :D

cyther
Mar 12, 2009, 02:07 PM
I'm slowly edging it towards something I could release and not be embarrassed about :)

Don't worry about stuff like that, I believe that Kael has said it best:

The first rule: you are the only person who has to like what you have created. Don’t make the mod you think other people will want, don’t change a design based on outside feedback unless you agree with it. It is better to have an unpopular mod you enjoy than a popular one you don’t. That goes for all of the advice in this article, if you don’t like it, don’t use it. This is the advantage of modding, Firaxis has to worry about making sales and mass appeal, but we don’t.

Thunder_Gr
Mar 12, 2009, 02:12 PM
Wise words! :goodjob:

notque
Mar 12, 2009, 02:14 PM
Wise words indeed.

Iceciro
Mar 12, 2009, 11:20 PM
Hmm. Your point is well taken.

I'll release it when it's done. There's a group of my friend's closed-betaing it for me, so once the bugs are ironed out seeing it pop up in this forum is a real possibility.

Thunder_Gr
Mar 24, 2009, 02:55 PM
I think it is time to ressurect the thread?
The AI keeps letting workers with 1 defence adjucent to my troops, and even brings them in range knowing my troops are there!

Iceciro
Mar 24, 2009, 03:02 PM
Something about the defense promos makes the AI not consider running them as much as it really needs to :(

Thunder_Gr
Mar 25, 2009, 03:31 PM
It appears that Axemen are no longer fond of pillaging?
I have this stack of 7 clan axement sitting on my copper mine for many turns, without pillaging it. Until a wolf rider came in and pillaged it.

It could be that I was damaging them with maelstorms, and they where just trying to heal. I think, the priority should be "pillage, if possible, then try to heal".
Although, I must say, it will be quite difficult to tell them to get out of maelstorm's range in order to heal...It is no use to stay in range. I damage them every turn.

P.S. The observations are from a game with Khad in Emperor difficulty.

Iceciro
Mar 25, 2009, 03:32 PM
I've had barb units of all kinds pillage my improvements, including an axeman or two...

Thunder_Gr
Mar 25, 2009, 03:35 PM
I've had barb units of all kinds pillage my improvements, including an axeman or two...

Yeah, the barbarian AI acts differently.

MrPopov
Mar 25, 2009, 05:10 PM
I say remove the defense promotions. Or instead make hardy a + to withdraw chance.

Greeney
Apr 05, 2009, 02:03 PM
What's the reason to make every improvement buildable from turn 1 at 25%?

I played FF for the first time some days ago and I was surprised to see how few improvements the AI built. Even at turn 300 or 400 their lands were under-productive. It was one of the reason why they lagged behind me so much, even though it was my first game as Scions. Also, as a human player, I don't like to keep thinking what techs I already researched to make better use of my workers. I'd rather be able to just build improvements after researching the appropriate tech, maybe with the exception of chopping woods and jungles, and getting lumbermills sooner in the tech tree. Maybe the AI would care to get the basic techs then, but you know better about that.

On the other hand, I love the promotions system, but I never bothered making my workers defensive: they will die anyway if they are attacked. The AI gets too often that +1 defense, which makes it even worse at building improvements. That hardy promotion should be increased to +2: workers as strong as scouts... but they cost three times more than a scout and can't attack, so it's not like you will depend on them for defense. The second and third hardy promo would be unlocked with later techs (bronze working and iron working? In the sense that workers have better tools and they can use them to defend better...). Still, even +2 wouldn't compete to faster working rate, imo. The AI just doesn't realize that.

xienwolf
Apr 05, 2009, 02:23 PM
They do develop their lands, what they don't do is DEFEND their lands. We are working on that side of the equation lately to spruce them up some more.

Vehem
Apr 05, 2009, 02:36 PM
On the other hand, I love the promotions system, but I never bothered making my workers defensive: they will die anyway if they are attacked. The AI gets too often that +1 defense, which makes it even worse at building improvements. That hardy promotion should be increased to +2: workers as strong as scouts... but they cost three times more than a scout and can't attack, so it's not like you will depend on them for defense. The second and third hardy promo would be unlocked with later techs (bronze working and iron working? In the sense that workers have better tools and they can use them to defend better...). Still, even +2 wouldn't compete to faster working rate, imo. The AI just doesn't realize that.

I've made a tweak to those promotions - it actually will mean "Hardy" now.

Hardy I: +1 Defensive Strength, +30% Withdrawal Chance
Hardy II: +2 Defensive Strength (requires Mining)
Hardy III: +2 Defensive Strength, +20% Withdrawal Chance (requires Smelting)

Result is that Hardy III workers have defensive strength of 5 and 50% withdrawal chance.

===

Also as a result of that, I've removed the promotions from the Mutate list and plugged the "exploit" that allowed the Doviello to get melee units with Hardy by upgrading workers. I liked it, but it would be too potent now.

Greeney
Apr 05, 2009, 03:20 PM
That's very good. Specially the withdrawal chance will help workers survive. I find it actually more useful than the strenght itself.

xienwolf
Apr 05, 2009, 06:38 PM
We could make a Hardy IV promotion which grants them bNeverHostile :) Then nothing can ever attack them (though anything can share their tile and pillage whatever they just finished)