Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Is there a standard name for the (fairly dumb) AI that most MMOs use where you 'aggro' a monster/mob when you are within a certain radius of it, and the monster chases your character for a set amount of time or distance when you attempt to run away?

share|improve this question
add comment

6 Answers

up vote 9 down vote accepted

I think everyone is on the ball with the name "aggro," however it's probably emergent behavior (side-effects from simple rule systems, e.g. Boids). I would think it would most probably be achieved using a weighted decision tree. To give you an example of why this system would have interesting results consider this:

    Start
      |
Player threat (based on player level, distance, DPS, etc.)
Very High  High   Low
|          |      |
Flee       Fight  Pass

This decision would then be executed for each player and mob sub-group (Cartesian product) in the vicinity. The entire mob would then follow a decision tree like:

    Start
      |
Combined results
More flee  More fight                    All pass
|          |                             |
Flee       Attack own fight result;      Attack individuals
           otherwise, attack the player
           with most fight results.
  • The mob sees an approaching group of players; and starts moving toward them to attack (threat is low because distance is high). When they get closer the threat becomes too much and they run (i.e. they realize they have bitten off more than they can chew).
  • If the players level are low, say one player was given a very high level item and the mob proceeds to attack them. Suddenly one player outputs crazy DPS and the mob flees.
  • If one player is more threatening most of the mob will focus on him (thus your classical aggro mechanics).
  • A team of players takes on a group that they shouldn't be. The mob focuses on individual players to give them a fighting chance; and if they can't defeat the mob a few might be able to run themselves.

The point here is that a very elegant, but predictable, system was built up using two very simple decision trees.

side note: Some of the results required mean that re-evaluation should not occur for a specific time limit (e.g. Flee should be applied as a 20s 'Scared' debuff); otherwise you would get very strange outcomes (e.g. infinite flee-attack feedback).

share|improve this answer
add comment

Guild Wars just calls it "Aggro", or at least that's what the algorithm's main variable is called, I suppose.

I also found a neat take on it, in the form of a blog post: "Coma AI". I like how the author relates AI complexity to coma levels. So by this definition, it could be called "Coma level 4":

Level 4 (Confused and agitated) is the standard AGGRO AI. You encounter any creature in Final Fantasy? It will attack you no matter who you are. Even games with advanced AI like Fallout 3 have them. Wandering through the Wastelands, People and Animals will attack me for no apparent reason. There is no way you can talk them out of it. I’m reminded of the epic “I want to heal the wolves” Escapist Article.

But that's obviously not quite what you're looking for.

Unfortunately I've never heard of any official name for it, but I'm not an AI expert by any means. All I know is that I most commonly see it spelled "aggro", which is of course short for "aggressive", which has two g's, not one like you spelled it.

share|improve this answer
    
You're right, I've got the misspelling by osmosis: reading it misspelt in chat channels so often (a bit like the word imba) I've started using that version. One of the stupidest parts of the AI as you mentioned is you can be a level 5000 and ride over the level 10 and he'll attack. –  Chris S Aug 10 '10 at 20:41
    
Many game reference it as "Threat" so that may help your search for the standard algorithm (if one even exists). –  Chris Ridenour Aug 10 '10 at 20:41
1  
"Hate" is also a vaguely standard term. –  coderanger Aug 10 '10 at 20:51
    
"you can be a level 5000 and ride over the level 10 and he'll attack", this is not true in WoW. The radius of the threat decreases the bigger the level gap between you and the mob. –  Adam Harte Aug 10 '10 at 21:30
    
@TandemAdam from what I can remember, you can still ride over a level 10 monster in WoW (and be the highest level) and most will attack. It would be nice if it ran in fear –  Chris S Aug 11 '10 at 12:53
add comment

In addition to "aggro" modeling mentioned by Ricket, another common AI state is "leashing". If an NPC gets too far from its spawn point it moves back there and rapidly heals to full. This is to prevent excessive kiting.

share|improve this answer
add comment

It has no real name. It's not any sort of 'accepted' algorithm. It's just cheap and easy to implement as a trivial state machine. If enemy is idle and player is close enough then switch enemy to aggressive. MMOs just continue to use it because it's easy to work with.

share|improve this answer
add comment

AI in MMOs are pretty ignorant. You're dealing with a world where you have the potential to reach millions of players all of varying skill. If AI in MMOs were really present you would see creatures constantly rush attack your healers, then go after the cloth wearers, etc. But we don't see that. We see a system that gives a mob x health and an attack rating depending on it's level, and a faction that it falls under (which makes it attack people whose faction differs). They run (sometimes) when health < y, and might trigger more mobs to help if condition x is met. The system might do a DX roll to see if the attack/spell hits or not, and goes from there. If one player is attacking a lot (raising threat), creatures turn to that player. So this system is very, very basic. There's not a way for a casual player to flip a 'casual' switch.

From there we do get into some 'advanced' encounters that appeal to the hard-core crowd. But even these are not fully automated by AI -- they're scripted events. Once a high level guild takes a week and figures out how to kill the King of Dreams, then they can pass the encounter details to casual players.

I remember back in EverQuest that you could start a conversation with NPCs and you could trigger different actions by saying certain things! Some linguistic AI.

share|improve this answer
add comment

The first version of this I ever saw was in the ancient roguelike game Moria. Each monster species has a parameter aaf, meaning area-of-affect. If you're outside the monster's aaf, it doesn't move at all.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.