# Thread: Ability cycles

1. Registrant
Join Date
Aug 2008
Posts
44

## Warrior - Ability rotations

Problem :

For theorycraft purpose, its important to know the SS:Rv:Rv ratio. However, since the 3.0.2 and the implementation of SnB, the old 25%:25%:50% is not valid anymore. That's quite a good thing for warrior gameplay but its now a pain for theorycrafters.
I know there is already a thread (Warrior - averaged rotation) where Kana uses simulations for this, but I will introduce an other way (Markov Chain theory) to solve this.

Hypothesis :
* 0ms lag.
* Revenge is always available on each cooldown.
* No thunderclap, Shockwave, ...
* Ability priorities : SS (SnB proc) > Rv > SS > Dv (limited rage encounter)

Modeling :

If we want to use Markov chain theory, we have to consider a finite number of states. And given the present state, future states have to be independant of the past states.
We could consider 4 states :
Code:
```S1 = {SS_available, Rv_available}
S2 = {SS_available, Rv_not_available}
S3 = {SS_not_available, Rv_available}
S4 = {SS_not_available, Rv_not_available}```
But future states would be dependant of the past states (ex : Rv not available if it has been done in the 6 last seconds).

Thus we have to consider a more complex system of states using the number of GCB until SS/Rv gets available. A finite state machine can be used as a representation of this Markov chain :

where x denotes the SnB proc probability (0.3)

The state space being finite, the transition probability distribution can be represented by a matrix called the transition matrix :
Code:
```    /0   1   0   0   0   0   0   0   0   0   0   0   0   0  \
|0   0   1   0   0   0   0   0   0   0   0   0   0   0  |
|0   0   0   0.7 0   0.3 0   0   0   0   0   0   0   0  |
|0   0   0   0   0.7 0   0   0   0   0   0   0   0   0.3|
|0   1   0   0   0   0   0   0   0   0   0   0   0   0  |
|0   0   0   0   0   0   1   0   0   0   0   0   0   0  |
P = |0   0.3 0   0   0   0   0   0.7 0   0   0   0   0   0  |
|0   0   0   0   0   0   0   0   0.7 0.3 0   0   0   0  |
|0   0   0   0   0   1   0   0   0   0   0   0   0   0  |
|0   0   0   0   0   0   0   0   0   0   1   0   0   0  |
|0   0   0   0   0   0   0   0   0   0   0   0.7 0   0.3|
|0   0.3 0   0   0   0   0   0   0   0   0   0   0.7 0  |
|0   0   0   0   0   0   0   0   0   1   0   0   0   0  |
\0   0   0   0   0   0   1   0   0   0   0   0   0   0  /```
Using this matrix, you can have (n+1) state from any n state. For exemple :
Code:
```S0 = [1 0 0 0 0 0 0 0 0 0 0 0 0 0] (initial state)
S1 = S0.P = [0 1 0 0 0 0 0 0 0 0 0 0 0 0]
S2 = S1.P = [0 0 1 0 0 0 0 0 0 0 0 0 0 0]
S3 = S2.P = [0 0 0 0.7 0 0.3 0 0 0 0 0 0 0 0]
...
Sn = Sn-1.P = S0.P^n```
P is a stochastic matrix and this chain being aperiodic, there is a unique stationay distribution Q :
Code:
```Q = lim(k->inf) P^k
Q.P = Q
Q(P-In) = 0n,n              where In is the identity matrix of size n and 0n,n the zero matrix of size nxn```
Q being a stochastic matrix too (q1 + q2 + q3 + ... + q14 = 1), we can solve this system and get the stationay distribution :

Code:
`Q = [0 0.1577639 0.1577639 0.1104347 0.0773043 0.0635431 0.1102986 0.0772090 0.0540463 0.0454171 0.0454171 0.0317920 0.0222544 0.0467555]`
Summing the probabilities for each SS, Rv and Dv state, we get :
Code:
```SS = 0.3134796 = 31.3%
Rv = 0.2193949 = 21.9%
Dv = 0.4671255 = 46.7%```
Analysis :
* These results are VERY close to Naka simulations.
* If we stick to these rotations, we wont be in a state where both SS and Rv are available without a SnB proc, ever. This means that both ability priorities (SS (SnB) > Rv > Sb > Dv) and (SS (Snd or not)> Rv > Dv) are equivalent.

Improvements :
* We could add SnB proc state in each state (3 more states in Markov chain). It would give us SS (no proc) and SS (SnB proc) probabilities.
* We could add revenge availability in each state (4 more Rv states).

PS : English is not my native language. So, if you see any misspelling or grammatical error, please message me.
Last edited by Foofy; 10-16-2008 at 07:59 AM. Reason: french for "rotation" is "cycle"...

2. Blechtroll
Join Date
Dec 2007
Location
Berlin
Posts
172
Good stuff. I think. Had to skip the middle part... matrices are the reason i failed at higher mathematics.

3. Wow... state diagrams. LOL, i miss those from school. Good writeup from what I can see, but I'll leave the real math crafters to come in and chime in, good to know man =]

4. The difference in ratios is because over in the other thread we were making different base assumptions: specifically, that you always choose SS > Rev > Dev, not SS(free) > Rev > SS(non-free) > Dev.

P.S. WTF is a "GCB"? Grr.

5. Registrant
Join Date
Mar 2008
Posts
87
Is the purpose of this to identify that there's is sufficiently small variance in the usage% of SS, Rev, Dev b/w the two putative priority lists (the first being Snb > Rev > SS > Dev and the second being SS(SnB or not) > Rev > Dev) that they may be called roughly equivalent? If so, I'd contend that boss fights are adequately short that even assuming you almost never saw SS's CD finish without SnB proccing that fairly often the 1 time that SSing instead of revenging when both were off CD would have ample potential to shift the percentages pretty heavily based upon what you decide for that particular boss fight.