Please upgrade your browser for the best possible experience.

Chrome Firefox Internet Explorer
×

Effective HP: A (very) Poor Metric in TOR

STAR WARS: The Old Republic > English > Classes > Roles > Tanking
Effective HP: A (very) Poor Metric in TOR

ARagingNoob's Avatar


ARagingNoob
11.03.2012 , 02:00 AM | #21
Im so glad there are people like you in the game to do these number crunches, makes gearing my first tank so much easier xD

I read the old Sith Warrior thread on tanking stat priorities before I started grinding out gear for my own shadow tank and so far Ive got 24k HP (buff, no stim), 40.25% dam red, 27.68% def, 45.41% shield and 58.30% absorb and stil need a few more Campaign pieces.

My question is though, as Shadow tanks, is it more worth while for us to us switch to a few pieces of gear that favor EHP over mitagation on bosses where we can't mitagate most of the damage? (Ex: Stormcaller, TFB 2nd phase [utilizing Force Cloak for gear switch]).
Ty in advance!
Jedi Covenant
Yül 50 Sniper Pálla 50 Powertech
Selva 50 Sith Assassin Briánna 50 Operative

KeyboardNinja's Avatar


KeyboardNinja
11.03.2012 , 02:19 AM | #22
Quote: Originally Posted by grallmate View Post
This function is also incorrect. Again, basic logic disproves it: Given a higher number of trials and a constant probability, the chance of an event occurring at least once increases.
My function reflects this property. See plot: http://www.wolframalpha.com/input/?i=plot+y+%3D+0.4595^9%28-%28%281+-+0.4595%29^x+-+1%29%29. Yours is logical at face value, but you're dramatically over-counting due to the fact that an event chain p_1...p_10 overlaps with an event chain of p_2...p_11 by 9 events. That's why the probabilities you're churning out are so much higher.

The base case was wrong, as you said. I generally work with zero-based functions, so slip of habit. Correcting this gives the following function:

f(i) = 0.4595^9(-((1 - 0.4595)^i - 1))

f(185) = 0.000913208

Thus, it actually makes no difference within the bounds of rounding error. If I had let it expand, it would have produced a slightly larger value than previously, but only slightly.

Quote: Originally Posted by grallmate View Post
I can get an experimental idea of the probability by using a program like:
Code:
for(i=0;i<10000000000;i++){
   for(j=0;j<185;j++){
      if(rand.Next()<prob){
         hits++;
         if(hits>=10){
            count++;
            if(count>maxStreak)
               maxStreak = count; 
         }
      }
      else
         hits = 0;
   }
}
Console.Write("Probability: "(count/i) "\nMax Streak: " maxStreak);
I'll run it next time I've got access to my programming suite.
I'll run this myself tomorrow. 10 trillion is a lot of iterations, but we're talking about very, very small odds. It seems like the margin for error will be fairly high.
Computer Programmer. Theory Crafter. Dragonslayer on The Ebon Hawk.
Tam (shadow tank) Tov-ren (commando healer) Aveo (combat sentinel) Nimri (df scoundrel)
Averith (hybrid sniper) Alish (lightning sorcerer) Aresham (jugg tank)

KeyboardNinja's Avatar


KeyboardNinja
11.03.2012 , 04:04 PM | #23
Curiouser and curiouser…

Code:
ITERATIONS = 1000000

count = 0
prob = 0.4595
hits = 0

ITERATIONS.times do
  i = 0
  while i < 185
    if rand < prob
      hits += 1
      
      if hits >= 10
        count += 1
        i = 185
      end
    else
      hits = 0
    end
    i += 1
  end
  hits = 0
end

puts "count = #{count}"
puts "probability = #{count.to_f / ITERATIONS}"
I had to modify your program somewhat, since it wasn't actually computing the per-fight probability of a consecutive streak. I get the following results from the above:

Code:
count = 39378
probability = 0.039378
Which is neither as high as you predicted, nor as low as I predicted. So, something is clearly wrong with my derivation, but yours isn't correct either. I suspect mine is headed in the right direction, but something went wrong in the middle.
Computer Programmer. Theory Crafter. Dragonslayer on The Ebon Hawk.
Tam (shadow tank) Tov-ren (commando healer) Aveo (combat sentinel) Nimri (df scoundrel)
Averith (hybrid sniper) Alish (lightning sorcerer) Aresham (jugg tank)

grallmate's Avatar


grallmate
11.04.2012 , 08:00 PM | #24
I just noticed that we both missed that I only had 185 'hits' not 195. My initial calculations were also using 9 hits as worst case (again because even a shielded subsequent hit would result in death). Doubt either of those corrections will push it up to my numbers but they will increase it noticeably.

The only adjustment I can see in your code is that you have an exit condition once the streak has reached 10

In terms of the 10 trillion iterations, I was just using an arbitrarily large number to try and generate a more average result. I intend to run it probably 100 times (most likely just add in another loop) giving me a more accurate representation.

I'll have access to my programming stuff tomorrow so I'll run them then. Probably going to take a while to run.

EDIT: Managed to get a compiler working on my work computer so I've run the program now with corrections.
Code:
int main(int argc, char *argv[])
{
	int i,j,l;
	double k = 0;
	int hits = 0;
	double count = 0;
	int maxStreak = 0;
	double prob = 4595;
	double average = 0;
	
	srand(time(NULL));

	for(l=0; l<50; l++){
	    for(i=0;i<1000000;i++){
	   		for(j=0;j<195;j++){
				k = rand() % 10000;
	      		if(k<prob){
	         		hits++;
	         		if(hits>=9){
	            		count++;
	            		if(hits>maxStreak)
	               			maxStreak = hits; 
	         		}
	      		}
	      		else
	         	hits = 0;
	  	 	}
		}
		printf("Probability: %lf\nMax Streak: %i\n", (count/i), maxStreak);
		average += (couny/i);
		count = 0;
		maxStreak = 0;
	}
	average = average / l;
	printf("Average: %lf", average);
}
Using 9 as a 'worst case' streak gives an average of about 0.178% chance of it occurring.
Using 10 gives about 0.082 chance.

Interestingly, with 1,000,000 'swings' I was consistently getting a 22-25 consecutive hits as the longest string.

I then made the following adjustment to the code to simulate 10 fights a week, every week, for a year.

Code:
int main(int argc, char *argv[])
{
	int i,j,l;
	double k = 0;
	int hits = 0;
	double count = 0;
	int weeksSeen = 0;
	int maxStreak = 0;
	double prob = 4595;
	double average = 0;
	
	srand(time(NULL));

	for(l=0; l<52; l++){
	    for(i=0;i<10;i++){
	   		for(j=0;j<195;j++){
				k = rand() % 10000;
	      		if(k<prob){
	         		hits++;
	         		if(hits>=9){
	            		count++;
	            		if(hits>maxStreak)
	               			maxStreak = hits; 
	         		}
	      		}
	      		else
	         	hits = 0;
	  	 	}
		}
		printf("Probability: %lf\nMax Streak: %i\n", (count/i), maxStreak);
		average += (count/i);
		if(count > 0)
			weeksSeen++;
		count = 0;
		maxStreak = 0;
	}
	average = average / l;
	printf("Average: %lf, Seen: %i", average, weeksSeen);
}
Average number of weeks that a worst case string was seen was about 32. Gives about a 60% chance to see it each week. Going back to 10 hits means you see it ~19 weeks of the year. Now its important to note from this version that overlapping of 11+ strings is irrelevant. For the purpose of "weeks seen" we only need to see it once each week, be it a string of 9 (10) or 20.

I then ran a seperate version that zeroed out hits every time a "worst case" string happened using the following program. This is different from yours in that it allows for multiple worst case strings in a single fight but doesn't allow for overlapping ones like my previous program (which would count 11 hits as a 2 worst case strings).

Code:
int main(int argc, char *argv[])
{
	int i,j,l;
	double k = 0;
	int hits = 0;
	double count = 0;
	int weeksSeen = 0;
	double prob = 4595;
	double average = 0;
	
	srand(time(NULL));

	for(l=0; l<50; l++){
	    for(i=0;i<1000000;i++){
	   		for(j=0;j<195;j++){
				k = rand() % 10000;
	      		if(k<prob){
	         		hits++;
	         		if(hits>=10){
	            		count++;
	            		hits = 0;
	         		}
	      		}
	      		else
	         	hits = 0;
	  	 	}
		}
		printf("Probability: %lf\n", (count/i));
		average += (count/i);
		if(count > 0)
			weeksSeen++;
		count = 0;
	}
	average = average / l;
	printf("Average: %lf, Seen: %i\n", average, weeksSeen);
}
This gave a probability of 0.044

Please double check it for me and point out any mistakes I may have made. Honestly I'm starting to get a little lost in all the numbers now. Especially since my "Weeks seen" simulation was noticeably higher than the other numbers say it should be.
The Kae-Sare Legacy - The Harbinger
<Vindication> <Retribution>

Gralleh Grall'eh Khyar
Gralleh's Guide to Guardian Tanking [UPDATED for 2.0]

KeyboardNinja's Avatar


KeyboardNinja
11.04.2012 , 08:43 PM | #25
Quote: Originally Posted by grallmate View Post
I'll have access to my programming stuff tomorrow so I'll run them then. Probably going to take a while to run.
Yeah, even with a really fast and well-optimized tight loop, 10 trillion iterations is going to take several weeks to complete on desktop hardware without parallelism.
Computer Programmer. Theory Crafter. Dragonslayer on The Ebon Hawk.
Tam (shadow tank) Tov-ren (commando healer) Aveo (combat sentinel) Nimri (df scoundrel)
Averith (hybrid sniper) Alish (lightning sorcerer) Aresham (jugg tank)

grallmate's Avatar


grallmate
11.04.2012 , 09:29 PM | #26
Made an edit to my last post with my program(s) then saw you'd posted while I was editing so just flagging this for a new post.
The Kae-Sare Legacy - The Harbinger
<Vindication> <Retribution>

Gralleh Grall'eh Khyar
Gralleh's Guide to Guardian Tanking [UPDATED for 2.0]

KeyboardNinja's Avatar


KeyboardNinja
11.04.2012 , 11:30 PM | #27
Upon further reflection, multiple worst-case streaks in the same fight are important thing to count. My reason for dropping them had been that you're already dead, so why count subsequent streaks? Strictly speaking, that isn't true though, so we can't remove them from the calculation. If I put them back into my calculation, it is likely that I will arrive at numbers similar to yours.

I would still argue that 10 is the correct number of hits to consider unless we start getting into expected shield chance, etc.

Your simulated numbers are certainly within the ballpark for what you predicted originally. Given the inherent imprecision in IEEE double, it seems like the difference could almost be accounted for by accumulated rounding error.

With that said, I would *really* like to know what is wrong with the derivation I made. It seems to be supported by the laws of probability, and yet it doesn't match what our simulations are telling us.
Computer Programmer. Theory Crafter. Dragonslayer on The Ebon Hawk.
Tam (shadow tank) Tov-ren (commando healer) Aveo (combat sentinel) Nimri (df scoundrel)
Averith (hybrid sniper) Alish (lightning sorcerer) Aresham (jugg tank)

grallmate's Avatar


grallmate
11.05.2012 , 01:35 AM | #28
Quote: Originally Posted by KeyboardNinja View Post
Upon further reflection, multiple worst-case streaks in the same fight are important thing to count. My reason for dropping them had been that you're already dead, so why count subsequent streaks? Strictly speaking, that isn't true though, so we can't remove them from the calculation. If I put them back into my calculation, it is likely that I will arrive at numbers similar to yours.

I would still argue that 10 is the correct number of hits to consider unless we start getting into expected shield chance, etc.

Your simulated numbers are certainly within the ballpark for what you predicted originally. Given the inherent imprecision in IEEE double, it seems like the difference could almost be accounted for by accumulated rounding error.

With that said, I would *really* like to know what is wrong with the derivation I made. It seems to be supported by the laws of probability, and yet it doesn't match what our simulations are telling us.
Yeah if we assumed that you died after 10 unmitigated hits that would be a correct assumption. Given that its across 20 seconds my calculations were more geared to showing how often it occurs without killing you.

Likewise, I'd like to know what we're doing wrong with the calculations. I just don't get why its giving us <0.1% probability per fight, yet showing up approximately/at least once every 3 weeks (30 fights). My brain hurts at this stage so I'm gonna take a break and look at it again in the morning.
The Kae-Sare Legacy - The Harbinger
<Vindication> <Retribution>

Gralleh Grall'eh Khyar
Gralleh's Guide to Guardian Tanking [UPDATED for 2.0]

haksilence's Avatar


haksilence
11.05.2012 , 08:51 AM | #29
Quote: Originally Posted by KeyboardNinja View Post
This in turn means that the severity of the "worst case scenario" is not any more dire in a progression environment. Twenty seconds! That's almost the half the cooldown on Resilience!
this is even more true now that they redesigned resilience. over the course of a raid the average cool down time on my resilience is just over 32 seconds. granted my stats are 25k HP, 40.25% damage reduction, 33.33% defense, 66.8%shield and a 61% absorption. so my build is built entirely around mitigating as much and as often as possible. to date MY HP have never been a problem in any encounter even with sub par healers that we are just dragging through. i pride myself of having the highest possible mitigation (i am speaking of course on average mitigation, and im aware these stats are not mathematically optimal, but the difference between my build and the optimal build is only a tenth of a percent) obtainable with 61 modifications.

haksilence's Avatar


haksilence
11.05.2012 , 09:01 AM | #30
Quote: Originally Posted by ARagingNoob View Post
Im so glad there are people like you in the game to do these number crunches, makes gearing my first tank so much easier xD

I read the old Sith Warrior thread on tanking stat priorities before I started grinding out gear for my own shadow tank and so far Ive got 24k HP (buff, no stim), 40.25% dam red, 27.68% def, 45.41% shield and 58.30% absorb and stil need a few more Campaign pieces.

My question is though, as Shadow tanks, is it more worth while for us to us switch to a few pieces of gear that favor EHP over mitagation on bosses where we can't mitagate most of the damage? (Ex: Stormcaller, TFB 2nd phase [utilizing Force Cloak for gear switch]).
Ty in advance!
ive been using my gear set in all encounters and have never noticed a problem. once your all set with full campaign min maxed out youll be close to 25k HP with a stim, which is more than enough.

to over simplify things its better (in my opinion) to have mitigation and not need it (since from my experience 25k is more than enough mixed in with cool downs and even cloak to survive the worst case scenario fairly easily for a sustained amount of time) then to need it and not have it, thus putting unnecessary strain on your healers on EVERY fight.


this is all personal opinion, and i do believe the redesigned resilience plays a part in swaying my choice, but i have seen shadow tanks that have opted for the high endurance gear and they tend to be much more difficult to manage as a healer and simply dont have the meens of staying alive for sustained periods of time.

(My secondary raid char is a commando healer that i am taking part of every encounter with as well)


so coming from me, id recommend sticking with mitigation although i know alot of people will disagree with me.
so do you. if you want a little more HP for the vanity and believe its the way to go,then go ahead but just be sure to not over do it.