Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

DotaCinema claims Critical Chance stacks linearly.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Since people need some help with math. I won't bother doing the calculations but rather do a Monte Carlo approximation with the help of c++.

    There are many ways to model a probability with the PRD; the first one is that whenever a crit chance happens the rest is stopped, aka when one crit happens the rest does not "try to happen", their PRD counters do not get modify.
    Here you have some c++ code that you can test yourselves the Monte Carlo approximation.
    (note: you might want to change the value of tries due to how computers work and try modifying the program a little like I did and stuff, I won't post almost the same code 25 times though)

    Code:
    #include "stdafx.h"
    #include <stdio.h>      /* printf, scanf, puts, NULL */
    #include <stdlib.h>     /* srand, rand */
    #include <time.h>       /* time */
    #include <iostream>
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	double a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
    	long tries = 10000000;
    	long success = 0;
    	double random = 0;
    	double initialChance = 5.57;
    	while (tries != 0){
    		tries--;
    		random =  rand() % 100;
    		if (a > random){
    			success++;
    			a = initialChance;
    			continue;
    		}
    		a += initialChance;
    		random =  rand() % 100;
    		if (b > random){
    			success++;
    			b = initialChance;
    			continue;
    		}
    		b += initialChance;
    		random =  rand() % 100;
    		if (c > random){
    			success++;
    			c = initialChance;
    			continue;
    		}
    		c += initialChance;
    		random =  rand() % 100;
    		if (d > random){
    			success++;
    			d = initialChance;
    			continue;
    		}
    		d += initialChance;
    		random =  rand() % 100;
    		if (e > random){
    			success++;
    			e = initialChance;
    			continue;
    		}
    		e += initialChance;
    		random =  rand() % 100;
    		if (f > random){
    			success++;
    			f = initialChance;
    			continue;
    		}
    		f += initialChance;
    	}
    	std::cout << success << std::endl;
    	char* character = new char;
    	std::cin >> character;
    		
    	
    
    	return 0;
    }

    This model is of course not the one used by WC3, since multiple crits can happen, but the Monte Carlo showed a probability of 74.4% for 6 crys.

    Now, the one that is used in WC3, all chances are tried and if one is a success then we have a success.

    The chance was once again 74.4%

    Code:
    #include "stdafx.h"
    #include <stdio.h>      /* printf, scanf, puts, NULL */
    #include <stdlib.h>     /* srand, rand */
    #include <time.h>       /* time */
    #include <iostream>
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	bool boolean = false;
    	double a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
    	long tries = 10000000;
    	long success = 0;
    	double random = 0;
    	double initialChance = 5.57;
    	while (tries != 0){
    		boolean = false;
    		tries--;
    		random =  rand() % 100;
    		if (a > random){
    			a = 0;
    			boolean = true;
    		}
    		a += initialChance;
    		random =  rand() % 100;
    		if (b > random){
    			b = 0;
    			boolean = true;
    		}
    		b += initialChance;
    		random =  rand() % 100;
    		if (c > random){
    			c = 0;
    			boolean = true;
    		}
    		c += initialChance;
    		random =  rand() % 100;
    		if (d > random){
    			d = 0;
    			boolean = true;
    		}
    		d += initialChance;
    		random =  rand() % 100;
    		if (e > random){
    			e = 0;
    			boolean = true;
    		}
    		e += initialChance;
    		random =  rand() % 100;
    		if (f > random){
    			f = 0;
    			boolean = true;
    		}
    		f += initialChance;
    		if (boolean){
    			success++;
    		}
    	}
    	std::cout << success << std::endl;
    	char* character = new char;
    	std::cin >> character;
    		
    	
    
    	return 0;
    }
    So we see both models yield a 74.4% chance even if the theoretical chance is 73.8%, it is close enough considering how computers work so that both methods of PRD give the same value as true randomness.


    Still, none of this 2 models come even close to 80% chance.

    To be honest I don't have any idea that "should" work fine but does not, only horribly wrong ideas...

    The next idea is what happens if only 1 dice is rolled per attack and that dice is used for all events related to that attack.

    If trying all the rolls, like in second method but with only 1 dice, I got a 20.3% probability, which, duh, it is kind of obvious since when one procs all proc, obviously this is not the case, but what about the first method? That gives a probability of 54.3%, not even close.... But I have the feeling I am getting closer to Valve.

    Now another stupid idea, since it is the same item on the same hero, maybe the counter gets increased for all of them if one fails. But that yields too much of a probability.


    Trying quite a few more erroneous methods I found something quite close to the actual probability.

    If one crystallis fails, it increases it's PRD counter, if the second crystallis fails, it increases the counter for itself and the first one, the third one would increase it for all three.

    But with only 1 dice rolled for all attacks.

    It came amazingly close for something done so stupidly with a 72.8% chance.

    So what if we roll dices for each attempt?


    Pukupukupuku BINGO! 84.3% chance.

    I don't know if this is the code being used by Valve, but if it is it is tremendously hilarious.


    Code:
    #include "stdafx.h"
    #include <stdio.h>      /* printf, scanf, puts, NULL */
    #include <stdlib.h>     /* srand, rand */
    #include <time.h>       /* time */
    #include <iostream>
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	double a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
    	long tries = 10000000;
    	long success = 0;
    	double random = 0;
    	double initialChance = 5.57;
    	while (tries != 0){
    		tries--;
    		random =  rand() % 100;
    		if (a > random){
    			success++;
    			a = initialChance;
    			continue;
    		}
    		a += initialChance;
    		random =  rand() % 100;
    		if (b > random){
    			success++;
    			b = initialChance;
    			continue;
    		}
    		a += initialChance;
    		b += initialChance;
    		random =  rand() % 100;
    		if (c > random){
    			success++;
    			c = initialChance;
    			continue;
    		}
    		a += initialChance;
    		b += initialChance;
    		c += initialChance;
    		random =  rand() % 100;
    		if (d > random){
    			success++;
    			d = initialChance;
    			continue;
    		}
    		a += initialChance;
    		b += initialChance;
    		c += initialChance;
    		d += initialChance;
    		random =  rand() % 100;
    		if (e > random){
    			success++;
    			e = initialChance;
    			continue;
    		}
    		a += initialChance;
    		b += initialChance;
    		c += initialChance;
    		d += initialChance;
    		e += initialChance;
    		random =  rand() % 100;
    		if (f > random){
    			success++;
    			f = initialChance;
    			continue;
    		}
    		a += initialChance;
    		b += initialChance;
    		c += initialChance;
    		d += initialChance;
    		e += initialChance;
    		f += initialChance;
    		random =  rand() % 100;
    	}
    	std::cout << success << std::endl;
    	char* character = new char;
    	std::cin >> character;
    		
    	
    
    	return 0;
    }


    So if beuny's test are accurate, I just found some mayor stupidity in the code.

    As you can see, the last method works perfectly for just 1 crystallis, I will later work out the chance for Xx crystallis, though anyone can do it if they know any basic c++ with that code.
    Last edited by Shamanics; 07-02-2013, 06:07 PM.

    Comment


    • #32
      Ok, this needs a separate thread now.
      ModDota | My GitHub Profile | My Project's Page

      Comment


      • #33
        As an extra, my method shows 40% probability for 2 crystallis and 56% for 3 crystallis, for 4 it is 68% and for 5 it is 77.8%.

        Comment


        • #34
          Originally posted by Shamanics View Post
          So if beuny's test are accurate, I just found some mayor stupidity in the code.
          What that boils down to is the first PRD crit chance starting at 11%, not 5.5%.

          Which means that 6 Crits will proc 84% of the time.

          When I *think* that they should only proc 78.5% of the time.
          Originally posted by fletcher
          Just to clarify, there was never any "win rate" calculation. Ever. It is true that a goal of matchmaking is to make even teams. The matchmaker also will raise your Elo and try to put you in players of equivalent skill, which indirectly tries to get the win rate to 50%. However, it has never looked at your historical win rate and put you in a game where it knew that you were expected to lose.
          Is every post on this forum about the Dunning-Kruger effect?

          Comment


          • #35
            Originally posted by magicmerl View Post
            What that boils down to is the first PRD crit chance starting at 11%, not 5.5%.

            Which means that 6 Crits will proc 84% of the time.

            When I *think* that they should only proc 78.5% of the time.
            No, the third piece of code shows some fucked up shit.

            Each crystallis increases the counter for previous crystallis that attempted to get a crit and only 1 dice is rolled for all crystallises, it is probably wrong somewhere but the chance aligned so nicely that I posted that result.

            Comment


            • #36
              What this comes down to is that valve don't know how to number or statistic. Which I'm pretty sure we all already knew. They couldn't even use a piecewise function for armour!!

              I would not be surprised in the least if they screwed it up that badly.
              Comprehensive Damage Reduction & Amplifications Dota 2 Guide

              Comment


              • #37
                they cant even count 3... statistics? that's too advanced

                Comment


                • #38
                  Originally posted by Shamanics View Post
                  No, the third piece of code shows some fucked up shit.

                  Each crystallis increases the counter for previous crystallis that attempted to get a crit and only 1 dice is rolled for all crystallises, it is probably wrong somewhere but the chance aligned so nicely that I posted that result.
                  EDIT: Actually, I'll just counter your hypothesis by testifying that double proc can occurs in DotA2, as such the first/third code is definitely false because they don't allow for multiple proc.


                  I think a more likely code (assuming that there's something similar to PRD stacking faster with more Crystalys) is that there's only Crystalys-Critical ability that the item itself calls for
                  And each time it's called it just does a simple

                  random
                  see if it crit
                  if yes then reset PRD stack
                  if not +1 stack
                  (I'm too lazy to write in C - .-)

                  ^This would be more in line with your explanation of "Each crystallis increases the counter for previous crystallis that attempted to get a crit"

                  This would certainly allow you to get the PRD stack faster with multiple copy of the same item (and also allow for multiple proc at the same time still, this matters because as I've mentioned in the orb/crit/bash guide, multiple bash do stacks and given how similar it is to crit I see no reason for Valve to use similar coding for both PRD)

                  And with this one to test for multiple copy of crystalys you just do a for loop however many copies of crystalys you have in there, but making sure that the counter for success is checked via boolean so it only goes up 1 per run through regardless of how many procs occured.

                  EDIT2: Basing it on the code #2 of Shamanics, too lazy to run it myself though ' 3'
                  Code:
                  #include "stdafx.h"
                  #include <stdio.h>      /* printf, scanf, puts, NULL */
                  #include <stdlib.h>     /* srand, rand */
                  #include <time.h>       /* time */
                  #include <iostream>
                  
                  
                  int _tmain(int argc, _TCHAR* argv[])
                  {
                  	bool boolean = false;
                  	long tries = 10000000;
                  	long success = 0;
                  	double random = 0;
                  	double initialChance = 5.57;
                  	double prd = initialChance; //<-btw Shamanics, your previous code make all crit starts at 0% chance to proc on the first run . -.
                          int cryst = 6;  //Edit this to accommodate however many crystalys you want to have in your inventory for testing.
                          int a = 0;
                  
                  	while (tries != 0){
                  		boolean = false;
                  		tries--;
                                  for (a = 0; a < cryst; a++)
                                  {
                   		     random =  rand() % 100;
                  		     if (prd > random){
                  		    	     prd = 0;
                  			     boolean = true;
                  		     }
                  		     prd += initialChance;
                                  }
                  
                  		if (boolean){
                  			success++;
                  		}
                  	}
                  	std::cout << success << std::endl;
                  	char* character = new char;
                  	std::cin >> character;
                  Last edited by RoflCat; 07-03-2013, 05:24 AM.
                  Every time someone make a false report.
                  Making people's losses feel worse with just my name (don't ask me how it work, I certainly don't)

                  Currently observed Orb(Unique Attack Modifiers), Critical, and Bash interactions for DotA2

                  To:
                  People who cry MM isn't fair: Maybe you're not as great as you make yourself to be.
                  People who wants surrender: It exists, but I'm not teaching you how to do it.

                  Comment


                  • #39
                    ^Damn, source? It fitted all so nicely....

                    Comment


                    • #40
                      I think what we face here is just like what Axe doing with Double Vanguard, right? You already know that Vanguard has 70% block chance, so if we got double Vanguard, it won't get that freaking 140% chance right? That's why we call double vanguard stacks, but not linearly.

                      So, what really happened if we got Double Vanguard?
                      If a hero carries 2 Vanguards, the possible chance to block 40/20 damage for melee/range is 91%.
                      Here's the calculation according to Diminishing Return :

                      Code:
                      1 - [(1-0.7)*(1-0.7)]
                      = 1 – [ 0.3 * 0.3 ]
                      = 1 – 0.09
                      = 0.91
                      = 91%
                      So how about 3 Vanguards? (I know, ain't nobody got time for that, but at least this is just for comparison)

                      Code:
                      1 - [(1-0.7)*(1-0.7)*(1-0.7)]
                      = 1 - [ 0.3 * 0.3 * 0.3]
                      = 1 - 0.027
                      = 0.973
                      = 97.3%
                      See? It won't get 100% lol.
                      But how about we use this Diminishing Return to freaking 2,3,4,5,6 Crystalys stacks problem?

                      1 Crystalys = 20%

                      2 Crystalys = 36%
                      Code:
                      1 - [(1-0.2)*(1-0.2)]
                      = 1 - [ 0.8 * 0.8 ]
                      = 1 - 0.64
                      = 0.36
                      = 36%
                      3 Crystalys = 48.8%
                      Code:
                      1 - [(1-0.2)*(1-0.2)*(1-0.2)]
                      = 1 - [ 0.8 * 0.8 * 0.8 ]
                      = 1 - 0.512
                      = 0.488
                      = 48.8%
                      4 Crystalys = 59.04%
                      Code:
                      1 - [(1-0.2)*(1-0.2)*(1-0.2)*(1-0.2)]
                      = 1 - [ 0.8 * 0.8 * 0.8 * 0.8 ]
                      = 1 - 0.4096
                      = 0.5904
                      = 59.04%
                      5 Crystalys = 67.232%
                      Code:
                      1 - [(1-0.2)*(1-0.2)*(1-0.2)*(1-0.2)*(1-0.2)]
                      = 1 - [ 0.8 * 0.8 * 0.8 * 0.8 * 0.8 ]
                      = 1 - 0.32768
                      = 0.67232
                      = 67.232%
                      6 Crystalys = 73.7856%
                      Code:
                      1 - [(1-0.2)*(1-0.2)*(1-0.2)*(1-0.2)*(1-0.2)*(1-0.2)]
                      = 1 - [ 0.8 * 0.8 * 0.8 * 0.8 * 0.8 * 0.8 ]
                      = 1 - 0.262144
                      = 0.737856
                      = 73.7856%
                      Conclusion
                      1. Multiple Crystalys stacks but NOT linearly.
                      2. What does DotaCinema claims is true.

                      edit : DotaCinema didn't state that Critical Strike stacks linearly. They just said that Critical Strike stacks.
                      Last edited by kadektop2; 07-04-2013, 03:36 AM.

                      Comment


                      • #41
                        Originally posted by kadektop2 View Post
                        edit : DotaCinema didn't state that Critical Strike stacks linearly. They just said that Critical Strike stacks.
                        They still did claim that average proc chance for 1 crys is 20%, for 2 is 40%, for 3 is 60% and made a vid of critting 10+ times in a row with 6 crys (you can prove them wrong by making a vid of not critting a couple of times with 6 crys, but who cares) so it is somehow claiming that crit stacks linearly.

                        However, PRD being increased for every crystalys before the "failing" one needs another thread.

                        Comment


                        • #42
                          Originally posted by GermanViet View Post
                          P(1 Crystalys) = 20%
                          P(2 Crystalys) = P(1 Crystalys) + 80% * 20% = 36%
                          P(3 Crystalys) = P(2 Crystalys) + 80% * 80% * 20% = 49%
                          P(4 Crystalys) = P(3 Crystalys) + 80% * 80% * 80% * 20% = 59%
                          P(5 Crystalys) = P(4 Crystalys) + 80% * 80% * 80% * 80% * 20% = 67%
                          P(6 Crystalys) = P(5 Crystalys) + 80% * 80% * 80% * 80% * 80% * 20% = 74%

                          This is how stacked battlefuries (no skill cleaves!) work in WC3 DotA. I don't know if this applies to crit as well. If yes these are the correct percentages.

                          F* u blash!

                          This is how I always thought crits and cleaves stacked.

                          Comment


                          • #43
                            Originally posted by Synaptic View Post
                            This is how I always thought crits and cleaves stacked.
                            cleave? they stack independently

                            Comment

                            Working...
                            X