Logo Platform
logo amplifiers simplified

AI still needs a bit of tweaking

Reply
Copied to clipboard!
9 years ago
Dec 29, 2015, 3:58:18 PM
I think 90% of my posts here since ES have been my having a whinge about the AI so I figured it was fair that I give a heads up to other 4x players checking for difficulty levels.



The recent AI patch has made it so it's possible to lose on Endless, sometimes, when using second-tier factions or a bad start. I've actually had... fun... puzzling out a new build order or two. I'm currently on maybe my 4th(!!) restart of a broken lords game.



1. turn ~40 - Double wardec (4 full stacks)

2. Turn ~20 - Atrocious adjacent regions (for BL), all Forrest, no dust, no anomalies.

3. Turn ~40 - Map without any Dustwater (This one was just me being precious)

4. Turn ~30, Wardec (2 stacks). Probably could have held it as vaulters with teleport and marines, or if it happened a few turns later (I was two turns from a H/3/3 - bishop/stalwart stack, plus movement time)



As always, if you make it to the mid game (turn ~60) then the rest is just cleanup, but that's a 4x thing, not a failing specific to EL. (Side note: I wonder if making the AI bonuses grow larger as the game progressed, rather than being static, would make the mid to late game worth playing out?)



Amplitude's best effort to date. Very glad to see work being put into the AI, as I've always really enjoyed the music/visuals/setting.
0Send private message
9 years ago
Dec 29, 2015, 4:16:02 PM
wilbefast wrote:
The AI's Unit Designer try to optimise the military power of its forces, and military power is calculated based on a formula which includes all of a unit's stats. The choice of equipment also takes into account the amount of available strategic resources: equipment is perceived as less powerful if there's not a lot of it to go around. It's not perfect but something that has come a long way in the update, so if there's a way yet to go we'll need to know exactly how you feel the designs could be improved.




Is this formula available for modding or is it buried in the binaries?



It seems to me, from my armchair, that a potentially big improvement would be to make the AI iteratively maximize individual stacks (order either by existing strength or distance to target or whatever), rather than trying to maximise the average of every stack. 1 godstack is easily worth 2+ okay stacks, that's how it's so easy to hold off the AI's forces as a player.
0Send private message
9 years ago
Dec 29, 2015, 9:10:57 PM
Darvon wrote:
As always, if you make it to the mid game (turn ~100) then the rest is just cleanup


Interesting. I usually think of the "mid game" as being roughly turns 50-100 on normal speed--or, alternately, as being roughly technology eras 3 and 4, which works out about the same (for reference, my games typically end by turn 150, and I have not played with the expansions). Are your games progressing slower than mine, or do you just have a different idea of what constitutes the "mid game"?
0Send private message
9 years ago
Jan 4, 2016, 9:30:17 AM
Darvon wrote:
Is this formula available for modding or is it buried in the binaries?



It seems to me, from my armchair, that a potentially big improvement would be to make the AI iteratively maximize individual stacks (order either by existing strength or distance to target or whatever), rather than trying to maximise the average of every stack. 1 godstack is easily worth 2+ okay stacks, that's how it's so easy to hold off the AI's forces as a player.


While it's possible to tweak the relative values of different equipment in steamapps\common\Endless Legend\Public\AI\ AIParameters[Items_*].xml and steamapps\common\Endless Legend\Public\AI\ AIParameters[ItemMaterials].xml the logic by which the AI would decide to focus its resources on fewer stronger stacks or on more weaker ones is hard-coded I'm afraid.



Darvon wrote:
Amplitude's best effort to date. Very glad to see work being put into the AI, as I've always really enjoyed the music/visuals/setting.


You've no idea how happy this makes us - wish we had a "crying with happiness" smiley smiley: smile
0Send private message
9 years ago
Jan 6, 2016, 3:09:23 AM
wilbefast wrote:
While it's possible to tweak the relative values of different equipment in steamapps\common\Endless Legend\Public\AI\ AIParameters[Items_*].xml and steamapps\common\Endless Legend\Public\AI\ AIParameters[ItemMaterials].xml the logic by which the AI would decide to focus its resources on fewer stronger stacks or on more weaker ones is hard-coded I'm afraid.





You've no idea how happy this makes us - wish we had a "crying with happiness" smiley smiley: smile




You've made a really solid AI. Hope you keep working on it. I'm sure more people would be playing EL if they knew how much the AI had improved. I'm a programmer myself, and I realize the absolutely monumental workload that's put into a good AI.



Hope you got a lot of sales from the Steam Christmas event.
0Send private message
9 years ago
Jan 6, 2016, 6:05:04 PM
Gr3y wrote:
You've made a really solid AI. Hope you keep working on it. I'm sure more people would be playing EL if they knew how much the AI had improved. I'm a programmer myself, and I realize the absolutely monumental workload that's put into a good AI.



Hope you got a lot of sales from the Steam Christmas event.




Me, too - so they can make more DLCs! smiley: wink
0Send private message
9 years ago
Jan 11, 2016, 11:24:36 PM
A big thumbsup from me for the effort you put in the game and the AI. It does play to a degree smart now and on lower skill levels (humans) its already a challenge. However it is not yet able to compete in army setup. Every game no matter how hard i make it the ai "forgets" to go for all the stacking bonusses available. It seems they never value the items and hero skills enough. In my current game they match my technology (they had 2 out of 5 level 6 techs a bit before me) but still, most of the time my armies range in the 10k strength while they still field 3k. They try to zerg me with those but lose horribly all the time since they are just too weak. And dont get me started with guardians. I rarely see guardian support ever apart from maybe one...here and there. While my armies normally have 2-3 or more supporting the lil guys.



From my experience the ai should value hitpoint upgrades, strength and attack bonusses and items that increase that a lot more. There should be AI strategies that try to get stacking bonusses for some heroes where those fit. Like hero has health upgrades, unit uses health items, hero uses health items, imperial plan uses health bonus and ai researches health bonus where it can. It is the stacking it really doesnt get done well.



Another thing about the AI:

When it comes to playing out its advantages the AI needs to value WAR much higher. I can eco boom every single game. They never attack me even if they are 10times stronger. I see them killing off every other guy on the continent but never come for me. I mostly keep 1 good army at home and a good hero leading it. As soon as i can i field skoros. Thats it. But even before that, the ai rarely attacks humans. The only time i saw the ai actually coming for a human was a 5 ppl and 3 ai mp game. The ai murdered one of the humans without mercy and used some nice flanking it was beautiful (just not for the human player that got murdered hehe). It should happen much more often especially with bad relations between you and ai.
0Send private message
9 years ago
Jan 12, 2016, 2:24:16 PM
mediainvita wrote:
A big thumbsup from me for the effort you put in the game and the AI. It does play to a degree smart now and on lower skill levels (humans) its already a challenge. However it is not yet able to compete in army setup. Every game no matter how hard i make it the ai "forgets" to go for all the stacking bonusses available. It seems they never value the items and hero skills enough. In my current game they match my technology (they had 2 out of 5 level 6 techs a bit before me) but still, most of the time my armies range in the 10k strength while they still field 3k. They try to zerg me with those but lose horribly all the time since they are just too weak. And dont get me started with guardians. I rarely see guardian support ever apart from maybe one...here and there. While my armies normally have 2-3 or more supporting the lil guys.



From my experience the ai should value hitpoint upgrades, strength and attack bonusses and items that increase that a lot more. There should be AI strategies that try to get stacking bonusses for some heroes where those fit. Like hero has health upgrades, unit uses health items, hero uses health items, imperial plan uses health bonus and ai researches health bonus where it can. It is the stacking it really doesnt get done well.



Another thing about the AI:

When it comes to playing out its advantages the AI needs to value WAR much higher. I can eco boom every single game. They never attack me even if they are 10times stronger. I see them killing off every other guy on the continent but never come for me. I mostly keep 1 good army at home and a good hero leading it. As soon as i can i field skoros. Thats it. But even before that, the ai rarely attacks humans. The only time i saw the ai actually coming for a human was a 5 ppl and 3 ai mp game. The ai murdered one of the humans without mercy and used some nice flanking it was beautiful (just not for the human player that got murdered hehe). It should happen much more often especially with bad relations between you and ai.




This is close to my experience as well. The AI is now more than capable of keeping up and even exceeding human economic prosperity(well maybe not if I play the Broken Lords), but they seem very...reluctant to fully utilize their resources in war.



The problem is multifaceted. The equipping of AI armies is too conservative. They don't seem to know or understand intelligent builds and synergies for hero items. In addition to this they still have problems in target selection during battles. Too many times they go for militia instead of more dangerous units. Militia should be far, far down the list of things to kill when there are multiple enemy units on the battlefield. Also I agree with your thoughts on their use of Guardians. Most of the time I see no reason why they don't have multiple Guardians to throw at me when they clearly have means to do so.



On normal difficulty, it is indeed very uncommon for AI to attack a human player. I think that needs to change. If the AI is militarily and economically in a good position and doesn't have particularly good relations with the human player, then war should not be shied away from. I don't like the idea of locking the more aggressive behavior behind the higher difficulty levels.
0Send private message
9 years ago
Jan 12, 2016, 4:58:11 PM
Slashman wrote:
This is close to my experience as well. The AI is now more than capable of keeping up and even exceeding human economic prosperity...




This means practically nothing, because the AI gets straightforward cheat bonuses.



Slashman wrote:
The equipping of AI armies is too conservative. They don't seem to know or understand intelligent builds and synergies for hero items.




I cannot tell, since I don't use dev resources in-game to look at AI equipment, but I wouldn't be surprised if this were the case. But I think fixing this to the point where the AI equips itself (almost-) intelligently as the human player is really not possible.



Slashman wrote:
In addition to this they still have problems in target selection during battles. Too many times they go for militia instead of more dangerous units. Militia should be far, far down the list of things to kill when there are multiple enemy units on the battlefield.







Frankly, I think the AI is better advised to target units that it can do maximally damage than go for the strongest units - which seems to be what happens now - for many reasons. First, the AI frequently has more resources, so they can afford to have less than equal trades in the combat attrition game and still come out ahead (though I agree they should almost never target militias, unless they are blocking access to more valuable units). Second, I don't think you can teach the AI to efficiently calculate/target units multiple turns in advance - and it needs to in order to efficiently take out strong targets. (This is what the AoW 3 tactical combat designer stressed in regard to why the AI in that game doesn't always target high value units.)



Slashman wrote:


I don't like the idea of locking the more aggressive behavior behind the higher difficulty levels.




Agreed.
0Send private message
9 years ago
Jan 12, 2016, 8:06:47 PM
Xenophon wrote:
This means practically nothing, because the AI gets straightforward cheat bonuses.




It means a whole lot if you play the game at Normal where the AI gets NO bonuses.



I cannot tell, since I don't use dev resources in-game to look at AI equipment, but I wouldn't be surprised if this were the case. But I think fixing this to the point where the AI equips itself (almost-) intelligently as the human player is really not possible.




We've already examined this and seen that it does not always upgrade units when it should and often neglects better equipment for whatever reason (it usually thinks it has a good reason). This isn't just about it building armies which synergise with hero equipment and skills, at late levels in the game, rich AI still have armies with a lot of iron weapons and armor. Not even Dust...just iron.



Frankly, I think the AI is better advised to target units that it can do maximally damage than go for the strongest units - which seems to be what happens now - for many reasons. First, the AI frequently has more resources, so they can afford to have less than equal trades in the combat attrition game and still come out ahead (though I agree they should almost never target militias, unless they are blocking access to more valuable units). Second, I don't think you can teach the AI to efficiently calculate/target units multiple turns in advance - and it needs to in order to efficiently take out strong targets. (This is what the AoW 3 tactical combat designer stressed in regard to why the AI in that game doesn't always target high value units.)




The problem is that they don't come out ahead when they lose a battle that they could have won by ignoring the Ateshi Zealots that are raining AoE death on them to try to hit a militia two hexes behind them. There is no scenario where that is a really good idea.



And the thing is that Aow 3 combat still provides a much greater challenge for me than fighting in EL even with this supposed same weakness. AoW AI still uses flanking and positioning really well and at a level that I don't see them as a complete joke whereas even when facing a vastly superior EL AI army, I tend to worry a lot less.
0Send private message
9 years ago
Dec 2, 2015, 1:32:48 PM
Kingsguard wrote:
Well if you have downloaded the last update, I have made no AI changes in my mod and I dont think the problem lies in that !


Hmm... yes I'm afraid there are changes to the AI file structure that mods will need to take into account.



Slashman wrote:
OK I did not know this, but this isn't really more varied play in terms of what the original question was aimed at. I think he was asking if the AI employs more/different strategies at higher levels.


Well it doesn't swap specific behaviour in and out no, but the decision weights are altered where diplomacy is concerned.
0Send private message
9 years ago
Dec 1, 2015, 6:35:51 PM
Posting a save is useful for the developers to look at.



I think what you are describing is "roleplaying" vs. quality play. The decisions to use non-faction units are reasonable considering that many faction-specific units stink (ex. Agache Shaman).
0Send private message
9 years ago
Dec 1, 2015, 9:04:06 PM
Be that as it may, while replacing the shamans with Ended may be good gameplay, the lack of Tenei walkers and replacing Dawn officers with Driders is NOT. From my nearest guess, I think the AI is ranking minor factional units too highly. Then again, I did play this game on Hard difficulty. Do they use more varied play at higher difficulty levels?
0Send private message
9 years ago
Dec 1, 2015, 9:40:49 PM
Pondera wrote:
Be that as it may, while replacing the shamans with Ended may be good gameplay, the lack of Tenei walkers and replacing Dawn officers with Driders is NOT. From my nearest guess, I think the AI is ranking minor factional units too highly. Then again, I did play this game on Hard difficulty. Do they use more varied play at higher difficulty levels?




Difficulty levels do NOT change AI behaviour. They only add heuristic based bonuses.
0Send private message
9 years ago
Dec 1, 2015, 9:56:10 PM
The A.I is much better.I still think they're a bit shy in diplomacy.I never see them wanting techs for instance.
0Send private message
9 years ago
Dec 1, 2015, 10:08:13 PM
Ashbery76 wrote:
The A.I is much better.I still think they're a bit shy in diplomacy.I never see them wanting techs for instance.




In my current game the Ardent Mages wanted one very specific tech (one for dealing with expansion disapproval). This makes sense because they had many cities and not many level 2 districts.



What seems to be happening is that the AI is better at knowing what techs are valuable to them so they don't put a lot of value on techs that they don't need or require for their current win strategy.



Personally I don't try to trade for techs I don't really need or that I will research anyway when I need them.



Maybe there is a problem with the AI not being aggressive enough diplomatically, but in my game, none of them were hampered by lack of techs from what I saw. Maybe others have had different experiences.
0Send private message
9 years ago
Dec 1, 2015, 10:11:07 PM
Ashbery76 wrote:
The A.I is much better.I still think they're a bit shy in diplomacy.I never see them wanting techs for instance.




So you haven't seen this kind of odd unit composition? Maybe the problem lies in that I was using the even more epic mod. I've reset my game to standard and am about to give it another try.
0Send private message
9 years ago
Dec 1, 2015, 10:48:29 PM
Inappropriately heavy use of support units does seem like a continuing issue to me. It's not uncommon to see Cultists with 6-strong armies composed entirely of preachers.
0Send private message
9 years ago
Dec 1, 2015, 11:55:31 PM
natev wrote:
Inappropriately heavy use of support units does seem like a continuing issue to me. It's not uncommon to see Cultists with 6-strong armies composed entirely of preachers.




I did see the Drakken with several armies of Driders in my game and one or two Justicieres.



While I like that the AI is using minor factions more, I think that it should limit itself to not more than a couple support units per stack.
0Send private message
9 years ago
Dec 2, 2015, 6:24:43 AM
Pondera wrote:
Also, I noticed that they still aren't developing their cities as much as they should be. At Turn 240, they hadn't even built a canal system in their capital city yet.


Remember that you only need 9 techs to unlock each era, so there will probably be some early-game techs that you never get, even in the endgame.



Canal system is one that I often skip, personally; +1 industry on terrain with industry is pretty good if your city is huge (AND surrounded by certain terrain types), but in the early game when you've just got 1-2 districts that's at most 7-10 industry, and probably more like 5. It costs 250 industry to build, so it doesn't even pay for itself until ~50 turns later! (Longer with winter, since it only works in summer.) And that's before considering the dust you're losing in upkeep every turn (even if you consider industry, say, twice as valuable as dust, that adds another ~12 turns before it pays for itself), or the other things you could have researched or built instead. And then in the late game, when your cities are all larger, Canal System is better, but it also has a lot more competition...



So I wouldn't necessarily fault the AI for never building a Canal System. (Note: I don't have the expansions. Don't know if that affects the balance of this particular structure.)



(If you mean they haven't build ANY buildings at all from era 2 or later, then that's more concerning.)



Similarly, building faction units requires research, and so does assimilating a second minor faction. Again, you don't research every tech; you pick and choose. If the game is well-balanced, then those techs should sometimes be worth getting, but also sometimes not. If you can get away with using your starting faction unit plus one minor faction unit, that's not necessarily a bad plan.



(In fact the game is not perfectly balanced, and there are some faction units I'd be much more likely to unlock than others, but other players could give a better analysis of those details than I could...)
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message