Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

three or more players ranks probability #35

Open
dotcom opened this issue Jan 8, 2019 · 6 comments
Open

three or more players ranks probability #35

dotcom opened this issue Jan 8, 2019 · 6 comments

Comments

@dotcom
Copy link

dotcom commented Jan 8, 2019

I think, if I want to calculate the win percentage for two players, I should calculate the difference distribution.
X - Y ~ N(μ1 - μ2, σ12 + σ22)
I think that it is sufficient to definitely integrate N in the interval of 0 or more.

But, if game is contained three or more players, how should I predict the ranking probability?

a = Rating(mu= m_a, sigma= s_a)
b = Rating(mu= m_b, sigma= s_b)
c = Rating(mu= m_c, sigma= s_c)

# I want to calculate the probability that rank c > b > a.
@dotcom dotcom changed the title probability three or more players ranks probability Jan 8, 2019
@sublee
Copy link
Owner

sublee commented Jan 8, 2019

Simply isn't it P(c>b) * P(b>a)?

@dotcom
Copy link
Author

dotcom commented Jan 9, 2019

In general,
P(c>b>a) = P(b>a|c>b)P(c>b) ≠ P(c>b)P(b>a)
Because "simply P(b>a)" differs from "P(b>a) with b that satisfies c>b" .

P(c>b>a) can be evaluated using the multivariate normal cumulative distribution function
X = C - B
Y = B - A
We want P(X>0, Y>0).
However, computing multivariate normal cumulative distribution function is so difficult.

4 variables example:
P(d>b>c>a) = P(d>b|b>c,c>a)P(b>c|c>a)P(c>a)

ok, I will make an effort to consider whether it can be implemented and send a pull request, if you hope.

>>> a = Rating()
>>> b = Rating()
>>> c = Rating()
>>> ranks_probability([(a,)(b,),(c,)], ranks=[0,1,2])
0.1210593088888

Probrem

  • At this time, how to evaluate the team rate is a problem.
  • and, How should we evaluate the rating of an asymmetric team?
  • If the number of variables is too large, there is a possibility that the calculation amount will be too high.

@sublee
Copy link
Owner

sublee commented Jan 9, 2019

Oh, awesome! Thank you for letting me know my mistake.

The function ranks_probability looks good but I don't want to adopt it as a part of this library. There are 2 reasons:

  • This library is just a transparent implementation of the TrueSkill paper. In my perspective, it should not provide any additional functionality.
  • As you mentioned, the function is hard to apply every valid conditions in TrueSkill such as 3v2v1 or 1v1v1v1v...v1.

Instead, would you paste the function as code at this issue?

@dotcom
Copy link
Author

dotcom commented Jan 9, 2019

ok. I agree with the implementation philosophy that this library is a transparent implementation of Trueskill.
I will only discuss (or paste function) the implementation here on this matter.

@sublee
Copy link
Owner

sublee commented Jan 9, 2019

Thanks for your kindness!

@lukebyrne
Copy link

@dotcom did you ever get around to a ranks_probability method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants