Wednesday, September 5, 2007

Spike theory

Every so often, I get to use something I learnt at university. Rarely on work, but it's still cool. This time, it relates to WoW, which makes it doubleplus cool. In my world.

Top-end combat in WoW consists of a tank, some healers and some DPS (damagers). An important constraint on the DPS is to do less "threat" than the tank. This is usually okay, a good tank will on average deal more threat than the DPS. However, critical hits and crit chains (several crits in a row) increase short-term threat considerably. If this "threat spike" pushes the DPSer over the tank's threat, they usually die. So the size and frequency of one's spikes is of key interest.

Returning to school, queuing theory helps predict how long the queue at a checkout will be. It assumes a server who deals with customers at a steady pace and customers who arrive in a Poisson distribution. Can you see the connection yet?

If we pretend crits are the customers, and the server deals with crits at the effective crit rate, then we can see how long the queue is likely to get. That is, how many unexpected crits are likely to happen in a short time frame. It is possible, of course, for every single attack to crit over a 10 minute period despite only a 1% crit rate - however this is incredibly unlikely!

Using the Poisson distribution we can convert from the effective crit rate into an expected number of crits per second. From that we can determine the longest queue with a probability of, say, 5% or more, over the time it takes for a normal fight (3-10min). By moderating our damage to ensure the tank always has enough threat to handle a crit chain of this length, we can guarantee we stay under zir threat 95% of the time.

Exercises: what crit rate is the spikiest? A high crit rate means 'customers' arrive very fast, but the 'server' will also deal with them very quickly. That is, a lot of crits are expected, so they are less surprising.

Crits vary in size. A basic crit from a magic-user is 50% of the spell's total damage. However, talents can increase this to 125% for some spells. Given the total base damage and the total amount of additional damage done by crits, produce a strict ordering of character builds by spikiness.

1 comment:

fud said...

Nice summary. :)
Now get working on some equations, minion!