Sunday, April 21, 2013

Winning a Major: Just how good do you have to be? (Part 1)

I had originally started this project to put numbers to what we see in fighting game tournaments.  Sure we know top players are really good,  sure we know advantages matter, but the question is "How much do they matter?" or "Just how good are the top players?"

If you read my previous blog post you saw I looked at how advantages effect 2 out of 3 sets as well as 3 out 5 since these were related to tournament success; however, I quickly found the math behind the problem grew too large too fast. So in order to actually get a result I wrote a computer code to simulate multiple tournaments and collect statistics.   The math behind it is a little bulky, but the general idea is straight forward.  Set up a bracket (size chosen by user), run each match, and record the results. Just like a real tournament except this one is controlled through probability.  As I also stated in the last article, I don't want to get too technical because this is meant for a general audience. More technical explanations can be given upon demand (It includes words like Monte Carlo).  I am also planning on releasing the code at a later date, but as of right now it is not the most user friendly.

With this code we can simulate a wide variety of tournaments by adjusting the individual match ups.  By averaging over different tournament brackets it is possible to obtain the probability of winning for a scenario.

Introductory Data



So one of the first cases we can study is a very simple example.  Let's say we have a tournament where every player has the same chance of beating any other player with one exception: You are the one player whose has different odds of beating the other players.  This is actually a rather simple set up, but it gives a great deal of information.

For this data, I took player 1's match up probabilities against everyone else in the tournament and scaled them up incrementally from 5% up to 95%.  Obvious at 0% the result is easy to predict since if you have no chance of winning a match you have no chance of winning a tournament and likewise at 100% if you always win every match up you will never lose a tournament.

I also changed the number of players to look at the effect of the bracket size.  The numbers you see are in powers of 2 since new player slots are introduced when the bracket doubles in size.    The size of a typical major is above 128 while local tournaments are around 8-32.

The data is presented in two ways.  The table contains the raw data and the plot shows a color plot of the same data. The bracket size is on the top.  The bolded percentages is player 1's win rate against the other tournament players (IE for 60% if I played 10 games against any other player I would expect to win 6 out of 10).   The percentages listed are the number of first place finishes out of 100,000 samples.

The contour plot shows the lowest win tournament percentages in blue while the highest are displayed in yellow.  The x axis is the number of players in the bracket and the y axis is the match upwin percentage. 

One of the first ways we can check the data for accuracy is to look for values which we can easily calculate own our own.  The easiest case is when the match win rate is set to 50%.  With the way the bracket was designed,  if player 1 has a 50% win rate then every player has the same chance of winning.   Thus the expected win rate is equal to 1/(# of players).  If you calculate this for each bracket you see the simulation data matches this. So the simulation matches perfectly with the expected value for the easily calculable case.

The first trend of interest is that for any given win rate, as the bracket increases in size the win rate also declines.  This is actually to be expected.  If you have more players you would expect there to be more chances to for you to lose.  While this is obvious, one of the things that was not entirely obvious was large this effect was.   For values less than 50% the result does not change much (Obviously since you lose most of your matches), but for values above 50% there is a very interesting trend.  Smaller win rates drop off much much faster than larger win rates!   

 If you notice at 60% for a small local you have a very reasonable chance of winning, but by the time you scale it up to the size of a major a 60% match win rate you will win roughly 1 out of every 20.  This means that even if you are the best player if you are only slightly better you will still lose more majors than you win.  A 60% advantage is not nearly enough to be a consistent winner because odds are you will get randomed out in a bracket that size.   In fact only match win rates of 85% or higher actually translate to winning over half of your tournaments consistently. It actually speaks to the skill level of many of the top players when they are able to consistently win or place at majors. They aren't just slightly better,  they have an enormous edge.

This brief examination actually shows us quite a bit of insight.  In order to be a consistent winner you not only need to be just better, you need to be much better than your opponents.   In addition you can actually see for a given bracket size that every little bit helps.  Every advantage you gain over your opponents gives you a much greater chance of coming out in first place and it becomes really pronounced for large brackets.  I graphed the data for the 512 man bracket so it is easy to see.  After 50% the probability of winning a tournament beings to rise a little, but after about 65% it shoots up fast and at that point every additional percentage dramatically increases the chance of winning a major. 


  
I will be going into much more detail in my upcoming posts.  I will be going over probability of placing in the top 8,  how first round byes effect your chances of winning,  what happens when a top player is in your bracket,  and other related topics.  Hope to see you guys again.


 

 Q&A



Q: But what if (Insert Player Here) has a bad day and gets knocked out early?

A:  This method actually takes that into account.  When we talk about win rates that includes fluke losses.  I mean if a player like Daigo had a 96% win rate against other players that 4% are the rounds where Daigo had an off game and there is a small chance that he could have two bad games in a set resulting in getting knocked into losers early.    This is all accounted for by the numbers.

Q:  Well in a real bracket I'm going to have a lot of varying win rates.  So why is this any good?

A: Yes in a real bracket you do, but the thing is the tournament win rate is still related to what you see.  For instance if half your match win rates are 60% and the other half are 50% then your tournament rate is in between 50% and 60%, but you would expect a higher deviation.  In other words it becomes bracket dependent.   You could have all your advantaged match ups on your side of the bracket and like wise you can have all your even match ups.   But at worst you will have the 50% probability and at best you will have the 60%.

More detailed situational data will be presented in the later additions.  Right now this is still very general.  

Q: But what about character advantages?  How does that factor into this

A:  That is also taken care of by the numbers.   If I am equal skill to my opponent and we are playing a match up that is bad for his character it will be reflected by my win rate vs his win rate.






16 comments:

  1. Excellent post.
    I hereby asking you to share your code and if possible the equations you're using.
    I believe that you can even publish a somewhat more elaborated paper about this in a conference about statistics.

    Kudos.

    ReplyDelete
    Replies
    1. I will share the code after a couple modifications to it. As of right now the design is not really user friendly so I am trying to improve that portion.

      I also want to add a few more features.

      I will be discussing the algorithm in a supplementary post with greater detail so people get a clear idea what the program is doing.

      Delete
  2. Looking forward to Part 2 and seeing the spreadsheet being all of this.

    ReplyDelete
  3. This is a loosely related tangent, so apologies in advance:

    A player ranking list by "win to rate ratio in tournament" seems reasonable and easy to calculate (just need the wins and losses of the majors from the last year, or six months, from instance)

    By your work, this can be easily translated to a predictive number: ¿who has the best chance of winning the next major according to their performance during the last year, and what is this chance?

    If the pool of data is reasonably large, this would compensate for the flaws of traditional additive ranking systems (such as X amount of points for 1st place, X/2 for 2nd, X/3 for 3rd, etc... and add up the last N tournaments to determine the current best player on a given game). The win/loss ratio does not have the main flaw of the additive systems, which is to over compensate players for the amount of tournaments they have entered (get 3rd on 8 tournaments and you're ranked higher than the player who got 1st but only entered 2 majors).

    I would love to see such list of win/loss ratios and the probability-of-winning-next-major for the top players (¿maybe top 100?).



    To go way off on the tangent:
    ¿Have you considered using an ELO-type system to rank players according to their tournament performances?

    I hear now and then about how to rank the top players in an "objective" way and the chess players seem to somehow have solved that problem years ago.

    I'm partial to the Chessmetrics system: http://www.chessmetrics.com/cm/
    Since it's supposedly pretty good at predicting the outcome of tournaments (and I believe that's the main parameter to evaluate the worth of a ranking system).

    Databases are a little hard to consolidate, but the results of the main yearly majors are not so hard to get (I suppose). Would love to see a prediction on who will win UFGT for instance, using your method.

    ReplyDelete
    Replies
    1. One obvious flaw of using a pure win/loss ratio is that if you get a good win rate in your first tournament, then you can intentionally avoid all future tournaments to maintain your win rate. Imagine if you go unbeaten (in sets or in matches, depending on which win rate you use) in the first tournament of the year; then you should just stop entering tournaments because you can only decrease your win rate. That's probably not what you want for a competitive system. Besides, if someone places 3rd in 8 tournaments, they might very well deserve to be ranked higher than someone who places 1st in only 2 tournaments.

      Delete
    2. Of course, that's an obvious flaw. You'd need to do a much more complex analysis to make a win/loss-ratio based system work through it's many pitfalls.

      Still, for some players right now, those with at least (to throw a figure) 20 tournament matches in the last year, the ratio is actually meaningful. Specially if you weight the average to make recent matches more significant than older (say, weight them linearly with time from 10 to 0 over a year).

      A true ranking system needs to take into account the strength of your opponents (as in an ELO/Chessmetrics system), your win ratio (as in an ELO/Chessmetrics system), the amount of matches you've played (as in the Chessmetrics system) and the date of those mathces (as in the Chessmetrics system).

      I'm just really curious to know, just to make an experiment, using current data; if you can make predictions for future tournaments based on a simple win/loss-ratio system, compared to an intuitive tournament-placing-add-up system.

      Not to establish who's the BEST, but to see if there's something interesting to talk about.

      Delete
  4. Question: What do these numbers tell us about top players?
    Answer: Their chances of winning a major are similar to the figures in the 8-man bracket column.

    The math in this blog post is cool and all, but it's *very* misleading to compare it to a real tournament.

    If you're a top player in a real 512-man bracket, then your chances of winning are close to 100% against the vast majority of the players! Eventually, you get far enough, e.g. you reach top-8, where your chances of winning against the remaining 7 players are similar, and so the math in this blog post can now approximate your real-life scenario. Hence, the figures in the 8-man bracket column may reflect a top player's chances of winning a major, while the figures in the 512-man bracket are not applicable at all!


    What I'd like to see in a future post (on Shoryuken, since I saw this on there) would be the results of a large number of simulations of tournaments with players of varying skill. E.g. you randomly pick "player skill" values from 0 to 100 using some realistic probability distribution -- keeping in mind that the worst players in a tournament are generally a lot better than the worst players ever. Come up with a realistic way to take 2 "player skill" numbers and determine each player's chance of winning. Make a random 512-man bracket, with or without seeding. Then play it out and see how "player skill" translates to tournament results!

    Repeat this many times with the same players and different random brackets. Then repeat all this with different random sets of players. I think there will be interesting information in both the same-players-different-brackets results, and in the overall results. (E.g. you'll probably get a set of players that's like "Chris G vs the world" where the best player's skill is significantly higher than the rest of the players' skills. Those results alone would be really interesting.) And I think that with the right probability choices, the results will be a decent reflection of actual tournament results. Yeah, I'd definitely like to see that. :)

    ReplyDelete
    Replies
    1. Yes that is true which is why I said this is a simple case and I was doing a more specific one later including a study on what happens when other top players are in your bracket.

      I had already thought of most of that.

      Delete
  5. It might be more helpful (or at least more encouraging to the general fighting game player) to do probabilities for reaching a certain round in the tournament. I know you mentioned top 8, but you can do any arbitrary place as well. There is a pretty reasonable way to calculate it exactly:

    For example, the chance of going out in the nth round of the loser's bracket, for n even, is the chance of winning n/2 times, then losing 2 straight, plus the chance of winning n/2 - 1 times, losing 1, winning two more, and losing one more, plus... all the way to winning 1, losing 1, winning n-2, and losing 1, and finally you could lose 1 and win n - 1 straight, and lose 1. Basically, for each round you lose earlier, you have to win one more match, except for round 1 (if you lose in the first round, you don't have to win an extra match compared to if you lost in the 2nd round). For a formula, it would be (sum from i=1:(n/2)-1 of [p^(i+n/2)*(1-p)^2]) + p^(n-1)*(1-p)^2, where p is your probability of winning a set (using the same assumptions, specifically that your chance of winning a match is always the same). For an odd numbered round n, you would have to win one extra game in losers, so you could use the even formula for n-1 and multiply the result by p. Lastly, to make top 8 in a tournament of size 2^n, you'd have to reach the 2*(n-3)rd round of the loser's bracket, so you could either sum up the probabilities of reaching loser's round 2*(n-3) to the finals, or adjust the formula to give the probability of making at least a certain round, instead of losing at a given round exactly.

    Well, that's a mathematical way to do it. (Not that simulated results are bad or anything...)

    ReplyDelete
    Replies
    1. The simulation collects the same information. If done over a large number of runs it converges to the probability you can calculate by hand. The problem is that there are so many branching scenarios in a double elimination tournament that doing it by hand will give you an insanely large equation.

      That's why you can set up a simulation to calculate the probability since it will give you the same results and save your hand from writing. In addition you can study other events that doing by hand may not give you.

      Delete
  6. How is 'win rate' defined? If I open up the options menu on my XBOX and view the win rate there, would that be sufficient? Or are we talking about a win rate as achieved only in tournaments? I may have missed this in the text of this post.

    ReplyDelete
    Replies
    1. In this case it is your win rate vs the player you are playing. For this first study I set all of the rates to the same number, but for future studies you'll see that will not be the case.

      So for instance you could have a win rate of 85% against 30 out of 31 opponents, but the last opponent you could have a 50% win rate. So most of your matches would be in your favor, but as soon as you ran into the 50% player you have a close set on your hands.

      Delete
  7. I would love to try some of this for predicting the EVO results.

    ReplyDelete
  8. If I'm 70% and play against a 30%, I will win 95%, not 70%, just saying. If the game is good I'll win about 99%. If the game is bad/random it will get closer to 50%. Can you really measure and calculate that? Also, what wins tournaments is determination, experience and confidence, not skill; we're not machines. The emotional part counts a whole lot, that's why tough players aren't made only out of skill. Anyway, as a stats lover, I appreciate the article.

    ReplyDelete
    Replies
    1. I think you misunderstand the idea of a win rate.

      First of all win rates as defined in this study are match up specific. For instance Player 1 can have a win rate of 70% against player 2, but have a win rate of 50% against player 3. At the same time player 2 can have a win rate of 75% against player 3.

      Also when I talk about win rates I am talking about if you sat down and played 100 games you would win that percentage. For instance if I had a 70% win rate against you I would expect to take an average of 70 wins out of 100.

      At it's heart a win rate is just a probability of winning.

      Delete
  9. Are you still planning a second part? I'd love to see it.

    ReplyDelete