Forums-->General game forum-->
Author | Understanding Game A.I. ( Artificial Intelligence ) a strategy guide ( kinda ) |
Understanding game A.I , exactly what it means .
There was some quote like " If you know the enemy and know yourself, you need not fear the result of a hundred battles. "
Obviously understanding how it works would help in PvE battles but it can be very useful for PvP battles too , especially for newbie players as they would get to know some standard tactics, tough veteran players might already have figured out a lot of it already .
I've actually just seen A.I. patterns and figured out the reason behind it , with enough data we can eventually reverse engineer exactly how the A.I. works , of course we can just ask the game devs but what's the fun in that ?
So in essence this is like a strategy guide too , so , let's get started .
I'll refer to the ' game A.I. ' as lai , (S) means ( Speculation ) i.e. not confirmed but it might be possible .
1 - Lai always , ALWAYS goes for the kill . If there is an enemy stack within the range of a melee unit , Lai would not hesitate to attack it , this has no exceptions as of yet that i have seen , if it's possible for Lai to attack an enemy , it would do that .
1.1-This fact is very useful in the way that it is possible to lure Lai away from important units, as long as you're willing to sacrifice another maybe less important unit .
2 - for melee attack , Lai would take usually take the shortest path
2.1 Unless there is a reason not to , for example if it attacks from right side then it would be within the attack range of another unit , then it would purposefully attack from the left so that other unit can't reach Lai .However if its not possible to avoide the range of the other unit , lai
will take the shortest path then . It might also take into consideration the next turn , i.e. attack 1 enemy so that on its next turn it's able to reach another enemy which is higher priority .
3 - for ranged attack , Lai would attack the highest priority target , (S) even if it is out of range and deals less damage .
3.1 - It is interesting to note that if within the movement range of bandits ( dark elf tier 1 ) Lai would use a melee attack instead of ranged , which makes more sense actually since it is basically a melee unit which can shoot but with lesser damage.
4- Like mentioned before , Lai has certain priority targets , if it is possible to attack multiple targets it would attack the highest priority one ,
4.1 -The criteria for that priority however , is unknown to me . Ranged units / shooters are generally on a high priority tough .
5- If lai is unable to attack in its turn , it would try its best to setup a position for its next turn . This is evident as Lai moves 1 block away from the range of the target, i.e. just out of range , provided that Lai has a higher speed of course .
5.1- It also moves away from the range of shooter units , something which newbies often ignore / are unaware about .
6- Casters .... caster units are a special case , its seemingly random weather they cast or move , even if the enemy is within range Lai could cast a spell but Lai could attack as well .
(S) However if the enemy is out of range , it will cast , unless its out of mana .
7- Lai has no concept of ' allies ' , its just a neutral creature to Lai . i.e. it is possible for Lai to obstruct its own troops . i.e. each creature moves independently . Lai would not harm its own ally creatures but that's it . (S) casters might cast a buff on the allies .
7.1 - You can also use this to your advantage if planned right , move within the range of unit1 but out of range for another unit2 and if that unit2 has no targets in range it would go towards your unit to setup for the next move , it would however then block unit1 as your unit which
was previously in range of unit1 is now just out of range because unit2 is blocking its movement effectively leaving your unit unharmed . Provided unit2 's turn comes before unit1 .
e.g.- https://www.lordswm.com/war.php?warid=824058463 ( a short hunt which is j | ( a short hunt which is just a demonstration of said example. )
Would Lai be able to beat newbie players ? Absolutely . It is aware of shooters and their range and moves just outside the movement range of units too . Would it be able to beat moderate / veteran players ? Probably not .
You might now understand how Lai works but that doesn't mean you would win every battle , actually even the quote i stated had this meaning originally, to flee when victory is not possible and attack when its guaranteed .
Nothing wins against absolute power , a level 2 just can't win against a level 6 , even if the level 6 doesn't move or attack just the retaliation strikes would finish off the level 2 .
It might not be a definite win even after knowing its strategy , however it does help .
Q. Why did I post this here and not on some military clan forum ?
A. Simple . I find it the most suitable place to post such stuff so that attention comes to it . And i'm just not affiliated with any clan either . You can feel free to offer me invitations , provided there are english speakers there .
Q. Why are some points speculations ?
A. Simple . It's just as it says , its a speculation , i.e. there isn't enough data to find any noticeable pattern there . I'm especially lacking details on casters as so are the limitations of my combat level that i rarely see casters which are A.I. .
Q . So , now , what benefit do i get for stating all this ?
A. Good question, actually ...... I don't know really . Maybe part of the reason could be the curiosity to get more data which i'm unable to get ? I might get better insight on it at a higher level but if i rush through levels i won't get enough funds to even properly equip myself , sure
you can be my sugar mama if you want to . Maybe another part is because i feel lonely ? I'm not entirely sure .
Hmm ... I put too much work into this , maybe i should backup this somewhere ...
Well , even if it does goes unnoticed i'll try not to wallow in sadness ... | Well its good observations, admins have been done good job lately by improving AIs.
Some examples are, like previously AI used to take maximum step as possible, now it takes step such that it is exactly reaching the creature which is target, or in a way that target won't be able to run.
Sometimes AI just block the shooter by standing aside without hitting.
But in some aspects AI still needs to be improved, for example on hitting veterans, AI takes many steps to hit ( lower steps are possible ), which leads to damage reduction because of fortification.
Also as a mage, whenever I click on auto-battle, AI uses buffs like rapid,bless instead of normal Lightning,fireball spells. Don't know why it has priority over them, which actually makes battle tough.. so I usually ignores auto-battle play as a mage.
Also regarding this,
1 - Lai always , ALWAYS goes for the kill . If there is an enemy stack within the range of a melee unit , Lai would not hesitate to attack it , this has no exceptions as of yet that i have seen , if it's possible for Lai to attack an enemy , it would do that .
Its not always true for me, if creature is less in stack it usually avoids hitting me. It can hit me, but moves away from me.. don't know if this happens because of I being mage or not.
One example battle - https://www.lordswm.com/war.php?warid=824004134<=-1
Look what 7 vermins did..
And these usually frequently happens.. logic behind this, I still can't figure out.
But anyways admins are constantly putting their effort to upgrade AI, last time when they upgraded AI with 1vs1 PvE combat event ( forgot name ), people were actually losing to AI having same troops as normal player, because of battle play.
So maybe you can expect more improvements on AI soon, or who knows tomorrow? with server's 10th anniversary. | Its not always true for me, if creature is less in stack it usually avoids hitting me. It can hit me, but moves away from me.. don't know if this happens because of I being mage or not.
yes. This has happened to me too.
Honestly, i think AI behavior is fluid because admins make adjustments to it. Some changes may be more noticeable than others. But i don't really believe we haven't had any AI improvement within the last 2 years even though it hasn't been explicitly noted. I can be wrong about this too. | That's a nice read through :)
About 1.:
Luring AI units works in 90% of cases.
But I've observed that even offensive AI builds don't take every decoy. For example in a hunt they sometimes prefer to move closer to a higher priority army instead of taking the lower priority decoy (e.g. they move to the elf player instead of attackin a tamed wyvern). | Oh right , i didn't mention auto battle A.I. , because in all honesty it feels like auto battle is actively trying to make you lose .
Units will go out of their way to move the maximum steps possible to attack veterans thus dealing least damage .
The lord character also doesn't really cast spells either and just waits , even tough it could attack .
That vermins thing is interesting tough , first time me seeing it as far as i remember , A.I. forgoing a chance to attack . Maybe it has something to do with the priority list , as if a target has high enough priority it would head towards it rather than attack .
Blocking shooters too , tough i can understand why , i.e. the unit would die if the shooter retaliates thus the unit won't attack therefore making the shooter waste a turn , however i don't remember it actually happening . Maybe i'll try to test it out sometime. | Hmm , I realize i've skipped something .
units which can lay traps / landmines will prioritize on doing that on its first turn .
The second turn may be an attack but the first turn is usually laying the trap or maybe casting a spell .
The first turn has some kind of special meaning maybe .
About developing better A.I. , while i can see it happening programming a concept like ' teamwork ' would be very. hard . Its kinda questionable even with how technologically developed we are right now , hell , even chess A.I. s aren't perfect , let alone this which is levels of magnitude more complex. | 1 - Lai always , ALWAYS goes for the kill . If there is an enemy stack within the range of a melee unit , Lai would not hesitate to attack it , this has no exceptions as of yet that i have seen , if it's possible for Lai to attack an enemy , it would do that .
1.1-This fact is very useful in the way that it is possible to lure Lai away from important units, as long as you're willing to sacrifice another maybe less important unit .
2 exceptions I have seen in this.
1. Lai will not attack if it's blocking enemy units to defend a shooter in the team.
2. If Enemy AI has enough mana and strong spells, lai will run and avoid any contact with your units, till he can use spells. | Its kinda questionable even with how technologically developed we are right now , hell , even chess A.I. s aren't perfect , let alone this which is levels of magnitude more complex.
It is not more complex than chess. I'm not sure how you mean that. The thing about current AI you can already see is that it often doesn't go for decoy but instead actually moves around and position better. Of course there are occasional suicidal moves that do not make sense in terms of consistency but in my opinion that just adds another layer of unpredictability. | 2 exceptions I have seen in this.
1. Lai will not attack if it's blocking enemy units to defend a shooter in the team.
2. If Enemy AI has enough mana and strong spells, lai will run and avoid any contact with your units, till he can use spells.
3. In vanguard battles, sometimes units ignore your stacks and go closer to the stack that you need to protect, even if it is in range of your stacks. | It is not more complex than chess. I'm not sure how you mean that.
I'm not talking about the individual movements . The individual movements of Lai can be quite ingenious indeed . But the overall teamwork matters too , and that part I believe would be harder to program / take into effect .
The reference to chess was for this - Is it possible to calculate all future permutations of a chessboard so that the A.I. can take the best step possible ? Of course , that is if you're willing to wait millions of billions of years that it takes to compute all that .
I suppose if i were able to edit point-1 i would change it to 95% instead of always and mention the exception cases, oh well i did state that i had yet to see any exception to that which was true at the time of writing it.
Lack of information is a sin indeed , or maybe not , can't blame everything on myself , i did mention my limitations too after all . | 1 - Lai always , ALWAYS goes for the kill . If there is an enemy stack within the range of a melee unit
Not true, many times the AI will try and block my shooters (conspirators battle) or attack me purely for retal (many battles). Wouldn't call it 95% by any means. Also doesn't really hold true for wizard troops, they tend to defend / wait / run away and wizard hero will hit you.
2 - for melee attack , Lai would take usually take the shortest path
Usually yes, though for some reason if facing veterans and AI has taken over my army (because I've basically one) the damn troops take the longest route possible.
(S) casters might cast a buff on the allies .
This happens very often.
Q. Why did I post this here and not on some military clan forum ?
This is the correct place to post this.
units which can lay traps / landmines will prioritize on doing that on its first turn .
Not from my experience, when I do TG the gremlins will usually shoot me in their first move and once I've blocked them, they will set up landmines.
Fairly good view points you have, though I hope you will learn more as you continue to play the game, experience other types of battles and level up :) | Regis, i'd say that your analysis was good on old AI patterns, however in the past years devs improved it and now it is working a little deeper than you think.
Mainly:
1) AI now thinks of several consecutive moves when it decides for an action. Although it does not seem to take into account your possible moves, it will calculate what IT will do next. This is one of the reasons why sometimes decoys won't work.
(Another reason is that the target HP are taken into account when making this calculation. Hence, if you try to decoy a stack with 1 gremlin, sometimes it won't come to you, if you use 2 dragon, it will definitely go for them).
2) AI take into account both maximum damage yeld AND received when it comes to make a choice. So, for example, if there are 2 stacks, and it can kill 50% of one and 60% of the other, it will calculate how much damage each can do as retaliation and how much damage each can do during next round. These values will be taken into account to chose which to hit. Units that already retaliated have a value = 0.
3) AI now takes into account retaliation. All other values (size, damage, etc..) equal, AI troops will hit one foe that has already retaliated over another.
4) When shooting or casting spells, AI uses:
.1) units that can make immediate damage (usually shooters, shrews)
.2)units with high INI;
.3) units with the highest STR/HP Vs damage_output rato;
The three groups of value will be used to define priorities, and adjusted with the value issued from the total damage reduction achieved by the action (killing 100 shooters will reduce damage taken more than killing 10 shrews, for example).
Remember that strenght is an unknown parameter.
also
units which can lay traps / landmines will prioritize on doing that on its first turn .
The second turn may be an attack but the first turn is usually laying the trap or maybe casting a spell .
The first turn has some kind of special meaning maybe .
Not exactly, the use of traps and mines dépends on the situation too, always according to the HP and damage output on both sides. If a gremlin stack can do significant damage to one of your stacks, it will shoot first round, if not, it will set a trap.
Goblins use traps if:
- they haven't one set on the map already,
- and they can't reach a target, or on a stack that could reach the opponent and may do significant damage, even if it can't reach anything in its range, in the case that their damage output on a target is significantly lower (always proportionally to HP) than the damage the will receive if hitting that target.
As far as I have seen, a unit never sets a second trap until the first one goes off, so if you escape the first, they will not set a second. On the other side, if all parameters remain the same, and you set off the 1st trap, the unit will set another on its next round.
Remember that gremlin's traps modify some parameters (your HP is reduced) so the calculation may change, and they may attack next as a result of that. |
This topic is long since last update and considered obsolete for further discussions. Back to topics list
|