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

Players not able to play on differently sized, rebalanced teams? #50

Open
kkoopman3 opened this issue Apr 13, 2022 · 1 comment
Open

Comments

@kkoopman3
Copy link

Hi, I'm attempting to use this implementation to rank rowers. In this sport, oftentimes the same athletes can compete in lineups with 1, 2, 4, or 8 people, and will not always have the same teammates. I assumed I would be able to execute the following code with no issue:

#Womens U17 1x Heat 1
t1 = [trinitywi]
t2 = [annaliedu]
t3 = [summerma]
t4 = [sofiapa]
(trinitywi), (annaliedu), (summerma), (sofiapa) = rate([t1, t2, t3, t4], ranks =[3, 0, 2, 1])

#Womens U17 1x Heat 2
t1 = [selahki]
t2 = [lillydu]
t3 = [malloryst]
t4 = [samanthaca]
(selahki), (lillydu), (malloryst), (samanthaca) = rate([t1, t2, t3, t4], ranks =[0, 1, 2, 3])

#Womens U17 4x
t1 = [lillydu, selahki, tarasc, molliba]
t2 = [mauricapi, lilysp, sarahdu, mariasa]
t3 = [lindsibe, emmacr, noraga, lydiama]
t4 = [hannahed, victoriaal, elliean, charlottecr]
t5 = [arwenmc, oliviaye, emmaha, annawa]
(lillydu, selahki, tarasc, molliba), (mauricapi, lilysp, sarahdu, mariasa), (lindsibe, emmacr, noraga, lydiama), (hannahed, victoriaal, elliean, charlottecr), (arwenmc, oliviaye, emmaha, annawa) = rate([t1, t2, t3, t4, t5], ranks =[0, 2, 4, 3, 1])

However, this returns the following error:

Traceback (most recent call last):
  File "C:\Users\kees\Desktop\TrueSkill\Rowing.py", line 107, in <module>
    (lillydu, selahki, tarasc, molliba), (mauricapi, lilysp, sarahdu, mariasa), (lindsibe, emmacr, noraga, lydiama), (hannahed, victoriaal, elliean, charlottecr), (arwenmc, oliviaye, emmaha, annawa) = rate([t1, t2, t3, t4, t5], ranks =[0, 2, 4, 3, 1])
  File "C:\Users\kees\AppData\Roaming\Python\Python310\site-packages\trueskill\__init__.py", line 700, in rate
    return global_env().rate(rating_groups, ranks, weights, min_delta)
  File "C:\Users\kees\AppData\Roaming\Python\Python310\site-packages\trueskill\__init__.py", line 498, in rate
    layers = self.run_schedule(*args)
  File "C:\Users\kees\AppData\Roaming\Python\Python310\site-packages\trueskill\__init__.py", line 398, in run_schedule
    f.down()
  File "C:\Users\kees\AppData\Roaming\Python\Python310\site-packages\trueskill\factorgraph.py", line 102, in down
    sigma = math.sqrt(self.val.sigma ** 2 + self.dynamic ** 2)
AttributeError: 'tuple' object has no attribute 'sigma'

I would really appreciate insight into why I am thrown an error at the point at which athletes are being combined into larger boats. And if it is indeed because lineups are growing, is there a workaround way to do what I'm trying to do here without error? Thanks.

@katzxx1
Copy link

katzxx1 commented Jul 15, 2022

https://trueskill.org/ This one might help you.

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

2 participants