I really like LH. "Time Played" is 163:07! I've spent the past 3 days on one game, and am only about halfway thru it. Game is huge world, insane AI, 5 insane AI foes (all empires, I'm a custom kingdom). Settings are mucho resources and magic, no wildlands, temperate. Currently turn 264 and I'm (Dangerites is me) hanging in there...
The game is beautiful -- the art is lovingly crafted. We can easily tell which element a shard is, and if it's developed. We can see what weapon our Sov is wielding -- not just on the paperdoll but on their tactical representation. We can zoom in and see the people doing their daily tasks.
Balance is constantly improving. Spells are interesting. Exploring is fun. All in all a lot of good stuff, and a good game.
The one part lagging behind the rest is the AI. It's not that the AI is terrible, it's that the rest of the game is so good. There's no MP, so the AI is all we have. And it's a strategy game. And we've heard how the AI will make us cry in anguish it'll be that good. I have suggestions to make that claim more a reality, all based upon my insane AI world and insane AI foes observations in many hours and multiple games, and with the clarification that I'm an average skill player (in Civ4 emperor difficulty is a challenge for me) so insane difficulty should be beyond my ken:
First tactical:
-target selection. The AI needs to better select the most 'dangerous' target. Suggestions to prioritize are ranged, Sov, champion, nearest melee (nearest in terms of # of moves to close to melee attack range). Within each 'category' the unit capable of doing the most damage comes first (so amongst ranged units, an 'ice' mage would come before a 'fire' mage if the targets are immune to fire attacks).
This can be modified based upon the AI leader/race. For example, a 'mage' AI sov might fear melee more than magic so melee would be prioritized. Or maybe a 'mage' Sov would most hate the 'competition' so would prioritize magic foes. This provides a means of making the AI sovs more unique.
-focus fire. I've seen one good example of focus fire in my current insane AI game -- the fire skeletons at the end of the 'night of the skeletons' event focus fired at one of my units despite my best efforts to save him (moved him back, moved other units nearer the fire skeletons, etc.). Every other battle it appears that the AI randomly and individually select their targets with no regard for finishing off wounded units. In one battle of my 6 units vs. 6 shrills I should have been wiped out but instead I won with no deaths because the shrills appeared to do everything they could to not kill any of my units. A unit with only a couple of health remaining was adjacent to 2 enemy units for several turns and they instead attacked distant units. No way that unit should have survived.
-moving to maximize attacks. When I move to engage I try to maximize the number of units I can get adjacent to the enemy. I'll also move after engaging if it'll help add in another unit to the attack next turn. AI doesn't do this, it'll just sit there with no regard for adding in more attackers next turn.
-target selection. Example -- AI unit #1 is adjacent to 2 of my units. One of my units has 2 AI adjacent (so swarm=2), the other has 3 AI adjacent (so swarm=3). All else equal (and in this case all else was equal) the AI unit #1 should attack my 'swarm=3' unit but instead it attacked my 'swarm=2' unit.
Strategic
-preparing before declaring. Been mentioned many times for many versions -- the AI should prepare to attack before attacking. Create armies designed to counter the target's units, preposition the armies, then attack.
-spells. I've never seen the AI cast freeze/tremor or similar spells on my armies in their territory. I've never had any AI cast damaging spells on my armies that can be cast out of the AI's territory. I've never seen an AI couldwalk in to defend against my incursions. I've only seen 2 or possibly 3 spells cast on my cities (and I pay attention to this) in all my games, most of which were on ridiculous and now insane difficulty.
-I'm still seeing cities with no production. Could it be a 'figment' of a unit being produced and no second unit queued for the 'in-between' turn and there will be a unit queued at the start of the next turn? or is it a true 'no production'?
-I'm still seeing AI create units in non-fortresses. I specialize my cities -- my capital is usually my fortress, with all the unit augmenting buildings/spells, and this city creates all my units (until I can add in a second such specialized city) as much as possible, units with all the combat bonuses I can pack in (I then try to keep the units alive -- quality over quantity).
-I'm still seeing AI armies sitting still for several turns (not as long as in the past where a unit may sit for 50 or so turns).
-I'm still seeing unclaimed goody huts in AI territory (someone suggested after I mentioned this months ago it was 'strategy' but Frog or someone mentioned that if an AI passed thru an unclaimed goody hut without specifically targeting it the hut would not be claimed, and this appears to still occur).
-reforming armies. I cast tornado, AI stack is scattered, and most of the units just sit there. A few will move, but none will recombine.
-coordinating armies. I'm seeing multiple stacks approach, I'm not seeing them coordinate attacks effectively to wear me down and overwhelm me.
-army composition. I'm no longer seeing pioneers in armies, but I would like to see units specifically created to counter the target's strengths/weaknesses. And better composition regarding melee and ranged, augmented with champion spellcasters (combined arms).
-diplomacy. An AI offers me a tech trade -- wants 1219 gildar, I have 171 gildar and am netting 2.2/turn.
There's more for both tactical and strategic, but that's all I can think off off-hand... There's a myriad of threads with other points, such as the one on settlable spots, etc.
I mentioned AI needing work in another thread and the response was:
1- some folks 'abuse' CTL-N for a great starting location and custom Sov creation to 'beat' the AI
2- the response to improve the AI could be to increase the bonus modifiers (AI units are bigger/sooner)
Regarding 1, as I detail above, there's a lot of room for improvement. I'm not talking about Einstein AI improvements, but basic ones like 'focus fire' and 'target selection' and 'occasionally using the spells provided'. It's not CTL-N beating insane AI, it's the lack of 'intelligence' in AI.
Regarding 2, this is the easy way out. Anyone can increase a modifier, or nerf and/or remove spells/abilities. Adding intelligence to AI is hard, but we have no MP, and we've heard claims the AI will be good. Increasing modifiers doesn't make the AI better.
If the AI remains as is, LH will still be a good game. Given the skill of the team working on the game it'll just be a lost opportunity to advance the genre (I'd be happy if it would match Civ4's AI...).
Edited in:
Remember, the above is based upon insane world/AI difficulty. For lesser difficulty levels the above may not apply. For example, with regard to focus fire -- on the easiest levels avoid focus fire, on the middle levels make it purely random (it happens occasionally), on higher levels it should happen all the time. This way difficulty is based more on intelligence and less on bonus modifiers.
Can you please take a look on how the AI handles the Escape Spell in auto tactical combat? I am playing Capitar and when I reach the mopup phase of a tactical battle i decide to let it autocombat to save time. My sovereign decides to use escape just before I kill the last monster denying me of the experience. Please take a quick look into it.
Also if its possible to stop the units from using abilities like soulspark at will in tactical auto combat.
Yes, obviously finding where to put the time in to make the most useful changes is difficult.
However, if you were to focus on the most meaningful tasks first, you could probably make some significant improvements.
For example, if you were to focus on effective preparation, stacking and coordinating in groups, you would see significant improvements. If the AI would be prepared to fight, it wouldn't have these largely undefended cities on the border while all it's forces are left behind in it's other cities. If the AI would consolidate it's weak stacks into strong stacks, the player would have no weak stacks to pick off. Finally, if the AI coordinated it's stacks together, either to all attack one city or to attack two separate areas at once, you'd give the AI the ability to make effective attacks.
All of these would remain no matter what other aspects are changed. They are fundamentals of strategy and, thus, even if you changed other aspects of the game, you wouldn't lose the improvements. Also, although my programming ability has collected much dust, I don't think these would be incredibly difficult to implement. It just requires the AI to realize it needs to keep its units stacked together, rather than separately, along the borders, rather than in back cities, and a timing sequence so they can attack together.
Anyways, just my 2 cents.
Is it possible to release the codes for the AI?
I've seen marvelous things done with RTS games AIs when they are freely edited (I'm thinking of AOE2)
Bump.
I'm mining this thread today for AI updating. So if there's something specific not mentioned here, go for it.
There are some noteworthy findings on the AI here too:
https://forums.elementalgame.com/445389
I hope you can check it out Frogboy.
And thank you for your work! I really appreciate it.
Since you'll probably be reading this, I'd also like to chime in a big thanks on LH. It's really hitting the spot. Me and my pewter dragon think SD is fully redeemed
Hi Brad,
Watch Episode #1 and #4 for some of my thoughts on AI improvement https://forums.elementalgame.com/445569/page/1/3370765. Here are a few:
1. I'm able to trick the AI into stop moving its pioneers simply by putting one of my units nearby.
2. Some AI units get stuck/frozen on a single tile for many turns.
3. Teach the AI to avoid being swarmed in a battle
4. Do resistance checks. Don't cast spells or abilities on units that are immune.
5. AI spiders should cast web on melee units not ranged units because it has no real effect on range units.
6. Have Yithril units go Berserk after they move so that they get the extra 2 movement points.
7. Have the AI re-evaluate its location before it builds an city or an outpost just to make sure there's not a better location 1 tile away.
8. Have the AI build the outpost or city at the end of the turn after it moves... don't wait till the next turn.
9. Have AI sovereigns stop buying so many greaves and horses and wargs.
10. Don't let the AI cast Wither on caravans. By the way, the AI is doing a great job casting strategic spells now.
I suspect there maybe something wrong with the AI Target Is Worthy tag, because as Brad said, it is hardcoded and I see the code in the spell def, those spiders shouldn't be webbing the ranged units.
I'll chime in that watching ruffians use the rush ability then move is a waste. If it is not too much coding, it would be nice to see them move then rush to move again. (If that is too much, then might as well turn off the rush ability for the AI as there is no need to watch a useless spell being cast)
I agree with wither, there should be a target is worthy type attached. Something like this...
<ValueCalcWrapper> <ValueType>IsTargetWorthy</ValueType> <Calculate InternalName="Calc" ValueOwner="TargetUnit"> <Expression><![CDATA[[UnitStat_CombinedAttack]]]></Expression> </Calculate> <Calculate InternalName="Value"> <Expression><![CDATA[[Calc] > 5]]></Expression> </Calculate> </ValueCalcWrapper>
I have to say the AI is much improved and I do like all the little details involved with getting the AI to do what it needs to do. Like to see a lot of good updates here.
Want a few more?
11. The AI is little too passive on the higher levels about declaring war on the human player.
12. The AI is declaring war on too many people at once. I know Yithril likes war but declaring war on everybody just means that he will soon be out of units and easy for the human player to walk over. For example, have Yithril declare war early and often, but focus on nearby opponents (sometimes I see them in wars against people on the other side of the map or with everybody on the map).
13. If the human player does not give into tribute demands, that should be very upsetting to the AI. "I'm going to give you one more chance... give me 62 gildar or else I pry it from your cold dead hands!"
14. When at war, production should focus on units and defensive structures. I see the AI still building wells, studies, wonders, etc., even as I approach.
15. Encourage AI sovereigns of the Mage class to choose Summoning traits. I would love to see the AI using summoning spells in battle.
Please understand: My view is that your reports are doing us a favor.
I enjoy working on the AI. A lot of my work ends up being fixing bugs in some of the worker functions I deal with that work differently than I thought.
Last week we had our annual Game Designer Festival and Soren was saying that one thing he always insists on is writing his own worker functions which, in hindsight, I wish I had done with FE/LH. But now that the game is actually released, I have the luxury of reading this great stuff and working on it. It's a blast.
I'm assuming the reason you didn't write them was to save time, though ironically if you have to go back through and figure them out, it may have been better to create them in the first place. How many other staff members than you worked on the AI?
Glad you enjoy working on the AI so much, though I'd also love to see/hear from any other AI coders at Stardock, too.
Spider AI needs to understand that webbing a beguiled unit is a waste.
I've posted before on a few different things, notably that the AI should concentrate more on defence when its on the defensive (building units, not moving units out of cities when there's a scary stack nearby). I've also had a chance to observe the offensive AI a bit now and it also seems to do some strange things. Normally I crush AI units before they get close to my cities, but I was caught slightly off-balance by the event which means everyone goes to war with everyone else (blood season?). So I had a chance to observe what it did with large stacks in my borders.
1) Strange thing number one: large AI army sat two tiles away from an undefended city and did not move. I think it was two tiles through forest, so two turns away, but even so I was surprised it did nothing. I could understand heading for my capital (which was about five tiles away and not well defended), or maybe heading back to its own territory, but not moving seemed very strange.
2) Strange thing number two: I lost a weak army to its stack when I attacked with a few garrison troops I'd managed to round up, underestimating the strength of the AI stack. Again, this left the nearest city undefended. My best stack was otherwise engaged so I was expecting to lose the city, but the AI walked right past it. At least the stack was moving this time, although I'm a little puzzled where it was going. It may possibly have been heading for my capital, but my capital was something like twenty tiles away.
Assuming it was heading for my capital, I can see this can be a good tactic if the capital is nearby, or (if you want to make it more complicated) maybe if the defending country doesn't have roads. But if the defending country has roads, it's going to be almost impossible for the AI to win a race, it's just giving the defenders time to organise. In general I think it should give more priority to thinly defended nearby targets, and it should re-evaluate this on a turn by turn basis. So in other words if the city's defenders kill themselves on the stack it should decide whether it can now take the city.
Even if it razes the city after capturing it that would help it win a war of attrition. Alternatively it could decide to garrison the city or try to take another city. But just bypassing the city seems bad strategy.
If it does some "target of opportuniy" evaluation to target things which are of benefit and not defended, that might help with its ability to target outposts and goodies as well.
Hope those thoughts are useful.
I've noticed that the AI generally does not concern itself with buildings that reduce unrest? I would have figured these would be higher on their priority list...especially if they conquer another factions city and have to deal with the oppression penalty.
Yeah I agree, in general I don't think it prioritises production and unrest buildings enough.
Yea, ironically not writing the worker functions myself has cost me dearly over and over again.
I should have learned in GalCiv II about this. I wrote all the worker functions in GalCiv II except the ones dealing with the planetary improvements.
It can be really frustrating seeing someone say "The AI needs to do X" and the AI explicitly is trying to do that only to find out there's some misunderstanding in how I'm using a worker function (or a bug or what have you). This has been particularly problematic when getting the AI to do spells (the infamous spider webbing is an example).
Made some pretty significant progress today. I think the improve nets swill be noticeable enough as to be unmistakeable. More to come.
YAY!! I can't wait to see how you improved the AI!!
I'm going to check in what I've done on Sunday and hopefully it'll go into the next update.
There's a lot more to do of course but I found some issues with pathfinding and city construction that make a pretty big difference. Also worked a bit on the tactical battles.
I'll probably need to spend a whole update cycle on tactical AI though since it's going to require a lot of YouTube watching.
So glad AI is getting much needed attention again!
With more interesting heroes, more differentiated factions (StormWorld mod has accomplished this imo), and more engaging and challenging AI this will be the ideal fantasy 4x game.
I really think the engaging part of AI is going to be more important than the challenge for the silent majority of players, and that diplomatic AI is the key to making the players think of the AI as sovereigns instead of opportunistic robots.
Here's some suggestions on diplomatic AI: https://forums.elementalgame.com/444991/page/1/#3364056.
I'm at the point I just wish Caravans were completely removed from the game. Now that the AI is actually casting freeze, they're targeting caravans as they're perceived as enemy units. Which is also irritating having to cycle through a dozen enemy caravans to actually find the real enemy units broaching my borders.
Caravan units do more harm than good- I agree they also need to be axed. It feels like leftover legacy from GC2 that never transitioned well.
I like caravans despite annoyances. Hate to lose them altogether.
Agree completely. Open the AI interface and allow you to watch your AI play against itself and/or others' builds.
I like the diplomatic pressure having caravans create, but in practice seeing the caravans and having them work properly isn't fun/functional. They could be removed and have the bonuses still apply or continue to be improved. Right now, it's kind of in an 80% working state that causes issues with the AI/pathfinding/bugs.
Ok, here's today's check-in:
+ Fixed AI bug where one of the AI personalities could, in some cases, rush buy a unit without having the necessary resources (metal)+ Improved granular difficulty increases between challenging difficulty and insane. Rather than rely on a money cheat, the higher difficulty units get some additional unit perks that make them more interesting.+ Made all the AI personalities somewhat better at taking out targets of opportunity (like outposts)+ Made AI sovereign more concerned about clearing out monster lairs near its home base early game.+ Fixed a bug that could cause certain AI personalities ("unstable" and "paranoid") to cease building city improvements+ Aggressive and Warmonger AI personalities more aggressive about destroying enemy improvements+ Some AI personalities will more aggressive target quests+ Fixed bug that kept AI from choosing the infinite projects (wealth, growth, etc.) if they had just trained a unit.+ Improved AI's choosing of city specialities based on player strategy input (thanks forum and YouTube posters!)+ AI players will tend to do most of their unit building in fortress-cities when possible+ AI smarter about what types of units it builds based on its current economic/military conditions+ AI cab do sneak attacks, especially imperial factions if it is in its best interest+ Unstable AI personality will still do a sneak attacks (even if it's suicide) and they just don't like you.+ Paranoid AI personality will overstate their military strength (i.e. lie to itself)+ AI is more likely to surrender if the military situation is hopeless (you can disable AI surrendering in the game setup)+ AI smarter about using health items in tactical battles+ Fixed infrequent game hang bug+ Tweaked the way power ratings are calculated such that it more accurately takes into account the player's *potential* military power as well as its current military strength.+ Fixed path finding bug that would cause the AI players to sometimes get stuck.+ AI is less inclined to settle on crappy food terrain+ Difficulty sovereign HP modifier now affects champions+ Reduced the HP bonus that harder difficulty AI players get+ Hard and Expert AI players no longer receive an HP bonus to their trained units+ Ridiculous AI players have a reduced HP bonus to their trained units
-
Now, coming up, I'm going to create a thread asking the experts here on tactical battle strategies.
There are many great features available to you once you register, including:
Sign in or Create Account