Friday, July 17, 2015

What is the name of the AI/algorithm used by most MMOs for monsters or mobs?


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?



Answer



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).


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...