Logo Platform
logo amplifiers simplified

Artificial Idiot (AI) combat??

Reply
Copied to clipboard!
9 years ago
Jan 15, 2016, 9:02:29 AM
'allo 'allo.



I have been playing just over a month now and I started off with the Vaulters and have recently started a few games with the Broken Lords. I did this because, as per another thread I became frustrated with the fact that the cavalry had higher initiative than my archers. Seriously what army leads with troops before the artillery?



Either I am missing something or the Artificial Idiot (AI) combat really shines through when you have infantry and support.



Example One:

My hero has highest initiative followed by my Dust Bishop ((support) via armour and trinkets) and then the Stalwarts (infantry). I have set up the 3 Stalwarts in front of my Dust Bishop. After my hero goes and then the enemy it is time for my Dust Bishop and Stalwarts to go and as expected of the 4 enemy 3 are within range of my Dust Bishop's starting position. So what does he do, well of course he leaves his safe position moves 3 tiles to put himself next to an enemy before attacking.



Acceptable Outcome:

Dust Bishop stays in his current position and attacks the enemy as there was no requirement for him to move.





Example Two:

My hero is carrying some very serious hardware that will allow him to take 90% of the enemies health in one swipe. He has on the first attack done away with 90% of one enemies health and there is a 2nd enemy behind him at 100% health. The enemy with only 10% health is adjacent 2 Stalwarts who have enough to easily take the remaining 10%. I bet you can guess what the hero did on the next turn, yep, he did not attack Mr 100% instead he attacks Mr 10%.



Acceptable Outcome:

Hero attacks Mr 100% leaving Mr 10% for the other 2 friendly units.





Example Three:

The battle is all but over and it is my Dust Bishop's turn and is in range an enemy, he is also 2 tiles behind my Stalwarts. The thing about the Dust Bishop is it takes health from its attack and will give it to adjacent friendly units. Very cool. But, there is always a but, this time he does not move 1 tile to be adjacent the friendly units so they can benefit, no, he just attacks from where he is and the bonus to my team is lost.



Acceptable Outcome:

Dust Bishop moves next to the friendly units because it is safe to do so and gives the health bonus.



Example Four:

There is the ability to specify your unit move to a tile and then attack from that tile and is is most often used with infantry/cavalry. SO I whisper in the ear of my trusted unit "psst, pssssst, see that enemy unit over there?" and he replies "Sir yes sir!". I continue to whisper, "I want you to move to his left and attack him from that high ground", "Sir, yes Sir. Go to the forest over there on the left". "No you idiot, the other left with the high ground!". "Sir, yes sir".



In a total shock to everyone the enemy unit in question moved! No one was more shocked than the unit I sent after it because it went to the 'other left' and did played tiddlywinks.



Acceptable Outcome:

For melee units if there is an attack order on the end of the move order and the enemy unit moves the friendly unit ignores the move order and reverts to a standard attack order. If a ranged unit then if the unit can still attack from the location it continues with the move then attack order, or as above reverts to a standard attack order.



Example Five:

There are three enemy units right were my hero and 4 of my guys are and there is one off over there with a capable unit. But we all know there is just something so very special about the enemy unit over there playing hard to get because instead of attacking the units right there most if not all my chaps go chasing the distant unit which will take them two turns at least. Note the chased unit was not special or a hero or uber, just another standard unit. Also this was a self order not a "attack that unit" order from me.



Acceptable Outcome:

That if they have an enemy unit next to them and they cannot reach the other unit in that round then they attack the units next to them instead.



And it goes on and on and on and on and on and on and on and on and on and you get the point.





I could excuse this if this was the initial release but after 2 (or 3?) expansions it is a tad much.







Cheers,



Capt. Teddy Bear
0Send private message
9 years ago
Jan 15, 2016, 9:07:16 AM
I didn´t understand if this is manual or auto. Were you spectating the AI?



edit:



regardless - I don´t think there´s really an AI taking care of battles. The units follow some routines that are specified to them, and put priorities on things that at first might not be so clear.



First thing is Morale. Since it affects stats so much, units will always try to position themselves for good morale, like they will tend to target units with little morale.

Second is class priority, I´m sure someone can find that, but usually units will try to kill support and ranged units first, probably because they tend to have less health and defense.

Third is reinforcement priority, units will tend to target reinforcement flags in order to get number superiority during a battle.

Fourth is evading counter, units will tend to gang up to attack the same unit to avoid counter and to reduce future morale. It works particularly well with infantry that will then expose a high defense to unchecked enemies.

Fifith is locking heroes. Units tend to go full on suicidal on Heroes and Guardians because when you think about it, if that unit is necessarily taking people down, it´s always tactically better that it´s someone of your own design. Plus, that tend to stack with gang up thing, since heroes have exceptional damage but can only damage one unit per turn.



Remembering these helps predict the AI, but even on manual battles, when an order can´t be fullfilled you are at its mercy. It can make bad decisions because it´s so rigid around these things (and probably others, I have no in-depth knowledge) - but the tactical width of battles is so narrow to begin with that it doesn´t usually compromise when faced with another AI.



It´s certainly not better than a human, and I´d say it was never meant to be.
0Send private message
9 years ago
Jan 15, 2016, 9:39:46 AM
Yes the combat AI still needs a lot of work. I have seen my Drakken general heal himself even when he was at full hp.



Which is why I always put everyone in hold position, and I give them very precise orders.
0Send private message
9 years ago
Jan 15, 2016, 10:49:16 AM
Capt.TeddyBear wrote:


Dust Bishop stays in his current position and attacks the enemy as there was no requirement for him to move.



This is something we are currently discussing with the VIPs:



wilbefast wrote:
Hmm... trouble is the behaviours used by the offensive strategy always target units, and while this means they take into account the potential targets' tile (ie. the target is on a forest or city tile, for instance) these behaviours don't take into account where the unit doing the targeting would be moving from/to in order to perform said attack.



I suppose we could add a second version of each of the offensive behaviours which targets a ground tile - for 1.3.7 I actually added a new behaviour for units with area-of-effect abilities which does just this: it chooses a tile based on the number of surrounding enemies. So you'll notice, for example, that Nidya will fly into clusters of units to maximise the number they hit. The trouble is that that support units with claws inherit this behaviour from the Sweep Strike-back ability. It's a cautionary tale: the more alternative behaviours we have for each strategy the harder it is to predict what the unit is actually going to end up doing, and so to balance between all the options.


wilbefast wrote:
It occurs to me though that generally when using the default offensive strategy you want to deal damage at all costs - targeting a tile might mean being (or at least ending up) out of range, which might be even more frustrating under certain circumstances.


Note that 1.3.7, which is currently available only to the VIPs not the public, fixes a number of issues with the battle targeting, especially where support units are concerned.



Capt.TeddyBear wrote:


My hero is carrying some very serious hardware that will allow him to take 90% of the enemies health in one swipe. He has on the first attack done away with 90% of one enemies health and there is a 2nd enemy behind him at 100% health. The enemy with only 10% health is adjacent 2 Stalwarts who have enough to easily take the remaining 10%. I bet you can guess what the hero did on the next turn, yep, he did not attack Mr 100% instead he attacks Mr 10%.



Under many circumstances it is best to finish off the damaged unit, so this is what units will more commonly choose to do. We do not perform checks of every other allied unit's damage potential when determining whether it is worth attacking a target or not, because when you click "auto-resolve" the game needs to simulate all 6 phases instantly. The targeting calculations therefore need to be fairly light-weight. We have found also that more complicated behaviours which take into account more edge-cases can be frustratingly unpredictable both for players and for QA.



Capt.TeddyBear wrote:


The battle is all but over and it is my Dust Bishop's turn and is in range an enemy, he is also 2 tiles behind my Stalwarts. The thing about the Dust Bishop is it takes health from its attack and will give it to adjacent friendly units. Very cool. But, there is always a but, this time he does not move 1 tile to be adjacent the friendly units so they can benefit, no, he just attacks from where he is and the bonus to my team is lost.



The offensive strategy behaviours target units, not tiles (see above).



Capt.TeddyBear wrote:


For melee units if there is an attack order on the end of the move order and the enemy unit moves the friendly unit ignores the move order and reverts to a standard attack order. If a ranged unit then if the unit can still attack from the location it continues with the move then attack order, or as above reverts to a standard attack order.



Interesting solution - I like it smiley: smile what does everyone else think?



Capt.TeddyBear wrote:


That if they have an enemy unit next to them and they cannot reach the other unit in that round then they attack the units next to them instead.



KnightofPhoenix wrote:
Yes the combat AI still needs a lot of work. I have seen my Drakken general heal himself even when he was at full hp.


These issues should both be fixed in 1.3.7 - if not feel free to chuck your saves my way!
0Send private message
9 years ago
Jan 15, 2016, 2:10:21 PM
wilbefast wrote:








These issues should both be fixed in 1.3.7 - if not feel free to chuck your saves my way!




Will 1.3.7 also address the AI's preoccupation with killing militia versus other, more threatening units that are within reach?
0Send private message
9 years ago
Jan 15, 2016, 2:49:05 PM
Slashman wrote:
Will 1.3.7 also address the AI's preoccupation with killing militia versus other, more threatening units that are within reach?


This isn't an issue I've run into for quite some time - I had understood it had already been addressed long before 1.3.5 even. We haven't looked into this specifically, no, so if it has been fixed it will be as a side effect of the other changes. If you have an example of this behaviour handy I'd be happy to look into it and, if it's still present in 1.3.7, see what can be done to improve things.
0Send private message
9 years ago
Jan 15, 2016, 3:00:01 PM
wilbefast wrote:
This isn't an issue I've run into for quite some time - I had understood it had already been addressed long before 1.3.5 even. We haven't looked into this specifically, no, so if it has been fixed it will be as a side effect of the other changes. If you have an example of this behaviour handy I'd be happy to look into it and, if it's still present in 1.3.7, see what can be done to improve things.




I've seen it repeatedly in games since the big AI updates.



The problem is that I don't save before every turn so unless I specifically remember to look for it, the combat has already ended. But it is really not difficult to reproduce. Specifically it happens most when the militia are coming in as reinforcements. You're engaged with the enemy and for some reason they will ignore other military units and try to strike at militia.



The most I can come up with is that maybe there were multiple reasons for this behavior and you addressed the most common one.



I'd have to start another game to try to keep an eye out for it. Any idea when 1.3.7 will go live?
0Send private message
9 years ago
Jan 15, 2016, 3:23:59 PM
Slashman wrote:
I've seen it repeatedly in games since the big AI updates.



The problem is that I don't save before every turn so unless I specifically remember to look for it, the combat has already ended. But it is really not difficult to reproduce. Specifically it happens most when the militia are coming in as reinforcements. You're engaged with the enemy and for some reason they will ignore other military units and try to strike at militia.



The most I can come up with is that maybe there were multiple reasons for this behavior and you addressed the most common one.


If you save mid-battle and load the file you'll be back at the start again in theory - you're right that it doesn't seem to tricky to reproduce though. I'll check it out.



Slashman wrote:
I'd have to start another game to try to keep an eye out for it. Any idea when 1.3.7 will go live?


We're waiting for Endless Day to make any announcements - it won't be the raw 1.3.7 you get though, it'll be a later version which takes VIP feedback (plus anything other things that come up on the forums - like this) into account.
0Send private message
9 years ago
Jan 15, 2016, 3:48:34 PM
wilbefast wrote:
If you save mid-battle and load the file you'll be back at the start again in theory - you're right that it doesn't seem to tricky to reproduce though. I'll check it out.





We're waiting for Endless Day to make any announcements - it won't be the raw 1.3.7 you get though, it'll be a later version which takes VIP feedback (plus anything other things that come up on the forums - like this) into account.




I will try to start a game this weekend and see if I can't produce a save and some screenshots. I'm kind of hooked by Grim Dawn right now though so there may be distractions and delays. smiley: rollblue
0Send private message
9 years ago
Jan 15, 2016, 4:59:16 PM
Slashman wrote:
I will try to start a game this weekend and see if I can't produce a save and some screenshots. I'm kind of hooked by Grim Dawn right now though so there may be distractions and delays. smiley: rollblue


Hey, don't sweat it - the help is always welcome but at the end of the day making the game better is our job smiley: smile
0Send private message
9 years ago
Jan 15, 2016, 10:02:49 PM
KnightofPhoenix wrote:
Yes the combat AI still needs a lot of work. I have seen my Drakken general heal himself even when he was at full hp.



Which is why I always put everyone in hold position, and I give them very precise orders.




I see this happen often with enemy units who will heal themselves or the unit next to them when at 100% health.
0Send private message
9 years ago
Jan 15, 2016, 11:19:18 PM
Hi wilbefast,



Thank you for the response and can I say I am stoked and pleasantly surprised.





wilbefast wrote:
Hmm... trouble is the behaviours used by the offensive strategy always target units, and while this means they take into account the potential targets' tile (ie. the target is on a forest or city tile, for instance) these behaviours don't take into account where the unit doing the targeting would be moving from/to in order to perform said attack.



I suppose we could add a second version of each of the offensive behaviours which targets a ground tile - for 1.3.7 I actually added a new behaviour for units with area-of-effect abilities which does just this: it chooses a tile based on the number of surrounding enemies. So you'll notice, for example, that Nidya will fly into clusters of units to maximise the number they hit. The trouble is that that support units with claws inherit this behaviour from the Sweep Strike-back ability. It's a cautionary tale: the more alternative behaviours we have for each strategy the harder it is to predict what the unit is actually going to end up doing, and so to balance between all the options.




I had noticed that my attacking unit often did not chose the best tile to attack from i.e. not using height and/or forest and instead going to plain tile. Especially frustrating when this was the first attack and the subsequent non retaliation attacks were then from better tiles. I also believe that the decision tree does not take into account subsequent attacks and acts in isolation. I say this as often I see one of my units move short of it's maximum distance and in doing so disables the subsequent unit from attacking as it has been blocked off due to either maximum range limit or terrain.



I can imagine how complex the decision tree/s are and then I start to glaze over... but I take from the second paragraph example that the decision tree is not based upon the class of unit?





Capt.TeddyBear wrote:
My hero is carrying some very serious hardware that will allow him to take 90% of the enemies health in one swipe. He has on the first attack done away with 90% of one enemies health and there is a 2nd enemy behind him at 100% health. The enemy with only 10% health is adjacent 2 Stalwarts who have enough to easily take the remaining 10%. I bet you can guess what the hero did on the next turn, yep, he did not attack Mr 100% instead he attacks Mr 10%.




wilbefast wrote:
Under many circumstances it is best to finish off the damaged unit, so this is what units will more commonly choose to do. We do not perform checks of every other allied unit's damage potential when determining whether it is worth attacking a target or not, because when you click "auto-resolve" the game needs to simulate all 6 phases instantly. The targeting calculations therefore need to be fairly light-weight. We have found also that more complicated behaviours which take into account more edge-cases can be frustratingly unpredictable both for players and for QA.




Yes it is often best to finish a unit as a 90% depleted unit can still do 100% damage (while I would not want it to do only 10% damage it is, hmmm that it still does 100% damage) I often see the opposite whereby a damaged enemy unit next to my unit which could be killed or definitely killed in the following turn is ignored and another enemy unit at 100% is attacked. It led me to presume that at some stage health was linked to attack i.e. less health less attack.







I will in future make better notes and consider the circumstances more when I see what I consider to be poor attack decisions.





Is there a battle pause? I ask as it would be nice to be able to do so that I can see the stats and bonuses to better understand the battle. Even on slow the stats often are up and gone before they can be fully comprehended.





Cheers,



Capt. Teddy Bear
0Send private message
9 years ago
Jan 16, 2016, 3:55:48 AM
Capt.TeddyBear wrote:
Is there a battle pause? I ask as it would be nice to be able to do so that I can see the stats and bonuses to better understand the battle. Even on slow the stats often are up and gone before they can be fully comprehended.





Screenshots.
0Send private message
9 years ago
Jan 18, 2016, 9:23:36 AM
Capt.TeddyBear wrote:
I can imagine how complex the decision tree/s are and then I start to glaze over... but I take from the second paragraph example that the decision tree is not based upon the class of unit?


The class of the unit is taken into account, as is the class of the targeted unit smiley: smile We don't actually use behaviour trees though: a "behaviour" in the context of the battle targeting is a set of weights given to various parameters like the distance to the target, the health of the target, the height of the target and so on. There are around 60 behaviours in total which each use some or all of about 40 parameters. A unit has access to set subset of behaviours based on its body (so class) and what abilities it has. In battle a unit's behaviours are available depending on the currently selected strategy (offense/defence/hold): some behaviours are restricted to a specific strategy while others can be used regardless of the strategy.



You can have a look at the weights by opening up steamapps\common\Endless Legend\Public\Simulation\BattleTargetingUnitBehaviorWeight.xml if you're curious, and as with all the files in Public it can be changed by a mod.
0Send private message
9 years ago
Jan 21, 2016, 5:16:20 PM
wilbefast wrote:




Interesting solution - I like it smiley: smile what does everyone else think?




I think it's a valid solution, personally.
0Send private message
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message