Theck's MATLAB thread  Cataclysm/4.x
Moderators: Fridmarr, Worldie, Aergis, theckhd
Re: Theck's MATLAB thread  Cataclysm/4.x
Checking up on a few of tlitp's revisions  the base damages on the abilities seem awfully low. For example, here's the edit for AS:
down from 56056850 base damage and 7% scaling with each stat.
Just to test this, I hopped on beta and checked the tooltip damage at 80 for several gear configurations:
37% was empyrically what I found to be the best integer scaling percentage by trial and error. The last line then spits out a base damage of 2509, well above the base threshold in the code, which seems to be gotten from the tooltip on MMOchampion.
Interestingly, both mmochampion and wowhead have the higher base damage in the formula, but the spell scaling is still set at 7%.
Did I miss something here? Do the ap/sp coefficients change with level? Or has this change just not been reflected on the database sites?
 Code: Select all
raw.AvengersShield= ((440+536)./2 + 0.00.*player.hsp + 0.00.*player.ap).*mdf.spdmg;
down from 56056850 base damage and 7% scaling with each stat.
Just to test this, I hopped on beta and checked the tooltip damage at 80 for several gear configurations:
 Code: Select all
asmin=[2768 3355 3941 4349];asmax=[3327 3914 4500 4908];asap=[522 1740 2956 3800];assp=[178 544 908 1166];
model=2768+0.37.*(asapmin(asap)+asspmin(assp));plot(asap,asmin,asap,model)
27680.37.*(min(asap)+min(assp))
37% was empyrically what I found to be the best integer scaling percentage by trial and error. The last line then spits out a base damage of 2509, well above the base threshold in the code, which seems to be gotten from the tooltip on MMOchampion.
Interestingly, both mmochampion and wowhead have the higher base damage in the formula, but the spell scaling is still set at 7%.
Did I miss something here? Do the ap/sp coefficients change with level? Or has this change just not been reflected on the database sites?
"Theck, Bringer of Numbers and Pounding Headaches," courtesy of GrehnSkipjack.
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty

theckhd  Moderator
 Posts: 8031
 Joined: Thu Jul 31, 2008 3:06 pm
 Location: Harrisburg, PA
Re: Theck's MATLAB thread  Cataclysm/4.x
Interesting observation:
CS tooltip on beta says 130% weapon damage, which is consistent with 100% base and 30% from Crusade (100*1.3)
CS as ret says 132% weapon damage. The only other source I could find for this is Communion, which increases your damage by 2%. It's consistent with 100*(1+0.3+0.2) or floor(100*1.3*1.02).
HotR tooltip says 45% weapon damage with Crusade (30%) and 2pT10 (20%). That's consistent with 30*(1+.3+.2), but not with floor(30*1.3*1.2). Provided the base damage is still 30%, this means that Crusade, 2T10, Communion, and other such effects are all calculated additively rather than multiplicatively.
<edit> Just as a sanity check, unequipping 2T10 drops the tooltip to 39%, as expected.
CS tooltip on beta says 130% weapon damage, which is consistent with 100% base and 30% from Crusade (100*1.3)
CS as ret says 132% weapon damage. The only other source I could find for this is Communion, which increases your damage by 2%. It's consistent with 100*(1+0.3+0.2) or floor(100*1.3*1.02).
HotR tooltip says 45% weapon damage with Crusade (30%) and 2pT10 (20%). That's consistent with 30*(1+.3+.2), but not with floor(30*1.3*1.2). Provided the base damage is still 30%, this means that Crusade, 2T10, Communion, and other such effects are all calculated additively rather than multiplicatively.
<edit> Just as a sanity check, unequipping 2T10 drops the tooltip to 39%, as expected.
"Theck, Bringer of Numbers and Pounding Headaches," courtesy of GrehnSkipjack.
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty

theckhd  Moderator
 Posts: 8031
 Joined: Thu Jul 31, 2008 3:06 pm
 Location: Harrisburg, PA
Re: Theck's MATLAB thread  Cataclysm/4.x
Did similar testing of HammerNova, here's the data:
Unfortunately, I was dumb and accidentally equipped 2T10 when I was taking the data (I took this earlier, before I noticed the effect in the previous post  that's actually what led me to notice it). The tier variable offsets this for the most part. Interestingly, it seems like the 2piece only affects the base damage of HammerNova, because the scaling doesn't change after equipping it.
But in any event, it looks like the scaling is somewhere around 8.5% ap and sp, assuming the coefficients are the same.
 Code: Select all
mnd=[743 778 801 820 855 999 1028 1054 1204];mxd=[1082 1117 1140 1159 1194 1390 1419 1445 1595];sp=[178 275 337 391 488 598 679 751 1116];ap=[522 846 1050 1230 1554 1920 2192 2432 3800];
tier=[1 1 1 1 1 1 .45/.39 .45/.39 .45/.39 .45/.39];
hmod=(684.*tier+0.085.*(ap+sp));plot(ap,mnd,ap,hmod);
Unfortunately, I was dumb and accidentally equipped 2T10 when I was taking the data (I took this earlier, before I noticed the effect in the previous post  that's actually what led me to notice it). The tier variable offsets this for the most part. Interestingly, it seems like the 2piece only affects the base damage of HammerNova, because the scaling doesn't change after equipping it.
But in any event, it looks like the scaling is somewhere around 8.5% ap and sp, assuming the coefficients are the same.
"Theck, Bringer of Numbers and Pounding Headaches," courtesy of GrehnSkipjack.
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty

theckhd  Moderator
 Posts: 8031
 Joined: Thu Jul 31, 2008 3:06 pm
 Location: Harrisburg, PA
Re: Theck's MATLAB thread  Cataclysm/4.x
It could very well be that, apparently the new streaming client Blizzard uses has changed how the data the database websites use works. They're also not perfect yet at getting the numbers from the new automatic scaling with level that abilities do. They also extract a lot of data from the tooltips, so if those haven't been updated yet they might show some wrong formulas.theckhd wrote:Or has this change just not been reflected on the database sites?

Chicken  Posts: 1597
 Joined: Fri Jun 26, 2009 2:19 pm
Re: Theck's MATLAB thread  Cataclysm/4.x
Chicken wrote:It could very well be that, apparently the new streaming client Blizzard uses has changed how the data the database websites use works. They're also not perfect yet at getting the numbers from the new automatic scaling with level that abilities do. They also extract a lot of data from the tooltips, so if those haven't been updated yet they might show some wrong formulas.theckhd wrote:Or has this change just not been reflected on the database sites?
Indeed, that seems to be the case.
 Code: Select all
% Level 80
asmin=[2769 2776 4084 4315 4612 4719];asmax=[3328 3335 4643 4874 5171 5278];asap=[524 538 3252 3726 4407 4627];assp=[179 187 1001 1153 1209 1275];
model=2769+0.37.*(asapmin(asap)+asspmin(assp));plot(asap,asmin,asap,model)
% Level 83
asmin=[2957 4265 4752 4850 4931];asmax=[3554 4862 5349 5447 5528];asap=[557 3271 4279 4481 4707];assp=[189 1003 1311 1376 1311];
model=2957+0.37.*(asapmin(asap)+asspmin(assp));figure(2);plot(asap,asmin,asap,model)
At both levels, the 37% coefficient looks pretty accurate. However, even if I don't believe that the coefficients change through levels, I'm interested in checking the numbers on a 10lvl paladin, just to be sure.
On a side note, in the last 2 sets of numbers at lvl 80 I used some gear with AP enchants and in the last one at lvl 83 I used BoM. That made the model values to be a bit off. I wonder why that happened.

Marblehead  Posts: 202
 Joined: Sun Aug 02, 2009 9:28 pm
 Location: Bloodhoof (EU)
Re: Theck's MATLAB thread  Cataclysm/4.x
You might want to check that up to level 20 if you get around to it, assuming the level 10 coefficient turns out to be lower at any rate. On live spell ranks learned before level 20 have lower coefficients than spell ranks learned at or above level 20. If they turn out to still be lower at level 20 we'll know that the scaling of coefficients at least continues for a longer amount of time in Cataclysm.Marblehead wrote:At both levels, the 37% coefficient looks pretty accurate. However, even if I don't believe that the coefficients change through levels, I'm interested in checking the numbers on a 10lvl paladin, just to be sure.

Chicken  Posts: 1597
 Joined: Fri Jun 26, 2009 2:19 pm
Re: Theck's MATLAB thread  Cataclysm/4.x
Marblehead wrote:On a side note, in the last 2 sets of numbers at lvl 80 I used some gear with AP enchants and in the last one at lvl 83 I used BoM. That made the model values to be a bit off. I wonder why that happened.
It means that the spell isn't actually scaling equally with SP and AP. In all of the other data points (including mine), both your SP and AP were coming from Strength, and thus weren't independent.
Example: you get c1 AP from each point of STR, and c2 SP from each point of STR. Thus, the formula would look like:
dmg = base + sa*AP + ss*SP = sa*c1*STR + ss*c2*STR = (sa*c1 + ss*c2)*STR
where sa and ss are the scaling coefficients for AP and SP respectively. We know SP and AP, but can't determine sa and ss independently if all you check is the scaling with STR, because they aren't independent. The only way to do that is to add just AP or just SP from a different source (SP or AP from gear, for example).
I didn't think to equip AP gear earlier to check the scaling independently. From your plots, it looks like the model lags the data when you only add AP, which means that it scales slightly faster with AP than with SP. If you try modeling it as
base+sa*AP+ss*SP
and use the empirical constraint equation
sa*c1+ss*c2=0.37*(c1+c2)
it should be pretty easy to nail both down by only varying one. I think that c1=2 and c2=0.6 should be the right values.
"Theck, Bringer of Numbers and Pounding Headaches," courtesy of GrehnSkipjack.
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty

theckhd  Moderator
 Posts: 8031
 Joined: Thu Jul 31, 2008 3:06 pm
 Location: Harrisburg, PA
Re: Theck's MATLAB thread  Cataclysm/4.x
By the way, I uploaded some rough "priority simulation" modules.
prio_model defines a priority model to evaluate. It's fairly robust, and should allow for any sort of conditional statement we'd want to evaluate ('player.hopo>=3  HS.up==0' for example).
prio_sim takes that priority model and evaluates it over N timesteps of dt. I have it set up for N=300 and dt=0.1, but those are obviously changeable.
prio_sim also constructs the rotation structure "rs" which gets passed to rotation_drawer to make pretty pictures. If you want to see what I mean, update to the latest revision and type:
sample_calculation
prio_model
prio_sim
prio_model defines a priority model to evaluate. It's fairly robust, and should allow for any sort of conditional statement we'd want to evaluate ('player.hopo>=3  HS.up==0' for example).
prio_sim takes that priority model and evaluates it over N timesteps of dt. I have it set up for N=300 and dt=0.1, but those are obviously changeable.
prio_sim also constructs the rotation structure "rs" which gets passed to rotation_drawer to make pretty pictures. If you want to see what I mean, update to the latest revision and type:
sample_calculation
prio_model
prio_sim
"Theck, Bringer of Numbers and Pounding Headaches," courtesy of GrehnSkipjack.
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty

theckhd  Moderator
 Posts: 8031
 Joined: Thu Jul 31, 2008 3:06 pm
 Location: Harrisburg, PA
Re: Theck's MATLAB thread  Cataclysm/4.x
I want to have pretty pictures, but the sim doesn't seem to run with Octave.
Unfortunately I don't really know MATLAB or Octave well enough to debug this.
 Code: Select all
octave:1> sample_calculation
warning: division by zero
error: `rotation_model' undefined near line 33 column 1
error: called from:
error: c:\Users\Alan\Projects\matlabadin\sample_calculation.m at line 33, column 1
Unfortunately I don't really know MATLAB or Octave well enough to debug this.

bentglasstube  Posts: 40
 Joined: Mon Jul 13, 2009 11:46 am
 Location: Phoenix, AZ
Re: Theck's MATLAB thread  Cataclysm/4.x
 Code: Select all
% Level 16
asmin=[184 195];asmax=[211 222];asap=[114 136];assp=[52 59];
model=184+0.37.*(asapmin(asap)+asspmin(assp));plot(asap,asmin,asap,model)
I think that we can safely assume that coefficients (at least for AS) remain unchanged throughout leveling.

Marblehead  Posts: 202
 Joined: Sun Aug 02, 2009 9:28 pm
 Location: Bloodhoof (EU)
Re: Theck's MATLAB thread  Cataclysm/4.x
Not 100% sure why it's giving you a "divide by zero" error, but if you go into sample_calculation and comment out the line that calls rotation_model, it should skip that entirely.
Alternatively, you could add a junk line of code to the end of rotation_model ("temp=1"). I'm guessing that octave has a problem with the fact that rotation_model has no executable code. tlitp commented it all out in one of the recent revisions.
Alternatively, you could add a junk line of code to the end of rotation_model ("temp=1"). I'm guessing that octave has a problem with the fact that rotation_model has no executable code. tlitp commented it all out in one of the recent revisions.
"Theck, Bringer of Numbers and Pounding Headaches," courtesy of GrehnSkipjack.
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty
Simcraft 6.x, Call to Arms 6.0, Talent Spec & Glyph Guide 6.x, Blog: Sacred Duty

theckhd  Moderator
 Posts: 8031
 Joined: Thu Jul 31, 2008 3:06 pm
 Location: Harrisburg, PA
Re: Theck's MATLAB thread  Cataclysm/4.x
The divide by zero error is on line 94 of avoid_dr.m
total_miss is 0 at this point because defense is gone.
I commented that out and added a 1 to the end of rotation model.
I get the following output and a boring graph:
Edit: I dug a little deeper and fixed the YTickLabels issue but I guess Octave doesn't have the "rectangle" function so I don't get pretty graphs.
 Code: Select all
missdr = 1./(1./c_miss + k./total_miss); %miss after DR
total_miss is 0 at this point because defense is gone.
I commented that out and added a 1 to the end of rotation model.
I get the following output and a boring graph:
 Code: Select all
octave:1> sample_calculation
warning: Success!
octave:2> prio_model
octave:3> prio_sim
warning: Order not defined or too short, defaulting to text order
error: set: unknown property "YTickLabels"
error: called from:
error: c:\Users\Alan\Projects\matlabadin\rotation_drawer.m at line 54, column
1
error: c:\Users\Alan\Projects\matlabadin\prio_sim.m at line 110, column 1
Edit: I dug a little deeper and fixed the YTickLabels issue but I guess Octave doesn't have the "rectangle" function so I don't get pretty graphs.

bentglasstube  Posts: 40
 Joined: Mon Jul 13, 2009 11:46 am
 Location: Phoenix, AZ
Re: Theck's MATLAB thread  Cataclysm/4.x
Gaffer wrote:I'll try to get the Vengeance details you're looking for tomorrow. I made the mistake of going to Hyjal and the three times I attempted to log in, I zone in on top of ~5 horde that corpse camp me.
Still an issue. I'll transfer a character to the PvE server this weekend if no one else gets you the Vengeance information you need before I get some time.
 Gaffer
 Posts: 139
 Joined: Tue Oct 14, 2008 2:39 am
Re: Theck's MATLAB thread  Cataclysm/4.x
I played around a little more with Octave and got as far as this
I guess I will have to leave the plotting up to those of you who have real matlab.
I guess I will have to leave the plotting up to those of you who have real matlab.

bentglasstube  Posts: 40
 Joined: Mon Jul 13, 2009 11:46 am
 Location: Phoenix, AZ
Re: Theck's MATLAB thread  Cataclysm/4.x
Do Octave/FreeMat get along nicely with structures within structures ? You can load avoid_dr r55 directly, it's selfsufficient :
If that's the case, additional code cleanup is down the road.
 Code: Select all
clear;avoiddr=avoid_dr(0,0,0)
If that's the case, additional code cleanup is down the road.

tlitp  Posts: 556
 Joined: Mon Jul 27, 2009 3:25 pm
Return to Advanced Theorycraft and Calculations
Who is online
Users browsing this forum: No registered users and 1 guest