Enemy AI: Slow vs Immobilize


Ben_Arizona

 

Posted

I have an AI question. I know in theory an Immobilize is better than a Slow, because Immob stops enemies from moving completely. However, in practice enemy AI appears to treat Slow and Immob differently. Enemies with melee and ranged powers who get immob'ed seem to immediately switch to ranged powers. Slowed enemies appear to still try to chase you down. I have no objective proof of that this is how it works, but has anyone else noticed this? I especially see it on my Ice Controllers, but I could be misinterpreting. I think it has some important implications to the Slow vs Immob debate.


 

Posted

One thing that may be interfering with your observations on your Ice characters is that Ice slows apply both -speed and -recharge. -Recharge definitely affects the critter's reactions, because they've got a limited number of powers to use, and -recharge will give them long pauses with no powers to throw at you. (Or depending on the critter, all they can use is a 'Brawl' equivalent, and so they're forced to chase you)


http://www.fimfiction.net/story/36641/My-Little-Exalt

 

Posted

Quote:
Originally Posted by Oedipus_Tex View Post
I have an AI question. I know in theory an Immobilize is better than a Slow, because Immob stops enemies from moving completely. However, in practice enemy AI appears to treat Slow and Immob differently. Enemies with melee and ranged powers who get immob'ed seem to immediately switch to ranged powers. Slowed enemies appear to still try to chase you down. I have no objective proof of that this is how it works, but has anyone else noticed this? I especially see it on my Ice Controllers, but I could be misinterpreting. I think it has some important implications to the Slow vs Immob debate.
This relates to something I've seen with a few characters, not just with slows. The observation I've made, such as it is, is that the enemy AI is very good at determining a path to your character, even a non-obvious one, but not very good at determining whether taking that path is a good idea.

As far as I can tell, a typical enemy with a mix of attacks (such as your average Hellion with a baseball bat and a pistol, or a Mek Man with energy blasts and energy-melee attacks, or etc.) will have three attack "modes", which I call ranged, approach, and melee.

If an enemy sees that it has no path to you, it will go into ranged mode. It will use only ranged attacks and may or may not run around a bit in between them. Ranged mode is also used by enemies immobilized out of melee range. This is sensible programming, because, well, ranged attacks are all that'll work.

If an enemy sees that it has a path to you, but it is out of melee range, it will go into approach mode and try to get into melee range. In approach mode, the enemy will use its ranged attacks occasionally but much less often than in ranged mode - presumably this is to make it more "persistent" against players who try to run away (since while it's in its firing animation, it's not chasing you), while at the same time still attacking so as to at least wing them while they run.

If an enemy is in melee range, it goes into melee mode. It will prefer its melee attacks while in melee mode, but will not use them exclusively. Not much to say here. Since the majority of enemies have better melee than ranged combat, they will try to get in with approach so that they can switch to the more effective melee.


Now, what's interesting here is that approach mode is actually much safer for the player than ranged or melee. The problem is that, under normal circumstances, approach mode doesn't last very long before melee range is reached. Slows will help, but you need to run around a lot to keep them at that range, which means you're not attacking. Basically, I've seen two ways to consistently keep an enemy in approach mode. The first is knockback/repel. I honestly think that approach mode does as for an energy blaster's survival as the actual knockdown time, and a stormy running Hurricane is much safer on the ground than hovering out of reach - if you hover, enemies go into ranged mode and pelt you with bullets and boulders, while on the ground they'll keep seeing a path to you, try to take it, get repelled, and stay in approach mode the whole time with attacks being sparse. (The to-hit debuff helps too, of course. )

The other way I've seen is avoidance patches - caltrops are the star for me here, with long duration, fast recharge, a slowing component and quick animation. If you place them right, enemies can spend a long time running a few steps onto the caltrops, realizing their feet hurt, turning back, running away, realizing they want to kill you, and running back onto the caltrops to repeat the process. The entire time they are in approach mode, and will fire on you relatively slowly even though there is no -rech component to caltrops. If you hover up out of range, this process breaks as they switch to ranged mode and fire on you much more often.


So, tl;dr version: Yes, as far as I can tell a slow reduces the number of incoming attacks more than an immob does for as long as the enemy retains a perceived path of approach and does not reach melee range. However, with a few exceptions this is difficult to properly leverage; an immobed enemy will stay immobed pretty much as long as you feel like, while a slowed enemy will still reach melee range unless you stop attacking to run away.


 

Posted

Quote:
Originally Posted by Ben_Arizona View Post
So, tl;dr version: Yes, as far as I can tell a slow reduces the number of incoming attacks more than an immob does for as long as the enemy retains a perceived path of approach and does not reach melee range. However, with a few exceptions this is difficult to properly leverage; an immobed enemy will stay immobed pretty much as long as you feel like, while a slowed enemy will still reach melee range unless you stop attacking to run away.
I did read that an as far as i know thats parity much how it works, Slow>Immob for incoming dmg decrease yet Immob > Slows for Control and escape.

Any time you can cause the Ai to try and run affter you will make them attack less, They have a one track mind) Run-stop-shot-run, repeat were as if they stand still its just shot-recharge-shot repeat if you have high -rech immob will be just as effective at this but since most slows alsp have - rech and slow effect from a dmg mitigation front Slows are better, for a keep them there so we can rip them apart with aoe stand point immob is better


There is but one truth. Time is limited. ndnw its over

 

Posted

Interesting observations.

I'm not sure that "approach" is really a separate mode. What it feels like is enemies in "melee" mode will use whatever is at their disposal if they are moving toward you but haven't quite closed to range yet. They definitely stand up from knockback sometimes and shoot immediately.

Back when I was dealing with game programming regularly, the formula that was used for AI movement was called A* (pronounced A star). The way that formula works, the game AI calculate routes by determining the cost of the available paths, with each node it passes through given varying weights. It also traditionally thinks about how long it will take to move through the node in relation to the benefit (e.g. the value of using 2 vs 4 seconds in order to close with an enemy). For example, in a strategy game, moving an army through a lava patch may be riskier, so the AI de-emphasizes that option in the formula without totally ruling it out.

What I suspect is that the AI doesn't consider its movement speed when running toward you. When immob'ed it sees immediately that it can't close with you, so it won't even try, but when slowed doesn't take into account the extra risk. The AI also definitely does not consider pulsing AoEs in its assessment, which gives rise to its willingness to run straight onto an Ice Slick.

There's a tutorial on A* here: http://www.policyalmanac.org/games/aStarTutorial.htm

[Edit: Some minor terminology issues for clarity.]


 

Posted

I think that in this discussion it's worth mentioning the effect "Afraid". This is a separate effect from the "Terrorized" effect produced by fear powers, and instead causes an entity to flee from where it is standing. Most enemy mobs are not immune to Afraid, and many patch-laying powers create Afraid. For instance, Caltrops mitigates incoming damage with its Slow effect, due to the AI issues discussed above. But it also applies an Afraid effect, which causes enemies to try to leave the caltrops even if they are not being slowed or taking significant damage. This is why Caltrops has a significant mitigation effect even against enemies such as Slag Golems and War Wolves, who are not affected by Slow effects: the enemies can cross the caltrop patch quickly, but once they are on it, they will quickly leave - and continue running for a few seconds, until the Afraid effect wears off.

Afraid is also why Demolitionist and Longbow Flamethrower Burn Patches make MM pets go nuts.


@SPTrashcan
Avatar by Toxic_Shia
Why MA ratings should be changed from stars to "like" or "dislike"
A better algorithm for ordering MA arcs

 

Posted

Quote:
Originally Posted by Oedipus_Tex View Post
Interesting observations.

I'm not sure that "approach" is really a separate mode. What it feels like is enemies in "melee" mode will use whatever is at their disposal if they are moving toward you but haven't quite closed to range yet. They definitely stand up from knockback sometimes and shoot immediately.
You can really confuse the CoX AI by moving in and out of melee range during a fight. Even when powers are recharged, sometimes the AI will have the melee power queued up and won't try to swap to the ranged attack if you were just recently in melee range and are still close, but not quite in melee now.

You can also see them get pathing issues if you circle-pause-circle-pause-circle while fighting a group of three. One inevitably tries to circle left, no no right, no left, wait I'll just stand here... Left! hah punch! Whereas if you were standing still it would have attacked you three times in that period.

When you stack slow/immob on top of you staying mobile, the AI is really at a disadvantage unless it has a massive preference for ranged attacks (rikti drones for example).


"Hmm, I guess I'm not as omniscient as I thought" -Gavin Runeblade.
I can be found, outside of paragon city here.
Thank you everyone at Paragon and on Virtue. When the lights go out in November, you'll find me on Razor Bunny.

 

Posted

Quote:
Originally Posted by Oedipus_Tex View Post
Interesting observations.

I'm not sure that "approach" is really a separate mode. What it feels like is enemies in "melee" mode will use whatever is at their disposal if they are moving toward you but haven't quite closed to range yet. They definitely stand up from knockback sometimes and shoot immediately.

Back when I was dealing with game programming regularly, the formula that was used for AI movement was called A* (pronounced A star). The way that formula works, the game AI calculate routes by determining the cost of the available paths, with each node it passes through given varying weights. It also traditionally thinks about how long it will take to move through the node in relation to the benefit (e.g. the value of using 2 vs 4 seconds in order to close with an enemy). For example, in a strategy game, moving an army through a lava patch may be riskier, so the AI de-emphasizes that option in the formula without totally ruling it out.

What I suspect is that the AI doesn't consider its movement speed when running toward you. When immob'ed it sees immediately that it can't close with you, so it won't even try, but when slowed doesn't take into account the extra risk. The AI also definitely does not consider pulsing AoEs in its assessment, which gives rise to its willingness to run straight onto an Ice Slick.

There's a tutorial on A* here: http://www.policyalmanac.org/games/aStarTutorial.htm

[Edit: Some minor terminology issues for clarity.]
It may not actually be a separate AI mode, but at the least it's a state that's important to distinguish for these purposes, so calling it "approach" seemed as good as anything. That is some interesting insight into how this might work, though. It certainly doesn't seem to consider its movement speed in this decision: if there's a path, the AI will take it as far as I can tell (although with multiple paths it can get strange about how it decides to approach for reasons I can't fathom). I've also never seen it take player-made hazards into account, although I believe I've seen it run around or over in-map lava - if it gets around a player terrain hazard, it's by running onto it, avoidance triggering, running back off it at an angle, and so on until it's around the avoidance patch. (Or, in some cases, running right through if it's made it to somewhere that the shortest shot to the edge of the patch is on your side of it. This is one reason Caltrops works so well.)

@SpittingTrashcan: That's the kind of effect I was referring to with an "avoidance patch", yeah. I'm aware of the "afraid" terminology, but since fear is used almost universally to refer to Terrorize in CoH I've tended towards a less ambiguous term (in my opinion, anyway).


 

Posted

Quote:
Originally Posted by Ben_Arizona View Post
@SpittingTrashcan: That's the kind of effect I was referring to with an "avoidance patch", yeah. I'm aware of the "afraid" terminology, but since fear is used almost universally to refer to Terrorize in CoH I've tended towards a less ambiguous term (in my opinion, anyway).
The reason I mentioned the "Afraid" status is twofold. First, that's the name of the effect when you look up powers in City of Data, so it's good to know the difference between this and "Terrorized". Second, and more importantly, Afraid is not an inherent property of all debuff or damage patches. Enemies aren't reacting to the debuff or damage when they flee a patch; they are reacting to the Afraid status being placed on them, and if it wasn't there they'd happily wander onto them and stay there. Some entities are immune to "Afraid": for example, a number of Controller pets are, and so they will continue to fight from a debuff or damage patch without trying to move away. Some things that are not patches grant "Afraid": Ice Control.Arctic Air has a chance to grant "Afraid" on each pulse, and Storm Summoning.Tornado has an "Afraid" granting aura. Also, some patches have had "Afraid" added or removed from time to time. Notably, Fiery Aura.Burn did not always grant "Afraid", and as a result it was less useful for mitigation, but much more powerful as a damage tool.

The reason why I felt it's important to explicitly mention "Afraid" is that it's the cause of a lot of enemy (and ally) behaviors that are often attributed to other sources. Entities react to "Afraid" in a specific way that's important to take into account when discussing general entity AI.

More on topic: I agree that the enemy AI does switch between seeking to enter melee range and firing from ranged, and that they recognize when entering melee is impossible, but not when it is difficult. It's also the case that enemies have different levels of interest in entering melee range in the first place. Some time ago, when discussing Mastermind minion AI, Castle made remarks to the effect that pets can be made to behave in one of two ways with respect to approaching enemies they are set on attacking: either they can prefer to approach to the range of their longest-range power, or to the range of their shortest-range power (ask Mercs MMs about the two-fisted Medic...). I believe NPC enemies can be assigned one of these tendencies as well, and may switch between them as conditions change.


@SPTrashcan
Avatar by Toxic_Shia
Why MA ratings should be changed from stars to "like" or "dislike"
A better algorithm for ordering MA arcs

 

Posted

fun fact. In the good old days, fear *was* afraid, and there was no such thing as terrorize.

People complained that mobs would run halfway through a level and needed to be chased.

Also, people used to ride horses, and wear old-timey monocles and tophats.


 

Posted

Quote:
Originally Posted by SpittingTrashcan View Post
The reason I mentioned the "Afraid" status is twofold. First, that's the name of the effect when you look up powers in City of Data, so it's good to know the difference between this and "Terrorized". Second, and more importantly, Afraid is not an inherent property of all debuff or damage patches. Enemies aren't reacting to the debuff or damage when they flee a patch; they are reacting to the Afraid status being placed on them, and if it wasn't there they'd happily wander onto them and stay there. Some entities are immune to "Afraid": for example, a number of Controller pets are, and so they will continue to fight from a debuff or damage patch without trying to move away. Some things that are not patches grant "Afraid": Ice Control.Arctic Air has a chance to grant "Afraid" on each pulse, and Storm Summoning.Tornado has an "Afraid" granting aura. Also, some patches have had "Afraid" added or removed from time to time. Notably, Fiery Aura.Burn did not always grant "Afraid", and as a result it was less useful for mitigation, but much more powerful as a damage tool.

The reason why I felt it's important to explicitly mention "Afraid" is that it's the cause of a lot of enemy (and ally) behaviors that are often attributed to other sources. Entities react to "Afraid" in a specific way that's important to take into account when discussing general entity AI.

More on topic: I agree that the enemy AI does switch between seeking to enter melee range and firing from ranged, and that they recognize when entering melee is impossible, but not when it is difficult. It's also the case that enemies have different levels of interest in entering melee range in the first place. Some time ago, when discussing Mastermind minion AI, Castle made remarks to the effect that pets can be made to behave in one of two ways with respect to approaching enemies they are set on attacking: either they can prefer to approach to the range of their longest-range power, or to the range of their shortest-range power (ask Mercs MMs about the two-fisted Medic...). I believe NPC enemies can be assigned one of these tendencies as well, and may switch between them as conditions change.
Right. I was referring to it as "avoidance" because I was pretty sure that calling it "afraid" would get people rambling on about how fear doesn't work that way. It's going to be a problem one way or another, and at least with "avoidance" you know which one I'm talking about.

That's an interesting note about AI behavior with regard to ranges, and would make sense. I suspect that for most enemies there's no significant difference between "switches between approach-to-longest-range and approach-to-shortest range" and "switches between ranged and melee"; it should only really matter for enemies who have some attacks that fall into a middle range, which I don't think many enemies do.


 

Posted

The AI has been updated its very funny once you play a Arachonos soldier put enough defense debuff on a boss , they start running away like its darknest night on them

And whats with those escape missions , Boss starts running away once they spotted you instead of waiting for half health or trying to beat the crap out of you .

They now run at full health >.<


 

Posted

Quote:
Originally Posted by TheMightyStorm View Post
fun fact. In the good old days, fear *was* afraid, and there was no such thing as terrorize.

People complained that mobs would run halfway through a level and needed to be chased.

Also, people used to ride horses, and wear old-timey monocles and tophats.
You obviously need to spend more time in the Marketing Forum. Monocles and Tophats are part of our uniform.


"Hmm, I guess I'm not as omniscient as I thought" -Gavin Runeblade.
I can be found, outside of paragon city here.
Thank you everyone at Paragon and on Virtue. When the lights go out in November, you'll find me on Razor Bunny.