World of Warcraft Math

76

By mathsciguy

See all 3 photos

A Brief Introduction

Most people are familiar with the popular MMORPG World of Warcraft, developed by Blizzard Entertainment in 2004.  Unfortunately, though subscription to World of Warcraft has risen since then to over 6 million players, this still accounts for just under 2 percent of the US population.  And, being a subscriber seems to hold some negative connotation to a fair portion of the remaining 98%.  Nothing in this article is going to change that.  But I hope that both 2 percenters and 98 percenters can enjoy the information that will be presented, and perhaps even learn a little bit about mathematics on the side too!

Modeling Battlegrounds

Nations have long been fascinated by the turmoils of war. Like an ever-changing current, the tides of battle are unpredictable and fluid, effected by dozens of variables. For this reason, a great amount of human brain-power has been dedicated throughout history to the understanding of what tips the scales in the favor of one army instead of another. From the Indian Chanakya to China's Sun Tzu to Carl von Clausewitz, writers from all cultures have analyzed the outcomes of war and what makes the winner win.

One small example of the product returned by this intellectual investment is the Lanchester equations, or Lanchester's Laws.  These differential equations developed by Frederick Lanchester (who also co-developed the field of operations research, used by the Allied militaries during WWII) to describe the casualty levels of opposing military forces with respect to elapsed time in battle.  The original equations are rather simple and, though well suited to modeling volleys of fire returned between two entrenched enemies, do not translate well by themselves to modeling a more complex battleground.  A battleground such as, say, those encountered in World of Warcraft.

Now, the reader is surely thinking "my god, he can't be serious - a video game? World of Warcraft, no less!"  To the reader I say, read on. 

This is what we intend to model - fun stuff!!

Revising Lanchester's Laws - From Start to Finish


Let us begin our analysis of BG (Battleground) combat with a look at the original Lanchester equations.  These models were designed primarily to describe aerial combat, but work for ground units as well.  The idea is that if two opposing forces (Horde and Alliance, the enemy factions in World of Warcraft, in our case) clash, then for every unit increase in time each group's total number of soldiers is depleted by an amount dependent upon the other side's numbers (which we will call A and H ) and skill (which we will call a and h ).  The equations then look like this:

dA / dt = -hH     and    dH / dt = -aA

Now, if you find yourself confused, don't be!  Gloss over the equation - just understand that in order to find out how many Alliance or Horde get slaughtered every t minutes or hours or days, we multiply the number of the other side times their "skill value."  (The skill value is an abstract concept - just think "the higher the number, the better they are").  Now, some manipulation of the differential equations gives us this nifty result:

aA2 - hH2 = constant

This equation tells us who wins the battle by checking if the constant turns out positive or negative.  For example, let's say that the Alliance and Horde are equally matched in skill, but the Horde has 13 soldiers in an Alterac Valley battleground while the Alliance has 15.  In this case, we can say arbitrarily that both a and h are 1 - as long as the two are the same, since they represent skill.  Then, A = 15 and H = 13 .  So,

(1 * 225) - (1 * 169) = 56 > 0

All this says is that after subtracting the toll inflicted by Horde strength, the Alliance retains units thereby winning the conflict.  In the case of a negative number, the remaining forces are simply attributed to the other side.  A zero, of course, means a draw.

Modifying the Model

Obviously, the Lanchester equations do not fit very well to World of Warcraft combat.  One of the primary reasons for this is the required assumption that all units operate the same way and with roughly the same ability in a straight-out melee frenzy.  This is generally true for aerial combat for which the model was originally designed.  But let's make some changes to reflect the diversity of the World of Warcraft, shall we?

For simplicity's sake, we will limit classification of unit types to the main roles of Healing, DPS (Damage Per Second, lightweight but hard-hitting units), Crowd Control, and Tanking.  For the Warcraft-literate, these terms will make good sense.  For the not-Warcraft-literate, I suggest using Google to look them up for a moment.  Now, we have already thrown Lanchester's assumption out the window because not all of our types will even contribute significantly to damaging enemy numbers.  Our next step is to determine the effect on our relevant variables A and H that each classification will have. 

  • Healing - Will reduce the impact of enemy attacks on the overall force
  • DPS - Will reduce the size of enemy forces, but will be more susceptible to reduction by enemy attacks
  • Crowd Control - Will reduce the effectiveness of enemy numbers against their faction
  • Tanking - Will directly reduce overall enemy damage output (enemy damage is "absorbed" by tanks, reducing the raw number of kills made with the same amount of damage output)

Having determined the roles of our variables, we will now name them HA, HH, DA, DH, CA, CH, TA, TH.  The first letter denotes the classification, while the subscript denotes the alignment.

Including the New Variables

With our newly described variables at hand, we now proceed to actually implementing them in a useful combat model.  To do this, we will take a class-by-class approach.  Let us begin with Healing: we have determined that the effect of this class should be to reduce the effect of enemy damage to their faction.  To show this mathematically, we add into the equations:

dA/dt = -hH + hHH    and    dH/dt = -aA + aHA

Note that our "skill variables", h and a are used in both terms of the new equations.  This means that, for simplicity's sake, we are assuming the skill level to be constant among units of the same faction.  Also, we included the Healing class as a separate term since the effect of damage mitigation is not dependent upon enemy strength.  So, we now have that the strength of a given faction per unit of time is the number of inflicted casualties by the opposite side balanced by the number of lives saved by healing classes.

Now, we already have the DPS included in our equations as the damage dealing factor, but have not accounted for their higher fragility.  This means that we need to modify the equations to slightly increase casualties proportionally to the number of DPS.  After all, an army of warlocks will deal a lot of damage in a battle, but will also likely take massive casualties.  Therefore, we now have:

dA/dt = -hDH + hHH - (f - a)DA     and    dH/dt = -aDA + aHA - (f - h)DH

We have substituted the damage dealing factor in the Lanchester equation for our DPS variable DH and DAAdditionally, we have subtracted from our total strength per unit time an amount proportional to that faction's number of DPS.  The rate of proportionality is f, a variable to denote the frailty of DPS classes, minus the faction's "skill variable."  This means that we set a constant value for the fact that DPS are more susceptible to dying, and then subtract from that the faction skill which should reduce this effect.  More skilled DPS are better at not dying.  Right?  Right.  Moving on to Crowd Control.


The effect of crowd control is to typically reduce the operating capacity of enemy units. Therefore, I think it is safe to say that effective crowd control should have an inverse effect on the enemy faction's skill variable. In other words, better crowd control reduces the enemy's general effectiveness. So:

dA/dt = -(h/CA)DH + (h/CA)HH - (f - (a/CH))DA      and

dH/dt = -(a/CH)DA + (a/CH)HA - (f - (h/CA))DH

What we have done now is simply to divide every instance of a faction's skill variable by the opposite side's Crowd Control variable. It makes the equation look a lot more complicated, but is really quite a straightforward change, in my opinion. Anyhow, last-but-not-least, we will include tanking, which directly reduces casualties caused by enemy DPS:

dA/dt = -(h/CA)(DH / TA) + (h/CA)HH - (f - (a/CH))DA      and

dH/dt = -(a/CH)(DA / TH) + (a/CH)HA - (f - (h/CA))DH

This change is fairly simple, too, since we just divide casualties caused by enemy DPS by the Tanking of that faction in each equation.  Note that this is similar to the Crowd Control effect, which adversely effected combat skill of the enemy.  Now, we have our differential equations - only one more step to go!

Finish It!

As you may recall, the Lanchester differential equations are not what we actually use to determine who wins. In order to make a really useful formula out of the equations, we have to do some further work to it. In the interest of space and understandable-ness, I will forgo detailed explanation of the calculation and simply reveal the formula:

-H(h/CA)(DH / TA) + H(h/CA)HH - H(f - (a/CH))DA + A(a/CH)(DA / TH) - A(a/CH)HA + A(f - (h/CA))DH = constant

This formula works exactly the same way as the original Lanchester equation, but is adapted to fit a brawl between the Alliance and Horde. 

To Be Continued

Now, we have developed a model to predict the outcome of, say, an attack on Goldshire - but remember that we made some assumptions which limit the ability of our model.  For instance, we have assumed that all combatants on a side are of equal skill - if not equal level.  And the model can only determine a winner in a battle of attrition - an all-out deathmatch.  But, keep an eye out for part two in which we will continue with an analysis of Warsong Gulch's capture-the-flag scenario!  And whether you like to dance the Macarena and wield a giant hammer to slay Orcs or enjoy storming Stormwind, you'll have this handy formula to use whenever you want to roughly predict the outcome of a scrap.  So, until next time and - For Gnomeregan!

Comments

Nicole Winter profile image

Nicole Winter Level 3 Commenter 13 months ago

This is phenomenal, excellent hub, mathsciguy! I hope you don't mind, but I'm going to link to this on my WOW pages. I really like the video for the hub, too, do you have your own You Tube channel?

mathsciguy profile image

mathsciguy Hub Author 13 months ago

Alas, the video is not mine - and I do not have my own Youtube channel. But, perhaps that could be the second time you have inspired me, Winter! Although I'm admittedly a much better writer than videographer.

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    • No HTML is allowed in comments, but URLs will be hyperlinked
    • Comments are not for promoting your Hubs or other sites

    Please wait working