## WoW: A Strange Game. The only way to win is not to play.

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

Cave Wizard
Posts: 35
Joined: Sat Jan 16, 2010 2:10 am UTC

### WoW: A Strange Game. The only way to win is not to play.

Dear Math Gurus:

I'm trying to figure out a better way to optimize my World of Warcraft character's damage output, and I'm wondering if you can recommend a good general purpose approach to it.

Basically, a character has 4-8 different abilities they can do at any given time. Most of the abilities do a certain amount of damage in exchange for a certain resource cost, and take different amounts of time to use, or will have a "cooldown" of a certain number of seconds before you can use the ability again. Some abilities will apply a short or long-term effect to the enemy that increase the damage a character does to that enemy, some abilties will apply an effect to the character itself to increase the character's damage.

It seems like there should be some magical way to turn this into a giant graph or something and then find the optimal strategy for traversing it. In practice, though, that's either nonsense or my graph skills just aren't up to par to figure it out, haha.

I'm wondering if anyone can come up with a good way to tackle this and optimize it. Right now what the Warcraft community does is to come up with a strategy that breaks down into a pretty straightforward priority list. Like this but with 10+ things: 1) Do your long-cooldown, high-damage ability. 2) Do your ability that increases your damage, and keep that applied to yourself all the time. 3) Do your no-cooldown, low-damage ability as "filler"

The problem is that these priority lists are made by hand, and a clever person will often come by and find a way to do vastly more damage just by tinkering with the list just a tiny bit in a way that was unintuitive. My guess is that with a little bit of mathematical know-how applied and some computational elbow grease, it'd be possible to automatically tease out crazy-seeming high-throughput strategies. I'm hoping one of you can contribute the know-how part, haha.

Deva
Has suggestions for the murderers out there.
Posts: 1999
Joined: Sat Feb 26, 2011 5:18 am UTC

### Re: WoW: A Strange Game. The only way to win is not to play.

Knows of tools like SimulationCraft already. Juggles lots of variables, such as lining up cooldowns, random buffs, and on-use buffs. Holds priority (and, by extension, timing) constant to prevent millions of outcomes. Demands some minimum of simulations per approach also.

Recalls Combustion and Alter Time. (Note: Probably works differently now. May not remember entirely correctly either.)

- Ignite: Activates upon hitting a target. Debuffs them. Deals damage over time based on a fire spell’s direct damage. May add damage before it ticks. Creates a larger Ignite value, essentially.
- Combustion: Copies Ignite. Inflicts it over ten seconds.
- Alter Time: Resets buffs to the moment of casting until recast OR ten seconds. (Example: Drinks a potion at t = 0 seconds. Lasts fifteen seconds normally. Casts Alter Time at t = 3 seconds. Triggers automatically at t = 13 seconds. Has ten seconds of potion remaining at t = 15 seconds.) Does not reset cooldowns.

Now factor in random and semi-random buffs.
- Heating Up: Acquires one charge per non-tick critical hit. Gains an instant-cast Pyroblast at two charges. Affected by Alter Time.
- Trinket: Triggers at an X% chance per spell hit. Has an internal cooldown. Affected by Alter Time.

Do not forget stats either.
- Intellect: Improves spell damage and a little critical strike too.
- Haste: Casts faster. Increases damage over time effects at certain breakpoints too.
- Mastery: Increases Ignite's damage.
- Critical Strike: Gets more critical hits. (Note: Becomes less effective at higher amounts.)

Will not go into additional spells, talents, glyphs, and cooldown timing. (Ignored movement and multiple targets too. Typically calculated for one target while stationary.) Still figured out a lot already, however. Weighted stats. Decided how long to wait for Heating Up and the trinket. (Became a loss after a point.) Covers one (damage) specialization of over twenty. Reruns everything every buff/nerf too.
Changes its form depending on the observer.

Cave Wizard
Posts: 35
Joined: Sat Jan 16, 2010 2:10 am UTC

### Re: WoW: A Strange Game. The only way to win is not to play.

Yeah, but at a fundamental level, simcraft is a script engine with a super simplistic scripting format written by human beings, that's what I'm hoping to get around. You can't just punch in a vague description of how a new type of game character works to SimCraft and have it figure out a way to play.

I'm thinking there must be some more generic way to do this, but I just don't know enough about machine learning or game theory to figure it out on my own, haha.

Meteoric
Posts: 333
Joined: Wed Nov 23, 2011 4:43 am UTC

### Re: WoW: A Strange Game. The only way to win is not to play.

Priority lists are usually arrived at by taking a few initial guesses, and simming a lot of permutations. I suppose you could try to automatically generate all possible permutations, but this sounds inefficient.
No, even in theory, you cannot build a rocket more massive than the visible universe.

Sizik
Posts: 1197
Joined: Wed Aug 27, 2008 3:48 am UTC

### Re: WoW: A Strange Game. The only way to win is not to play.

Meteoric wrote:Priority lists are usually arrived at by taking a few initial guesses, and simming a lot of permutations. I suppose you could try to automatically generate all possible permutations, but this sounds inefficient.

Sounds like a good use for an evolutionary algorithm.
gmalivuk wrote:
King Author wrote:If space (rather, distance) is an illusion, it'd be possible for one meta-me to experience both body's sensory inputs.
Yes. And if wishes were horses, wishing wells would fill up very quickly with drowned horses.

Meteoric
Posts: 333
Joined: Wed Nov 23, 2011 4:43 am UTC

### Re: WoW: A Strange Game. The only way to win is not to play.

I think that would have limited success in the general case. Some builds have strategies that very quickly go from optimal to terrible if you deviate slightly, and I think evolutionary algorithms are bad at finding such optima?

I have only the most pop-sci-level understanding of evolutionary algorithms though, so maybe I'm totally wrong.
No, even in theory, you cannot build a rocket more massive than the visible universe.

>-)
Posts: 525
Joined: Tue Apr 24, 2012 1:10 am UTC

### Re: WoW: A Strange Game. The only way to win is not to play.

I would think evo algs are better than most optimization algs at dealing with highly nonconvex functions, since if an individual does take a step in the wrong direction and becomes terrible, it is immediately eliminated.
plus in the vast majority of cases, deviating a strategy should result in pretty similar results? i don't play wow, but i imagine this might be the case.
you could also try simulated annealing.

Cave Wizard wrote:Yeah, but at a fundamental level, simcraft is a script engine with a super simplistic scripting format written by human beings, that's what I'm hoping to get around. You can't just punch in a vague description of how a new type of game character works to SimCraft and have it figure out a way to play.

correct, but if there's an api which lets you input a strategy and spits out a number (DPS done), then you can use this as a black box function evaluator, which basically gets you halfway to a working solution (the other half would be defining some notion of neighbor strategies or a distance metric on strategies, and after that you can just plug everything into your favorite optimization library)

another thing is you mentioned character does 4 to 8 abilities at a time. i don't know how many abilities there are in total, but if it's something like 100, then a brute force search would only have to try at most 10^16 strategies, of which you can probably prune away at least 99% with some simple heuristic, leaving you with 10^14. then, depending on how long the DPS estimation takes, this is within the realm of possibility, if you're patient and have a fast computer.

Xanthir
My HERO!!!
Posts: 5284
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

### Re: WoW: A Strange Game. The only way to win is not to play.

The problem isn't maintaining a good solution, it's finding one in the first place, when the surrounding area is low-fitness. Genetic algorithms are just hill-climbers with an interesting way to force them to explore new areas of the possibility space (breeding); they come with all the same limitations that hill-climbing algorithms generally have.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

Return to “Mathematics”

### Who is online

Users browsing this forum: No registered users and 4 guests