Lobotomized AI

However, what should someone expect when the AI suggest to you to build Scouts(Growth)? I wonder who told the AI that, if it needs to grow, it should build scouts.

Firaxis :D

===

I've started looking at few of the AI settings, and whilst the Advisor isn't likely to be the issue, the fact that the game considers Scouts to be valid options for AI_ATTACK may be. Technically they can attack, but I don't think the AI should be using them for it, so I've removed that as an valid UnitAI for the unit. Still trawling through the others to see if there are any others that could be tweaked a little.
 
Vehem, I've been playing my "no 10% buildspeed, no forts available" game and so far the AI in many cases is better. The Balseraphs have so many troops it's unbelivable, and none of them are scouts. They've put up a much better fight in general, now...

I'm not sure how big of a deal this is but it seems to be something that the AI currently has a lot of trouble with.
 
I've started looking at few of the AI settings, and whilst the Advisor isn't likely to be the issue, the fact that the game considers Scouts to be valid options for AI_ATTACK may be. Technically they can attack, but I don't think the AI should be using them for it, so I've removed that as an valid UnitAI for the unit. Still trawling through the others to see if there are any others that could be tweaked a little.

Here's what I did as a quick test on scouts, hunters, rangers... well, most of the recon units.

Remove UNITAI_ATTACK and UNITAI_CITY_DEFENSE from all of them. The AI will still use them to attack you and they will still pull them in to defend a city if needed however they will not build them specifically for those purposes. The problem here is that the AI looks at a Warrior and a Scout and sees that the scout is 66% of the strength but has 200% of the movement and they cost the same to build so it looks like the better choice to the AI. Removing both of these unitAIs will all but eliminate the piles of scouts, hunters, etc. Even with civs with specific bonuses (e.g. Svartfal) I would still recommend removing UNITAI_ATTACK from their recon units, perhaps replacing it with UNITAI_COUNTER or if you want them to use them as support units in attack you can try UNITAI_COLLATERAL even through they do no collateral damage.

I ran the game for 200 turns with those changes in and although the AI had fewer scouts out popping lairs & huts they had warriors defending their cities and not only did they all survive the barb rush, only one city out of 12 civs was lost to the barbarians. This is due partly to the barbs being afraid to attack cities on hills defended by 4+ warriors instead of a few scouts so that might need some tweaking. The Doviello on the other hand, were brutal without being bogged down by a hundred scouts in their army.

The AI still has issues with the FF method of allowing all improvements to be built with no tech requirement. A big part of this is that the techs that speed up the building of those improvements have no value to the AI since they no longer allow them to build the improvements and the code hasn't been added to get the to understand the change. One possible solution would be to have an early tech requirement so rather than the current 10% +90% boost you could run something like 50% + 50% boost. Currently, the AI sees no need to research Agriculture unless they have wheat or corn so it will be delayed, in the meantime they still try to build farms for the +1 food so their workers are tied up seemingly forever. Another option that the AI will readily understand would be to change the base improvements so they offered no yield change unless built on a bonus and then put the current yield change in the appropriate tech. This way you could still build farms at 100% speed from the start of the game but unless you build them on corn or wheat they would provide no extra food production until you research agriculture which would add +1 food to all farms. Although farms are a bad example since they use a different yield for irrigated this would work well with mines, workshops, cottages, etc.
 
In my last game the AI really suprised me what they can do. I had three AI teams (1 Einion alone, 2 Os-Gabella/Faeryl/Perpentach and 3 Tebyrn/Cuatl/Mahala) After about 200 turns Einion had only two cities and no improvements since he couldn't get the raging barbs out of his lands. The Os-Gabella team had destroyed the Tebyrn team and declared war on me same turn. Osgabella was sending horse archers to different cities and kept my monks busy, Faeryl showed up two times with large stacks (10-20 units) of mages/Rangers/assasins. But Perpentach was the real surprise. He sieged one of my cities and weakened defenders with maelstrom+summons+puppets. He never got enough units though to take the city as he had only 3 or 4 cities. At about turn 300 he build his most powerfull, a berserker.
Hyborem got summoned and became really powerfull. He still needs to find a way how to deal with paladins and high level monks though :D.
 
Here's what I did as a quick test on scouts, hunters, rangers... well, most of the recon units.

Remove UNITAI_ATTACK and UNITAI_CITY_DEFENSE from all of them. The AI will still use them to attack you and they will still pull them in to defend a city if needed however they will not build them specifically for those purposes. The problem here is that the AI looks at a Warrior and a Scout and sees that the scout is 66% of the strength but has 200% of the movement and they cost the same to build so it looks like the better choice to the AI. Removing both of these unitAIs will all but eliminate the piles of scouts, hunters, etc. Even with civs with specific bonuses (e.g. Svartfal) I would still recommend removing UNITAI_ATTACK from their recon units, perhaps replacing it with UNITAI_COUNTER or if you want them to use them as support units in attack you can try UNITAI_COLLATERAL even through they do no collateral damage.

I ran the game for 200 turns with those changes in and although the AI had fewer scouts out popping lairs & huts they had warriors defending their cities and not only did they all survive the barb rush, only one city out of 12 civs was lost to the barbarians. This is due partly to the barbs being afraid to attack cities on hills defended by 4+ warriors instead of a few scouts so that might need some tweaking. The Doviello on the other hand, were brutal without being bogged down by a hundred scouts in their army.

The AI still has issues with the FF method of allowing all improvements to be built with no tech requirement. A big part of this is that the techs that speed up the building of those improvements have no value to the AI since they no longer allow them to build the improvements and the code hasn't been added to get the to understand the change. One possible solution would be to have an early tech requirement so rather than the current 10% +90% boost you could run something like 50% + 50% boost. Currently, the AI sees no need to research Agriculture unless they have wheat or corn so it will be delayed, in the meantime they still try to build farms for the +1 food so their workers are tied up seemingly forever. Another option that the AI will readily understand would be to change the base improvements so they offered no yield change unless built on a bonus and then put the current yield change in the appropriate tech. This way you could still build farms at 100% speed from the start of the game but unless you build them on corn or wheat they would provide no extra food production until you research agriculture which would add +1 food to all farms. Although farms are a bad example since they use a different yield for irrigated this would work well with mines, workshops, cottages, etc.

I do love feedback and testing, (it's the entire reason we release things afterall ;)), but I would prefer that you didn't make statements about the code without looking at it. The AI DOES weight techs based on how much they improve build orders. The question would be if they weight them heavily enough for it to make a difference.

And if you use chipotle, you can directly see what the AI considers to be the weighting per unit, per AI Type. Just changing the layout in the XML and seeing how they play in game for a little while tends to be potentially disasterous (I am reasonably certain that is how many of the AI types currently set got set, if not just by the name). Instead it is best to figure out what the AI types mean to the AI players (required to maintain X amount of City Defense, cannot move outside of territory with City Counter, Attack Sea means it carries troops...), and then seek to ensure that the role you have in mind for a unit matches the best of those AI types.
 
And if you use chipotle, you can directly see what the AI considers to be the weighting per unit, per AI Type. Just changing the layout in the XML and seeing how they play in game for a little while tends to be potentially disasterous (I am reasonably certain that is how many of the AI types currently set got set, if not just by the name). Instead it is best to figure out what the AI types mean to the AI players (required to maintain X amount of City Defense, cannot move outside of territory with City Counter, Attack Sea means it carries troops...), and then seek to ensure that the role you have in mind for a unit matches the best of those AI types.
Actually, the in-game weight by unitAI can be misleading due to the way they are used. If you dig deep enough into the AI code you'll see that the AI can use what it has available regardless of the defined unitAI, even in the case of any defined 'NotUnitAI' values they can still be overridden in extreme cases. At any rate, the unitAIs defined by unit are used first and foremost when determining what to build and for this reason they should be defined based on what you think their primary use(s) are, not what their acceptable uses are, with the understanding that the AI will probably pick one specific unitclass per unitAI and build a lot of them. Regardless of what you see for weights assigned in-game, in the end the units it uses will be determined by the units it builds. That is where you need to focus your efforts when defining unitAI. The in-game weight is a good way to decide what, if any, unitAIs need to be added to the unit as a NotUnitAI to prevent the AI from using them for that except in the most extreme cases. This entire system worked well in vanila Civ due to the limited number of available units for any given task, with FfH and FF you'll need to be far more specific with unitAIs since you will likely have several available at any given time that would be suitable for the same need.

I understand your defensiveness, I get the same way after pouring hours into a project. All I can say is that you really need to try it out and see for yourself, the changes to scouts are quick and easy to observe since they're available from the start of the game. When I was working on the AI for TAM we had a similar problem with catapults which is what got me to dive into the AI and figure out exactly how it ticks in the first place. Like you said, there's more to it than the name, but in addition to that there is more to it that the current value as seen by the AI.
 
Please, put in an option to remove the 10% build crap. It really makes micromanaging tedious, i want to be able to automate my workers without them being idiots.
 
Please, put in an option to remove the 10% build crap. It really makes micromanaging tedious, i want to be able to automate my workers without them being idiots.

Are you building so many? I keep just 2 up to max 4 groups of 2 or 3(depending on the civ)workers. Easy to manage. Quick to finish tasks. Everything OK. :)
 
I love the 10% build thing, but it should be possible to make automated workers NEVER attempt to make something if you don't have the technology.

It's easy to see how that would mess up the AI, but PLEASE find a solution that doesn't involve removing this feature :(

It's depressing to read all the stories of neat stuff that was removed from FFH because the AI couldn't handle it.

I wouldn't mind even, just removing the AI's ability to do 10% improvements entirely, and make it a human player only thing.

I've noticed as well, that the AI in FF has an alarming tendancy to spam recon units. Much, MUCH moreso than in FFH.

I even have proof, look!!

hunterspam.png


This picture is of the Hippus empire in my Khadi game. It's hard to see, but if you look around, you should notice one horseman. ONE HORSEMAN, in a race whose whole focus is horsemen. Their entire army is hunters. hundreds of them.

This behviour is definitely different from base FFH. The Hippus in that are quite good about building horsemen, and warriors/axemen as support. They rarely made hunters from what I've seen, and due to their aggressive nature, I've fought against them countless times.

They've just spammed hunters everywhere, and they're not alone. Almost every race is doing it. The hippus declared war on me a hundred turns or so ago, and they brought in an invasion force that consisted almost entirely of scouts. And when I invaded the Khazad, most of their defenders were scouts, too. Scouts everywhere.

This explains why the Austrin are doing so well, though. They're spamming trackers all over the place, too. I actually had problems fighting them off when they declared war on me. This new AI is brilliant for races like the Austrin, and Svartalfar, whose focus SHOULD be recon units. So I'd suggest that when you find what's causing it, keep it in place for those. But for races that don't have super recon, it's severely handicapping them. Axemen > hunters. I can shred my way through these hunter armies easily.
 
I've noticed as well, that the AI in FF has an alarming tendancy to spam recon units. Much, MUCH moreso than in FFH.

I even have proof, look!!

hunterspam.png


This picture is of the Hippus empire in my Khadi game. It's hard to see, but if you look around, you should notice one horseman. ONE HORSEMAN, in a race whose whole focus is horsemen. Their entire army is hunters. hundreds of them.

This behviour is definitely different from base FFH. The Hippus in that are quite good about building horsemen, and warriors/axemen as support. They rarely made hunters from what I've seen, and due to their aggressive nature, I've fought against them countless times.

They've just spammed hunters everywhere, and they're not alone. Almost every race is doing it. The hippus declared war on me a hundred turns or so ago, and they brought in an invasion force that consisted almost entirely of scouts. And when I invaded the Khazad, most of their defenders were scouts, too. Scouts everywhere.

This explains why the Austrin are doing so well, though. They're spamming trackers all over the place, too. I actually had problems fighting them off when they declared war on me. This new AI is brilliant for races like the Austrin, and Svartalfar, whose focus SHOULD be recon units. So I'd suggest that when you find what's causing it, keep it in place for those. But for races that don't have super recon, it's severely handicapping them. Axemen > hunters. I can shred my way through these hunter armies easily.

That's funny, because in my last two games (.50d and .50e), the AI is clearly spamming Archery units.

The Dural last game was the culprit building many small stacks mostly of Archers. This game it is Charadon building larger stacks of Javelin Throwers with an occasional Sons of Asena thrown in.

I am seeing virtually no Hunters, but plenty of Scouts, as you said. I am past Turn 500 (epic/Prince) and the AI is churning out Tier II units mostly. Same with the barbs.
 
It happens that workers with 0/3 stregth are left unprotected by the AI when I move my troops near them, allowing me to capture them, since my units are much stronger. I think the AI should value their workers more, and not just leave them to be captured.
 
Turn off the Worker upgrades part of the Mod and the AI won't be able to give its workers defensive strength, causing it to behave correctly and run away when troops approach.
 
I mention it here, so that someone can see it, so that it may be fixed. Since .50 is still in debug face, my personal preferences wouldn't really matter. I am trying to help the team identifying and fixing errors. I thought it is a nice thread for AI issues, since the FF team appears to read it and provides some answers, too. :)
 
That's funny, because in my last two games (.50d and .50e), the AI is clearly spamming Archery units.

The Dural last game was the culprit building many small stacks mostly of Archers. This game it is Charadon building larger stacks of Javelin Throwers with an occasional Sons of Asena thrown in.

I am seeing virtually no Hunters, but plenty of Scouts, as you said. I am past Turn 500 (epic/Prince) and the AI is churning out Tier II units mostly. Same with the barbs.

It's even funnier if you consider my last FF game, where my evil Calabim neighbours spammed me with dozens upon dozens of.. horsemen. As opposed to regular FFH where I usually see Calabim focusing on their moroi and vampires as they should. After defeating the Calabim and invading the Amurites, I found them defending with dozens of archers and a handful of wizards - not a bad mix of units for the Amurites, but vastly inferior to my phalanxes and other national units supported by champions. This is strange considering that the Amurites were pretty advanced in the tech tree, they should have had access to iron champions at the very least, they just chose to spam archers instead and chose not to research firebows. I don't understand it or see a pattern here, but there's no doubt that the AI is acting strangely.
 
Turn off the Worker upgrades part of the Mod and the AI won't be able to give its workers defensive strength, causing it to behave correctly and run away when troops approach.

And here we get to the problem of losing neat features because the AI can't handle them, that's the same path FFH went.


How about, instead, removing the aility for the AI to use the Hardy promotion line on their workers. The workers could still level up, but they would only get increased wrkrate, while human players could retain the choice.

That way, the problem is solved, the human player gets only a very slight advantage from having more options, and not an advantage in power. And we get to keep a neat feature which I love
 
And here we get to the problem of losing neat features because the AI can't handle them, that's the same path FFH went.

I wasn't suggesting we need to remove the promoting workers system wholesale from the mod - just that you can uncheck it in the options during a custom game and the AI will behave a little smarter.
 
But if it becomes impossible to play a challenging game with promoting workers, we might as well get rid of worker promotions. If nothing else, it reduces the download size. And I do want my workers to solo finish any task in one turn.

The AI has to be told, as it cannot realize it on its own, that workers are wimps who cannot fight and will get killed by even warriors if they don't turtle in stacks of real combat units. Hardy is still useful for the AI as you cannot run your 6 movement commando horseman from the other side of the map to capture the entire stack of them but must do it one at a time.
 
f nothing else, it reduces the download size.

This reasoning is only remotely valid when you're talking about textures, and even those are pretty small.

The size of lines of code is completely and utterly negligible. Should never be used as reasoning for anything.
 
Just remove the defense skill from workers. I never use it and the AI using it causes some of the weirdness.

Ah, but the AI has been doing precisely what I have wanted them to do with the promotion. Though I may have to re-evaluate the weighting now that workers don't gain quite as many levels in the course of a game.

Oh yes, and what if someone has already fixed the AI's inability to retreat when they ought to? ;)
 
Back
Top Bottom