Conquer Club

show ratio of opponents beaten to games lost in profile

Suggestions that have been archived.

Moderator: Community Team

Re: show ratio of opponents beaten to games lost in profile

Postby FarangDemon on Mon Dec 15, 2008 2:12 pm

lackattack wrote:Very interesting. I think "farang%" might have the best qualities then:

* Goes from 0% to 100% (well, I suppose 99% is max) where 50% is "average"
* Weighs in difficulty of wins and difficulty of losses

Downside #1: Hard to compute. Can anyone derive a formula or algorithm for this?



NOTE: In the meantime I've found a simpler, more practical way to approximate the percentile and I have described this practical method in one of the following posts. Read this post at your own risk if you are interested in how to find the exact calculation out of pure mathematical curiosity, because it is too tedious to code and does not scale for large numbers of games.

Calculation of expectation uses binomial probability.

Probability of k successes in n trials with each trial having probability of success p:

P_n(k)=(n choose k) * p^k * (1-p)^(n-k)

What makes our problem a little more difficult is that we can have 7 different values of p floating around at the same time (1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8). For example, to calculate the probability of winning 10 games from 6 2-player games and 7 3-player games, you could get 10 wins four different ways: (6-4), (5-5), (4-6) or (3,7) where the first number means 2-player wins and the second number means 3-player wins. So it is necessary to implement the above function multiple times with different parameters and then sum up the results to determine the probability of getting that many wins any which way. I think creative construction of FOR loops could automatically do this.

Next is an example of how to use Binomial Theorem to do the exact calculation using multiple p-values. So if you have two 3-player games and one 8-player game...

note: P(n,k,p) below refers to the binomial probability formula above

P(3-0) = p(win 2 of 2 3-player games) * p(win 1 of 1 8-player games) = P(n=2, k=2, p=1/3) * P(n=1, k=1, p=1/8)

P(2-1) = p(win 2 of 2 3-player games) * p(win 0 of 1 8-player games) + p(win 1 of 2 3-player games) * p(win 1 of 1 8-player games) = P(n=2, k=2, p=1/3) * P(n=1, k=0, p=1/8) + P(n=2, k=1, p=1/3) * P(n=1, k=1, p=1/8)

P(1-2) = p(win 1 of 2 3-player games) * p(win 0 of 1 8-player games) + p(win 0 of 2 3-player games) * p(win 1 of 1 8-player games) = P(n=2, k=1, p=1/3) * P(n=1, k=0, p=1/8) + P(n=2, k=0, p=1/3) * P(n=1, k=1, p=1/8)

P(0-3) = p(win 0 of 2 3-player games) * p(win 0 of 1 8-player games) = P(n=2, k=0, p=1/3) * P(n=1, k=0, p=1/8)

SIMPLE APPROXIMATION THAT MIGHT WORK

To avoid this complexity, a simple approximation we could try out would be to limit the problem to just one probability of winning p = geometric mean of the probabilities of winning each game played. That would mean if you played 2 3-player games and 1 8-player game, p = 3rd root of ( (1/3)^2 * (1/8)^1) = 0.24


Then you don't have to write all those FOR loops, you just use the binomial probability formula once to compute the probability of winning k times. Sum all the probabilities of all the k-values below your score to determine your percentile.

P_n(k)=(n choose k) * p^k * (1-p)^(n-k)

Comparison

exact vs approx

3-0 = 99th vs 99th
2-1 = 84th vs 85th
1-2 = 39th vs 44th
0-3 = 0th vs 0th
Last edited by FarangDemon on Tue Dec 16, 2008 9:38 am, edited 3 times in total.
User avatar
Brigadier FarangDemon
 
Posts: 700
Joined: Wed Apr 23, 2008 1:36 am

Re: show ratio of opponents beaten to games lost in profile

Postby FarangDemon on Mon Dec 15, 2008 2:18 pm

Ditocoaf wrote:Couldn't we simply take basic win %, and use opponents instead of games? [opponents beaten]/[opponents played]. This way, winning 8-player games is still better than winning 3-player games, but if you win enough 1v1's, it works out the same.

So in lack's above example, Player A (who won a 3-player and lost a 3-player) would have 50%. Player B (who lost a 3-player and won an 8-player) would have 77.8%.

I've come into this thread a little late and only skimmed, so excuse me if this has been suggested before...


No that is not a meaningful metric.

If you play 8 player games, you on average win 1/8 games. So in 8 games, you win one, beating 7 guys. In total you have played 8 games * 7 opponents so you have played 56 opponents. 8/56 = 1/7. If you play 1 on 1, you on average win 4 games, meaning 4/8 = 1/2.
User avatar
Brigadier FarangDemon
 
Posts: 700
Joined: Wed Apr 23, 2008 1:36 am

Re: show ratio of opponents beaten to games lost in profile

Postby porkenbeans on Mon Dec 15, 2008 4:41 pm

I think the best way to represent a players % is to only take in to account # of opponents defeated verses # of opponents lost to. This way, if a player wins a 3 player game, he is credited with 2 wins, because he beat 2 players. If he looses a 3 player player game, he is credited with 1 loss, because he lost to 1 player, NOT 2.

So if you take lacks' example of
player A.) wins a 3 man and looses a 3- man.
player B.) wins a 3 man and looses an 8-man.

Both players are at 2/1, and I understand that that does'nt tell the true story of who is the better player. But you must take in to account that this is only two games, so, if you were to look at these same two players after say, 50 games, the stats will bear out correctly, and show precisely the better player. You will get a score that looks like this- 25/25 or simplified to 0. This would mean that this player is a perfect example of an average player, in that he wins as much as he looses.
If his score is 30/20, or simplified to +10. This would mean that he is better than average, in that he is ahead 10 wins overall.
If a players score is 20/30, or simplified to -10, this would mean that this player is below average in that he looses more than he wins.

The only thing that this system will not show is, the average rank of opponents. So i would suggest that you place that information right next to this score.
If this system was used, It would be very easy to, at a glance, sum up a players strength. And it can be easily calculated on a running basis, without the need to re-calculate games played. This would be a running tally that only needs addition or subtraction after each game is completed.
Image
User avatar
Lieutenant porkenbeans
 
Posts: 2546
Joined: Mon Sep 10, 2007 4:06 pm

Re: show ratio of opponents beaten to games lost in profile

Postby FarangDemon on Tue Dec 16, 2008 9:20 am

Ok, with large numbers of games, even the approximation I refer to in my previous posting does not scale, because it would require doing factorials with large numbers.

But excellent news, sportsfans! I found a way to easily derive the percentile using an approximation of binomial probability to a normal distribution.

http://en.wikipedia.org/wiki/Binomial_probability

So just one simple formula to find the Z score that is scalable for large numbers of games (no factorials or exponents). Then you just need to convert the Z score to a percentile by looking it up in a Z table which could easily be hard coded if the functionality is not provided in a math package. Site I used to do the Z score to percentile conversion: http://www.acposb.on.ca/conversion.htm

Normal Approximation to Binomial Distribution:

n = total games
k = games you have won
p = (product of all 1/x's for every x-player game you have played) ^ (1/n)
q = 1-p


Z = (k - np) / sqrt(npq)

You just have to look up the percentile on a Z table.

If you use (k - np - 0.5) it will low ball you, telling you the percentage of guys you are definitely better than. If you use (k - np + 0.5) it will high ball you, telling you the percentage of guys that are definitely not better than you. You can play around with these options but I'd suggest just using it without this corrective factor as that should provide your median performance - so if you are dead average you should get a 50%.
User avatar
Brigadier FarangDemon
 
Posts: 700
Joined: Wed Apr 23, 2008 1:36 am

Re: show ratio of opponents beaten to games lost in profile

Postby FarangDemon on Fri Dec 26, 2008 5:37 am

My proposed metric, as stated above, only makes sense for non-Terminator games. Any metric that takes Terminator games into account would have to award credit for every kill, regardless of whether that player ultimately went on to win the game.

One way to incorporate Terminator games into the metric would be to consider every terminator kill as a one-on-one win and every terminator loss as a one-on-one loss. To count them as individual one-on-one games makes sense from a probability standpoint because, according to expectation, each player would terminate another player just as often as he/she would be terminated. In this way, every Terminator kill is rewarded. So if you kill 3 guys in a 6 player terminator but get killed in the end, you have a 3-1 record for one-on-one games.
User avatar
Brigadier FarangDemon
 
Posts: 700
Joined: Wed Apr 23, 2008 1:36 am

Re: show ratio of opponents beaten to games lost in profile

Postby FarangDemon on Sat Feb 07, 2009 7:12 am

Mods/Lack,

It's been more than a month since I've posted the simplified calculation that Lack has requested.

Just want to remind you.

For the past 3 years, score has been meaningless and win rate has been meaningless.

This is a simple, statistically sound, unbiased way to measure how much more often than expected a player was able to win. Not biased for any number of opponents.

Again, the formula is:

Normal Approximation to Binomial Distribution:

n = total games
k = games you have won
p = (product of all 1/x's for every x-player game you have played) ^ (1/n)
q = 1-p


Z = (k - np) / sqrt(npq)

You just have to look up the percentile on a Z table.
User avatar
Brigadier FarangDemon
 
Posts: 700
Joined: Wed Apr 23, 2008 1:36 am

Re: show ratio of opponents beaten to games lost in profile

Postby Jeff Hardy on Sat Feb 07, 2009 7:26 pm

in team games it should be team defeated instead of players defeated
General Jeff Hardy
 
Posts: 1338
Joined: Sun Feb 17, 2008 10:22 am
Location: Matt Hardy's account, you can play against me there

Re: show ratio of opponents beaten to games lost in profile

Postby FarangDemon on Sun Feb 08, 2009 2:29 am

Jeff Hardy wrote:in team games it should be team defeated instead of players defeated


Yes, that is what I mean. So a 2v2v2v2 game would count as 4-player game for these calculations.
User avatar
Brigadier FarangDemon
 
Posts: 700
Joined: Wed Apr 23, 2008 1:36 am

Re: show ratio of opponents beaten to games lost in profile

Postby Woodruff on Sun Feb 08, 2009 3:57 pm

Fruitcake also has a good thought on this (I didn't see him posting here), that he's outlined in this thread:

http://www.conquerclub.com/forum/viewtopic.php?f=4&t=76271
User avatar
Corporal 1st Class Woodruff
 
Posts: 5093
Joined: Sat Jan 05, 2008 9:15 am

Re: show ratio of opponents beaten to games lost in profile

Postby lackattack on Wed Feb 11, 2009 6:07 pm

As much as I enjoyed reading the binomial probability approach to deriving expected wins (although that "n choose k" part game me a nasty flashback to math classes I've long forgotten about) I much prefer the normal approximation. Thanks for developing this suggestion, FD!

Unfortunately it is too much work at this point to get into Terminator kills, we would have to just consider overall winner like how we currently do for game achievement medals.

I haven't used a Z table in years and could use some help here. Let's say I calculate (k - np) / sqrt(npq) and I have a Z table like this one http://www.intmath.com/Counting-probability/z-table.php. The numbers in the table only go from 0 to 0.4999. Does that mean I double them to get the percentile?

Also, I found some PHP stats functions but I'm not sure if they are applicable: http://ca2.php.net/manual/en/book.stats.php
User avatar
Corporal 1st Class lackattack
 
Posts: 6097
Joined: Sun Jan 01, 2006 10:34 pm
Location: Montreal, QC

Re: show ratio of opponents beaten to games lost in profile

Postby lackattack on Wed Feb 11, 2009 6:28 pm

Oh, and if we go with a metric of your wins compared to expected wins... we need to give it a catchy, suitable name and a concise yet clear description. Anyone?

How about win rate?
User avatar
Corporal 1st Class lackattack
 
Posts: 6097
Joined: Sun Jan 01, 2006 10:34 pm
Location: Montreal, QC

Re: show ratio of opponents beaten to games lost in profile

Postby FarangDemon on Thu Feb 12, 2009 10:50 am

lackattack wrote:As much as I enjoyed reading the binomial probability approach to deriving expected wins (although that "n choose k" part game me a nasty flashback to math classes I've long forgotten about) I much prefer the normal approximation. Thanks for developing this suggestion, FD!

Unfortunately it is too much work at this point to get into Terminator kills, we would have to just consider overall winner like how we currently do for game achievement medals.

I haven't used a Z table in years and could use some help here. Let's say I calculate (k - np) / sqrt(npq) and I have a Z table like this one http://www.intmath.com/Counting-probability/z-table.php. The numbers in the table only go from 0 to 0.4999. Does that mean I double them to get the percentile?

Also, I found some PHP stats functions but I'm not sure if they are applicable: http://ca2.php.net/manual/en/book.stats.php


You would add 0.5 to that number because it is starting at the mean, which would represent the 50% mark in terms of expectation.

But I just realized something: this metric skews up with the number of games played. So if two players are able to win the same percentage of similar games, the one that played more games will always have a higher rating. Sometimes a much much higher rating.

This is because if you flip a coin many many many times, you would expect to, on average, have about 50-50 heads-tails. The probability of flipping a coin 10 times and getting 7 or more heads is higher than the probability of flipping a coin 100 times and getting 70 or more heads. Flipping a coin 1000 times and getting 700 heads is almost impossible.

But in CC, if someone is able to win 7/10 games we would expect them to also win 70/100 or 700/1000 games under similar settings, so these two players should be getting the same rating.

The chance of winning at least 7/10 1-1 games given 50% expectation per game is around 10%. The chance of winning at least 70/100 is some where around 0.1%.
User avatar
Brigadier FarangDemon
 
Posts: 700
Joined: Wed Apr 23, 2008 1:36 am

Re: show ratio of opponents beaten to games lost in profile

Postby FarangDemon on Thu Feb 12, 2009 11:44 am

So maybe just use the straight-forward wins / expected wins.

number of 2 player games * 1/2 = expected 2 player wins
number of 3 player games * 1/3 = expected 3 player wins
....



You could provide an aggregate measure: total wins / total expected wins.
You could provide a wins / expected wins for 2,3,4,5,6,7,8 player games.

I suggest providing the wins / expected wins for each n-player game in order to provide further detail on the player's ability and show where the aggregate score is coming from.

This way you can compare two player's performance at various game types even if one tends to play 2-player games while the other tends to play 8-player games. If only one aggregate score is computed, this information is lost.
User avatar
Brigadier FarangDemon
 
Posts: 700
Joined: Wed Apr 23, 2008 1:36 am

Re: show ratio of opponents beaten to games lost in profile

Postby Timminz on Thu Feb 12, 2009 11:59 am

I'm not sure how, or even if, this would fit into this discussion, but I've come up with this equation:

X=R^2/(N+R^2)

X, is the win percentage required to maintain score
R, is the ratio of "your score"/"opponents score" (inverse of relative rank)
N, is the number of opponents, with teams being counted as one opponent

example, playing 2 player games against someone of equal score, you get:

R=1
N=1
X= 1^2/(1+1^2) = 1/(1+1) = 1/2 = .5 = 50%

You would need to win 50% to maintain score.

Maybe some of you guys with better math skills than me can figure out how, if at all, this equation could help this suggestion.
User avatar
Captain Timminz
 
Posts: 5579
Joined: Tue Feb 27, 2007 1:05 pm
Location: At the store

Re: show ratio of opponents beaten to games lost in profile

Postby lackattack on Tue Feb 24, 2009 9:38 am

For now I'm just looking for a single stat to replace win%.

FarangDemon wrote:The chance of winning at least 7/10 1-1 games given 50% expectation per game is around 10%. The chance of winning at least 70/100 is some where around 0.1%.

Maybe it is good that farang% skews up with the number of games played?


If we go with [wins / expected wins] how about doing something like this:

Win Performance
This metric is the ratio of [wins / expected wins], where "expected wins" is the number of wins the player should have on average based on the number of games played and how many opponents were in each game. A win performance of 100% means the player wins an average amount of games.


It would range from 0 to 800. New players would tend to have more extreme % and it would tend to move towards 100% as more games are played.

Can anyone suggest a better name, description or range of values?
User avatar
Corporal 1st Class lackattack
 
Posts: 6097
Joined: Sun Jan 01, 2006 10:34 pm
Location: Montreal, QC

Re: show ratio of opponents beaten to games lost in profile

Postby lancehoch on Tue Feb 24, 2009 10:15 am

lackattack wrote:
Win Performance
This metric is the ratio of [wins / expected wins], where "expected wins" is the number of wins the player should have on average based on the number of games played and how many opponents were in each game. A win performance of 100% means the player wins an average amount of games.


It would range from 0 to 800. New players would tend to have more extreme % and it would tend to move towards 100% as more games are played.

Can anyone suggest a better name, description or range of values?

Win performance sounds good, but could you make the range 0.000 -> 8.000? Seeing strange percentages that go higher than 100% seems a little awkward.
Sergeant lancehoch
 
Posts: 4183
Joined: Wed Dec 05, 2007 4:13 pm

Re: show ratio of opponents beaten to games lost in profile

Postby Timminz on Tue Feb 24, 2009 12:24 pm

Would "expected wins" just be a constant for each size game (50% for 1v1, 33% for 3-player. 25% for 4 player, etc.)? or would you want the expectations to line up with score differences as well, since , for example, someone with 2000 points would be "expected" to win 4/5, 1v1's against someone with 1000?
User avatar
Captain Timminz
 
Posts: 5579
Joined: Tue Feb 27, 2007 1:05 pm
Location: At the store

Re: show ratio of opponents beaten to games lost in profile

Postby bedub1 on Thu Feb 26, 2009 1:41 am

Shall I quote the stock market?

"Past performance is no indication of future return"

I haven't read this entire thread since I last posted...but it seems from the recent comments we are pulling away from the threads subject line.....
Colonel bedub1
 
Posts: 1005
Joined: Sun Dec 31, 2006 4:41 am

Re: show ratio of opponents beaten to games lost in profile

Postby Timminz on Thu Feb 26, 2009 11:37 am

bedub1 wrote:it seems from the recent comments we are pulling away from the threads subject line.....

I agree, but I would word it more like, "the suggestion is evolving with discussion."
User avatar
Captain Timminz
 
Posts: 5579
Joined: Tue Feb 27, 2007 1:05 pm
Location: At the store

Previous

Return to Archived Suggestions

Who is online

Users browsing this forum: No registered users