Illogical AI: Troops often don't attack target from the closest side

This game is laggy

Dude, where's my village?
Joined
Apr 26, 2015
Messages
219
Normally we would expect that once your unit identifies a target and that target comes within range (with no obstruction like walls), the unit will attack it straightaway. However that is often not the case in this game. Sometimes the unit has a tendency to move to another position that is further away before attacking, even though the target is already within range in the current position.

I think the screenshots (click to enlarge) and videos below will do a better job of explaining this.

Part I: vs Enemy Defenders

Screenshot 1

HC does not attack from closest side.jpg

Instead of attacking from the nearest side which is the bottom right side, my cavalry decides to move all the way to the top left corner before attacking the cavalry defender.

Video 1

Link: https://www.youtube.com/watch?v=Q9VlD79E0Y0

Notice that around ~0:05, the cavalry is within range to attack the bottom right defender. But instead he moves in the upper-right direction, almost reaching the farm, before finally killing the defender.

Aside from that, this clip also shows another bug where melee units do ranged attacks.

Video 2

Link: https://www.youtube.com/watch?v=KZqeOOErJmw

Logically the cavalries should attack the defenders from the bottom left side since it's the closest side. But no, in reality they took the long journey to the top right side of the defenders. In this case, this actually resulted in the cavalries changing target from the tower on the left to the tower on the right due to their drastic change of position.

Video 3

Link: https://www.youtube.com/watch?v=Rai7XJkJBno

Look at the encounter between the cavalry and the defender. Instead of attacking the defender from the top left (the most straightforward and logical path), the cavalry takes an odd curved path to the top right before attacking. And from a non-melee distance too, if I might add. See also the thread about melee units carrying out ranged attacks.

Video 4-7

Links:
These 4 clips are taken from the same attack - I slowed them to 0.5x speed so the movement of units could be seen better. As in the other videos, the troops don't attack as soon as they get in melee range with the defenders. Instead they move past the defenders before turning around to attack.

Video 8

Link: https://www.youtube.com/watch?v=TIHyHvMdaS0

Instead of attacking the cavalry defender as soon as he is within reach, the 3 cavalries move past the defender before turning around to attack.

You can also clearly see that the cavalry defender was using ranged attack against the 3 cavalries.

Another thing that bothers me is that after killing the cavalry defender, the cavalries attack a new piece of wall instead of the half-destroyed wall that they were attacking earlier.

Video 9

Link: https://youtu.be/ocuU_wXMcVs

Aside from the ranged attacks, the cavalries also exhibit weird (and very inefficient) movement when engaging the cavalry defenders.
 

Attachments

  • HC does not attack from closest side.jpg
    HC does not attack from closest side.jpg
    47.1 KB · Views: 48
Last edited:

This game is laggy

Dude, where's my village?
Joined
Apr 26, 2015
Messages
219
Part II: vs Buildings

The larger the building is, the easier it is for this issue to manifest. This behavior is problematic because:
  • time is wasted as the units move to their desired position, giving more time for defenses to attack them and less time for the units themselves to destroy buildings or loot resources.
  • units get split up from their group
  • units might inadvertently get into the range of other defensive buildings.
  • units might inadvertently trigger traps that would otherwise not be triggered.
Video 1

Link: https://www.youtube.com/watch?v=n816s_ZKUGY

Instead of attacking the barracks when it's in melee range, the cavalry moves all the way to the far end of the barracks (near the fruit tree) before attacking, wasting precious time on unnecessary travel.

Video 2

Link: https://www.youtube.com/watch?v=mv7Y-6gX4DI

Instead of attacking the town center as soon as they move close enough, the cavalries spread out around the building before attacking. One of the cavalries spends 2-3 seconds moving to the top right side of the town center.

Video 3

Link: https://www.youtube.com/watch?v=jpr98_CFX_g

Pay attention in particular to how Cleopatra is moving here. She keeps moving to a further corner before attacking the buildings. You can also see a cavalry - partially hidden by the smoke but you can see his health bar - spending ~3 seconds to get to the top corner before attacking the Town Center when in fact he can already attack when he was at the middle of the top corner and right corner.

Video 4

Link: https://www.youtube.com/watch?v=rL-LILUdSx4

Instead of attacking from the side facing the ballista tower which is the closest side, some of the cavalries move to the side and even to the back of the ballista tower (effectively surrounding the ballista tower) before attacking it.

Video 5

Link: https://www.youtube.com/watch?v=S0eX8eGu14M

If the cavalries had all attacked from the side closest to where they were deployed, they would have stayed as a single group targeting the bottom tower after the Colosseum is destroyed. But due to their AI behavior of surrounding buildings, the cavalries end up splitting into 2 groups attacking different defensive buildings far away from each other. This split lowers the chances of their survival significantly.

Video 6

Link: https://www.youtube.com/watch?v=f0lT0zP2f88

After destroying the barracks, one of the two heavy infantries moves to the closest side of the Colosseum, but the other one moves all the way to a further side before attacking.
 
Last edited:

David Pasquinel

Approved user
Joined
Apr 5, 2015
Messages
192
Here's a +1 upvote for all the work collecting evidences. Hope that the devs roll a fast AI script rework.

What is ironic is that troop AI was already target of criticism because of some erratic behavior before, but the update broken it so much that in comparison, the former AI is a glory from the past. And what is even more ironic is that the unit pathfinding IS better now. Noticed it while I called mercenaries and they really chosen the shortest route from the Alliance Portal to their camp, instead of going around my entire wall formation like idiots, like they used to do.
 

Redgar

Banned
Joined
Apr 9, 2015
Messages
1,394
We must admit that the big part of our frustration comes from actual defense buff. If users'd continue to win, there'd be much less frustration. But now we have impression that it's all about AI and I clearly lost a couple of armies just because of AI bugs. But Healer become better. Archers have no sensitive changes (but they were quite bad before). hC become much worse. Soldiers become much worse, but it might be due to range too. All other bugs are minor, but in fact all key attacking units become weak. Even cannons become weaker, caz defensive HC is crazy. So alltogether it become a mess, they should fix asap.
 

finger

Approved user
Joined
Apr 27, 2015
Messages
117
I have noticed my heavy horse and infantry will backpedal about 2 squares whenever they initially engage a defender. While they are doing this they are still being attacked by the defender plus god knows what else towers, catapults, etc. The troop dies without damaging the defender it originally engaged. This doesn't happen all the time but you see it happen more with mass infantry probably 15% of the time?
 

This game is laggy

Dude, where's my village?
Joined
Apr 26, 2015
Messages
219
@finger Yeah. I think the backpedalling has to do with the strange ranged attack by melee units. The thing with the melee unit's ranged attack is that there seems to be a minimum distance (like catapult), so sometimes your units will backpedal to try to get beyond that minimum distance. That's my current theory anyway.

In any case, I have a thread about that here: https://forum.nexonm.com/forum/nexo...an-has-gained-the-ability-to-do-ranged-attack

p/s: I wish I could change the topic of that thread to "Melee unit doing ranged attacks" since it's not just pikemen exhibiting this behavior.
 

finger

Approved user
Joined
Apr 27, 2015
Messages
117
I just watched one of my defense replays where about 5v5 of heavy horse were attacking with a few infantry here and there. The strangest part is they were spaced out (again about 2 squares) evenly not really facing anything and making attack animations and I could see health bars depleting from distances of 4-6 squares.

I don't know if this is a graphical bug and the units are actually behaving normally or what.

All I know is it gave me a headache to watch!
 
Top