My name is Alexis Lee. I like simplifying problems, Buddhism, co-op games and making terrible art.
Thursday, September 13, 2007
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.
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.
Friday, August 17, 2007
XKCD
"Note: I don't use submitted comic ideas and I have already heard about every company making human hamster balls." - xkcd
le sigh. I want an XKCD poster like this:
Man: "We ran your code and it nuked Russia. WTF?"
Black hat: "Agile!"
le sigh. I want an XKCD poster like this:
Man: "We ran your code and it nuked Russia. WTF?"
Black hat: "Agile!"
Tuesday, August 14, 2007
Ruby ruby ruby ruby!
Ruby links
http://jicksta.com/articles/2007/08/04/the-methodphitamine
http://codeaspects.com/ruleby/articles/news/2007/04/30/ruleby-a-pure-ruby-rule-engine
WowSim is doing well. Buffs/debuffs are looking good, reports are generated and ability modifiers are sorted. Still a LOT to do, but the class diagram seems reasonably settled now. Looking forward to getting more maths in there.
http://jicksta.com/articles/2007/08/04/the-methodphitamine
http://codeaspects.com/ruleby/articles/news/2007/04/30/ruleby-a-pure-ruby-rule-engine
WowSim is doing well. Buffs/debuffs are looking good, reports are generated and ability modifiers are sorted. Still a LOT to do, but the class diagram seems reasonably settled now. Looking forward to getting more maths in there.
Friday, August 10, 2007
Assembla
Free SVN, Trac, Wiki at http://assembla.com !
One caveat - if you're behind a proxy, even an invisible one, you need to use https to access SVN or you'll get MKACTIVITY errors (amongst others).
My project: http://www.assembla.com/wiki/show/wowsim
One caveat - if you're behind a proxy, even an invisible one, you need to use https to access SVN or you'll get MKACTIVITY errors (amongst others).
My project: http://www.assembla.com/wiki/show/wowsim
Tuesday, August 7, 2007
acts_as_state_machine
Rails plugins do clever things. Whoda thunk it: acts_as_state_machine
There are many DPS-estimating spreadsheets available for WoW, but no actual simulators. I've started one, but it's very early days, I'm tangling with debuffs. I'll probably get distracted and never finish it, but ^^
Oblivion is infuriating me again. I'm not sure why I'm even playing it, but there you go. I fixed the levelling problem by installing mods - Oscuro's and KCAS. In the short term, they make it much harder though. I was fighting fire atronachs, clannfeyr, amazons and marauders at L2. I want rats, damnit! Without anything to practice on, it's hard to get your stats up. I did find a nice cave with a mudcrab and a rat this morning and trained myself up to L7 or so. Booooring. Still, I can have a crack at those marauders, get my Arcane University pass and make some decent spells soon. That will help.
There are many DPS-estimating spreadsheets available for WoW, but no actual simulators. I've started one, but it's very early days, I'm tangling with debuffs. I'll probably get distracted and never finish it, but ^^
Oblivion is infuriating me again. I'm not sure why I'm even playing it, but there you go. I fixed the levelling problem by installing mods - Oscuro's and KCAS. In the short term, they make it much harder though. I was fighting fire atronachs, clannfeyr, amazons and marauders at L2. I want rats, damnit! Without anything to practice on, it's hard to get your stats up. I did find a nice cave with a mudcrab and a rat this morning and trained myself up to L7 or so. Booooring. Still, I can have a crack at those marauders, get my Arcane University pass and make some decent spells soon. That will help.
Subscribe to:
Posts (Atom)