Elitist Jerks [Math] The Two-Cycle Theorem of Spell Selection

08/24/07, 3:04 PM   #31
ugla
Von Kaiser

Orc Hunter

Mal'Ganis
 Originally Posted by Mokhtar All this theorycraft is well and good but a small point should be mentionned (rather obvious but...), let's say you have three cycles : - A : high dps, low dpm - B : mid dps and dpm - C : low dps, high dpm And let's say you have selected B and C as optimal for the fight knowing that you usually spend approx 8min30 mins to kill the mob. For some reason, at 7 min into the fight you realize that the fight should be over in 30 sec, provided you have the mana you should switch to cycle A. You can chastise yourself all you want with hindsight but you'll always make more damage that way...
Pretty sure this entire thread is arguing that B should never be used, because using either A, C, or a combination of A and C will always yield better results if you use them in the appropriate ratio during a fight.

08/24/07, 3:18 PM   #32
Astrik
Von Kaiser

Night Elf Warrior

Doomhammer
 Originally Posted by ugla Pretty sure this entire thread is arguing that B should never be used, because using either A, C, or a combination of A and C will always yield better results if you use them in the appropriate ratio during a fight.
Actually, I think it more likely proves that cycle B should always be used in some ratio. The true optimum is one perfect cycle - but that is not realistic since we cannot predict the exact length of the fight. The next optimum is two cycles that are fairly close together so picking A and C is not good. You should either be using A/B or B/C depending on the length of the fight.

However, the difficulty of playing your two cycles properly increases as they become closer together in the DPS/DPM range since it requires more forethought and accurate prediction on your part.

**special exceptions for cooldowns of course

 08/24/07, 4:46 PM #33 Hairy Glass Joe   Hairy Human Mage   Burning Legion As alluded to before, the theorem of two spell rotations suffers from causality. One must select the two cycles, and when to transition between them, based on an assumed kill time. Time is not the root variable. The boss's health is what determines when a fight starts and finishes. Thus, the proper solution to this problem should include the rate of change of the mobs health with respect to time (in other words, the raid's DPS). This would allow one to guess an initial raid dps (and select the two cycles, and the % of time to use each), and constantly switch between the two cycles. This would act like a time marching solution to a differential equation. I'll try to think about an actual mathematical solution to the problem this weekend. I think the solution would work something like (pardon my FORTRAN mind set): 1) Guess a raid wide dps 2) Divide mob health by dps (either guessed or observed) to obtain remaining fight time 3) Select the high DPS and the high DPM rotations 4) Solve for % of time spent in high DPS and % of time spent high DPM to end with 0 mana 5) have a running integral calculate raid dps IF raid dps is higher or lower THEN recalculate optimum time split between DPS and DPM for remainder of bosses health (IE, go to step 2) ELSE IF boss dead? THEN stop ELSE do it again!
08/24/07, 7:15 PM   #34
Kaibis
Glass Joe

Blood Elf Priest

Misha
 Originally Posted by songster No. Reread what you said. You're in effect saying that you should either spam AB or wand - since AB spam is the highest DPS and wanding is the highest DPM.
Fair enough, however I am not suggesting that the mage go in and start beating the boss with her staff.

Highest DPM could really only be calculated over a cycle that uses mana (other mana usage = 0 and we all know what division by zero is like).

08/24/07, 8:32 PM   #35
qam
Von Kaiser

Gnome Death Knight

Barthilas
 Originally Posted by Arawethion Timers such as trinkets can be handled a bit differently, as well. You can leave them out of the initial computation completely, and then later compute the potential damage contribution of each timer during each cycle, to see when best to use each one. This requires two assumptions: 1) The time spent in each cycle during the fight can be rearranged into whatever order you wish. 2) The effect of the timered abilities won't significantly alter your cycle choice for the fight. Both of these seem reasonable.
Really interesting theorem. I'd add one more assumption:

3) The length of the each cycle is much shorter than the length of the fight, to the degree that the combination of orthogonal cycles A*high dps cycle + B*high dpm mana cycle, can be considered continuous, rather than discrete.

By mixing trinkets, cooldowns etc into each cycle, they can get pretty long. In these cases, there would be additional cycles that otherwise would not be optimal, but are situationally superior because they reduce the 'granularity' error.

 08/24/07, 10:06 PM #36 PSGarak Bald Bull     Garak Undead Warlock   Hyjal Sub-cycles: WLOG, add the constraint that the cycles are linearly independent. This is what allows n cycles to make an n-dimensional vector space. Even if they are not linearly independant, you can generate a linearly independent basis. Execute range and other variables: This theorem makes the assumption of regular DPS and DPM. In situations where the dps or dpm of a cycle changes, you are now in a different cycle space with a different set of two cycles. For example, with the fire mage and molten fury: there are (at most) two optimal spell cycles to use from 100% to 20%. At the 20% marker, there are (at most) two optimal spell cycles to take you all the way to 0%. These may or may not be the same spell cycles. In practical terms, the first 80% have two spell cycles and the last 20% has a third (possibly a fourth, consisting entirely of Evocate). To take this a step further you could even partition your mana bar into two segments, one for the first 80% and one for the execute range, which will give you a better idea of which two cycles to use in each range. Other variables that might influence your dps and dpm will also switch you to another pair of cycles, like the shadowpriest dying, Bloodlust, DST proc, or what have you. Potentially you might even consider a clearcast proc to be a separate cycle space. Perhaps you might consider weakening the hypothesis on your theory to say "There are at most two cycles for each set of d_i and m_i," which is already inherent in the definition but bears repeating. "Execute range" "clearcast" "bloodlust" "Imp IotH proc" and so on give forth a new set of d_i and m_i, leading to their own pair of cycles. "Enrage" can be treated as a new set as well, and I would recomend partitioning the mana bar as above for execute-range fights. While your two cycles will tend to be labelable as "dps" and "regen" they are not your highest dps and highest dpm cycles, in general, since your dps cycle still has to consider dpm and your dpm cycle has to consider dps on some sort of optimality curve, the boundary of which is determined by your mana pool. While which two cycles to use in each situation varies on t, it varies discretely, and in fact you could probably come up with the switching points if you really wanted to. The ratio of using the two varies continuously with t, but the sum is commutative (order-independent), so that's not actually a barrier. It's easy to do: use "dps cycle" unti your mana% goes below boss hp%, then switch to "regen cycle" until your mana% goes above boss hp%. Unless your raid's dps has made the fight duration cross one of the thresholds into a different rotation this should allow you to get the correct ratio on the fly. Unless the whole raid switches to "regen cycle" at the same time. Game theory wins again. Note also: mana% can be of the apportioned amount, rather than total, if partioning mana bar as mentioned above. EDIT: ya, what guy above me said too. Granularity is the satan.
08/25/07, 1:16 AM   #37
Kaibis
Glass Joe

Blood Elf Priest

Misha
 Originally Posted by qam By mixing trinkets, cooldowns etc into each cycle, they can get pretty long. In these cases, there would be additional cycles that otherwise would not be optimal, but are situationally superior because they reduce the 'granularity' error.
Perhaps I am about to leave the theorycrafting and speak of pure practicality.

Given a limited number of expected cycles that cover and plan for a variety of events, clearcasting proc, PoM cooldown, etc. At any given moment one of these cycles will be the Highest DPS, and one will be the Highest DPM. At this moment we are either overusing or underusing our mana, in which case we must switch to one or the other.

Hmm, wonder what Blackheart the Inciter thinks about all this?

08/25/07, 4:51 AM   #38
Brakar
Piston Honda

Human Priest

Doomhammer
A couple of notes:

First, any spell that has an effect that lasts beyond it's cast time causes problems with the cycles. This includes both dots and spells with a sooldown. In general, any aftereffects of a spell must be fully contained within. The original theorem relies on the fact that cycles can be chosen to repeat in any fashion. For example, you have 3 cycles available and sufficient mana that is not a consideration:
Cycle A: 1.5s long and consists of "cast Mind Blast", 1500 dps. (MB has an 8s cooldown)
Cycle B: 1.5s long and consists of "cast SW: Death, wait through GCD", 1000 dps, (SW: D has a 12s cooldown)
Cycle C: 3s long and consists of "cast Mind Flay" 750dps.
Clearly the best dps is going to consist of a combination of all 3 cycles.

Second, the theorem does not explicitly state it will find the optimal cycle(s). It only states there are at most two cycles you can mix that is optimal for the cycles you supply. If you supply a bad selection of cycles, the two best may be the best of those options and very bad in general. While for a given length of time and available mana there at most two cycles to comprise the maximum damage you can do, the "cycle" may be the length of the entire fight.

 Originally Posted by Kaibis E.g. an arcane mage might choose the following two cycles High dps (cycle A): AB, *(AP, PoM, FB) High dpm (cycle B): AB, *(AP, PoM, FB) AB, **(FB/AM) *if cooldown is up **dependent on whether clearcasting state Note: The two cycles both have an 'if' statement in them. for example, in cycle A, if the Arcane Power is cooled down then PoM and Fireball are used. What this is actually acknowledging is that the two cycles that the OP suggests actually vary during the fight.
As I understand the original post, these are not well defined cycles. It does not "specify which spells you cast in which order, and how you react to any %-based procs.." As I interpret this, the only conditionals allowed are for procs you do not have control over and have easy changes based on said proc. Having a selection based on cooldowns doesn't lead to an explicit cast order and would all but guaranteedly run into problems as noted above with the cooldowns.

 Originally Posted by qam Really interesting theorem. I'd add one more assumption: 3) The length of the each cycle is much shorter than the length of the fight, to the degree that the combination of orthogonal cycles A*high dps cycle + B*high dpm mana cycle, can be considered continuous, rather than discrete. By mixing trinkets, cooldowns etc into each cycle, they can get pretty long. In these cases, there would be additional cycles that otherwise would not be optimal, but are situationally superior because they reduce the 'granularity' error.
The problem with restricting how long a cycle can be is if the restriction is less than one half of the total time. In this case, there is no longer a guarantee there exists 1-2 cycles that will truly optimize your damage. The more you restrict it, the more likely a purely optimal solution exists. In practical terms, a limit of 30s is reasonable and hopefully wouldn't cause too much difference between two cycle optimal and pure optimal solutions. This is the biggest problem with modeling classes with many dots (shadow priests, affliction locks) or with cooldowns significantly longer than 30s.

Overall, I'm still not convinced of how useful this idea is for actual fight or large portions of fights because of the number of variables that just can't be accounted for. Over much smaller periods with reasonable assumptions for that period of time. Either by a series of these small periods where you can reevaluate regularly, or interlaced with "unique" cycles that only arise every few minutes so can't be cleanly inserted into shorter cycles. For any practical application it is still abysmal with regards to have lots of cooldowns/dots with widely disparate timers so they may only lineup 2-3 times in an entire fight. This either leads to cycles that are rediculously long and unwieldy or shorter that aren't even close for total damage you can do by winging it.

 08/25/07, 2:25 PM #39 BrTarolg Von Kaiser   Brtarolg Gnome Mage   Sunstrider (EU) I'm going to try my best to define a few flaws/exceptions in the theorem. Don't get me wrong - the theorem is great, and should be used by everyone - but there are some (very) notable exceptions that should be taken in to consideration. The first thing is a technicality - the theorem assumes you know the length of the boss fight, how much damage can be done by each person, exactly whats going to happen and when its going to happen. Unfortunately, life(?) in wow not perfect, so you wont end up with the same (optimal) results every time. The second thing is that there are certain variables which the theorem takes for granted, which are actually random. Examples of this would be clearcasting proc's - you cant actually predict when these are going to happen, but the theorem would assume that you know how many of them would happen. In cases where you use adaptive rotations to increase your DPS (basically, taking using random variables to your advantage in the fight) this theorem would not apply because the variable you have taken into account which is assumed static in the theorem, is no longer static. Another example of this kind of random variable taking place is when you have to move around to break your rotation, which breaks part of the theorem, and adds a new cycle which is forced on you - doing nothing. In certain situations, when you are in this "doing nothing" state, a bit of common sense would tell you that it might be a good idea to use fireblast during the times when you are moving around and cant cast your regular spells. The third thing is that there are certain non random variables which are assumed static, which are not actually static. Examples of this would be arcane power, trinket usage, or certain buffs/debuffs. Such static variables it assumes are for example - how much damage your spell might do, or how much mana it might cost. Arcane power will change both of these, especially in the case of arcane blast it is particuarly important (hence the 15 seconds of spamming arcane blast when arcane power is up followed by PoM pyro). During the time of the arcane blast, variables which are assumed to be static have changed to a different static variable, so for this time the theorem again does not apply. Of course, its not that much of a problem - a bit of human intuition/common sense will tell you to use arcane power as much as possible, and during its usage spam arcane blast/PoM pyro at end. Other than that, if you "ignore" these exceptions, then the theorem proves that only 2 cycles are required to reach the optimal damage for the given time. If you find that you have too much mana at the end, that means you have picked an incorrect usage of the cycle (didn't use your DPS cycle enough or your cycle is wrong altogether). Its a great theorem though, and i love the proof
 08/25/07, 4:19 PM #40 PSGarak Bald Bull     Garak Undead Warlock   Hyjal Procs and whatnot are only a problem if you alter your cast preference because of them. As an affliction warlock, Amp Curse and various damage procs don't change my casting preference since it's simply not worth it to refresh DoTs early. Of course, I also don't have a "cycle" so =P. Random occurrences can be modeled based on expectation values over long durations, so you can get a pretty accurate average of the dps/dpm for a cycle. After all, the dps we calculate includes an average of crit rate and we don't bat an eyelash, and that's a random event as well, just one we're conditioned to ignore. This cuts into the intersection of probability and game theory: even if you don't know what the actual results of your actions will be you can still predict the course of action that will, on average, lead to the best results. If you're acting against a scenario governed by a probability distribution function, then your corresponding response is also a probability distribution function, and going less random cedes an advantage to the opponent. Of course, in WoW, the combat table is unreactive to your response, so your actions are free to be un-random so long as they have the same distribution. The only real exception is procs with a small enough proc rate that their variance (standard devation for stat buffs) is large enough to be problematic. Naturally, that's a pretty squishy definition. I do think this theorem is more applicable than people are giving it credit for. There are at most two cycles per dps/dpm situation you find yourself in. Any deviation from this that people point out generaly can be modeled as a separate dps/dpm situation with its own pair of cycles. Thinking of it in this fashion makes the theorem more useful for analyzing "real" situations, and potentially allows this theorem to start applying in earnest to people interesting in min-maxing.
08/25/07, 7:01 PM   #41
songster
Chief Passenger

Gnome Rogue

Earthen Ring (EU)
 Originally Posted by PSGarak I do think this theorem is more applicable than people are giving it credit for. There are at most two cycles per dps/dpm situation you find yourself in. Any deviation from this that people point out generaly can be modeled as a separate dps/dpm situation with its own pair of cycles. Thinking of it in this fashion makes the theorem more useful for analyzing "real" situations, and potentially allows this theorem to start applying in earnest to people interesting in min-maxing.
Hum, but how many different "DPS/DPM situations" might you find yourself in in a typical fight?

1) Normal fighting

3) Unusual clearcasting streaks that alter your mana regen

4) Under the influence of the Mystical Skyfire proc

5) Under the influence of Molten Fury

5) Under the influence of Heroism

6) Under the influence of Arcane Power

7) While evocating

8) While moving

9) Combinations of the above

As I say, it's an interesting result, but I think its only real use is to confirm the heuristics we already should know and be working under. That is, you theorycraft a couple of cycles - one high DPS but lower efficiency, and one more conservative mana-conserving one. Mix and match those as needed, but don't be hidebound by them. Use your biggest nuke cycle while AP/Heroism/Bloodlust etc. is up, save your less efficient high-burn cycle for the time Molten Fury is up, etc. And adapt on the fly if your shadow priest dies, or raid DPS is unusually low or high.

08/25/07, 8:19 PM   #42
qam
Von Kaiser

Gnome Death Knight

Barthilas
 Originally Posted by songster As I say, it's an interesting result, but I think its only real use is to confirm the heuristics we already should know and be working under. That is, you theorycraft a couple of cycles - one high DPS but lower efficiency, and one more conservative mana-conserving one. Mix and match those as needed, but don't be hidebound by them. Use your biggest nuke cycle while AP/Heroism/Bloodlust etc. is up, save your less efficient high-burn cycle for the time Molten Fury is up, etc. And adapt on the fly if your shadow priest dies, or raid DPS is unusually low or high.
I think this is the key benefit of the theory. Ideally, you would know the length of the fight at the beginning, and based on that you could determine the optimal combination of two cycles. Of course, nothing ever goes to plan, and if your shadow priest goes down or you lose a bunch of other dpsers, the nature of your dps plan changes significantly, and you have to decide on a more mana efficient cycle combination. This should still be a combination of your two pre-determined optimal cycles, but the ratio of them will be different. You shouldn't be adopting a third, suboptimal, middle-of-the-road rotation.

The exception is 'if your high-dps cycle will leave you with mana when the fight ends.' In that case, you would have to come up with a balls-to-the-wall type rotation for the run home - assuming, of course, that your optimal high-dps cycle is not already your highest possible dps cycle. I think there should be a corresponding exception for the other cycle, for cases in which you will run out of mana under the high-dpm rotation, but mana regen, mana-less damage through wanding, and the sustainability of the healers' mana makes it a little less compelling.

Ultimately, the value of the theory is determined by

1) How often you have to recalculate your cycle combination (based on random, significant events, like shadow priest death),
2) How precisely you can juggle the rotations (based on the length of each rotation compared to the length of the fight and time between the random, significant events mentioned above),
3) How superior the two optimal cycles are to the ones nearby,
4) The extent to which your personal dps will affect the length of the fight, and
5) How much noise is introduced by procs etc.

My apologies for the rambling post and to the OP, if I have misunderstood his intentions.

 08/27/07, 1:36 AM #43 Anaram Don Flamenco   Anaram Tauren Druid   Lightning's Blade (EU) Given these restrictions, wouldn't one of the cycles always include spells such as evocation, bloodlust or innervate? For optimal results they must be used, and unless we allow for spells outside cycles they must be part of a cycle. Either we make a cycle length equal to the cooldown of these spells which probably means the cycle won't be done more than 1-2 per fight and get ridiculously long if we follow the mathematics through stringently. If we allow ourselves conditionals ("if clearcast then do X") then wouldn't the optimal cycle be a single sequence of spells equal to the length of the fight with enough conditions on how to pick each spell such that the cycle always comes out optimal. EDIT: additionally given the random nature of a fight, you could end up in a situation where between 10% and 5% you clearcast everything. At that point (given mana will probably be plentiful) the optimal solution is probably to spam arcane blast from 5% to 0% even if that wasn't really part of cycles A or B (if you picked these cycles to be something reasonably simple). Last edited by Anaram : 08/27/07 at 1:41 AM.
 08/27/07, 10:34 PM #44 Drundia Piston Honda   Andrewndian Undead Warlock   Sylvanas (EU) The best cycle can only be determined if we know these things: - Exact length of fight - Exact amount of mana available over this fight - Exact amount of time when you are unable to DPS - Exact moments when you are unable to DPS None of these things can be accurately predicted. However we can make estimates of those fight parameters and create our primary DPS sequence over entire fight which will lead to maximum possible damage done over its duration. This primary sequence should in fact probably contain a maximum of 2 cycles. For maximum efficiency DPS and DPM of those 2 cycles should be as close as possible. In certain rare situations those 2 cycles may be equal. Now, this theorem should work as long as the actual fight parameters we get are between actual working parameters of these 2 cycles. It should work as long as these 2 conditions hold true A) You can sustain enough mana for DPM cycle B) You run out of mana if you use DPS cycle However random events can make either condition false. For example Shadow Priest death will most likely fail condition A and you will have to find 2 new cycles. Generally it seems that the cycle you should select at any given time is the one that takes more time in the remaining primary DPS sequence of the current fight with the current estimate of its parameters as this should be the one that is most likely to be either DPS cycle or DPM cycle. However if the parameters of DPS and DPM cycle are very similar you are most likely to have to pick new cycles very often. I think that definitions of DPS and DPM cycles are: DPS: Highest DPM cycle that depletes your mana before fight ends DPM: Highest DPS cycle that doesn't deplete your mana before fight ends.
 09/13/07, 9:52 AM #45 Baruk Von Kaiser     Baruk Gnome Mage   Ysera (EU) One point that comes to my mind regarding the correctness/completness of the proof: What about rotations that are nothing but a "reshuffle" of the spells? Say I have 3 cycles ABx3,AM,SC ABx4,AM,SC AB spammed According to the theorem having three cycles is suboptimal. However if I imagine any ordering of those cycles I can always reshuffle WITHOUT changing dps/dpm 1AB from the ABx4 rotation to the AB spammed part as the dps/dpm of AB doesn't cange once its ramped up 3 times. So any rotation of these 3 cycles is dps/dpm wise aequivalent to ABx3,AM,SC AB spammed just with a different ratio of the cycles. Maybe one need to extent this to a sort of aequivalence class of cycles? Per Aspera ad Astra

 Elitist Jerks [Math] The Two-Cycle Theorem of Spell Selection