Closed jcquarto closed 9 years ago
A player is an arbitrary object. player.team
means that just the index of a rating group where the player belongs to. In the above case, teams are [0, 0, 1]
.
@jcquarto Did my reply help you? If so, close this issue please. If you don't respond for a week, I'll close it myself.
in the api docs there's a reference to rating_groups, and the code:
calculate new ratings
rating_groups = [{p1: p1.rating, p2: p2.rating}, {p3: p3.rating}] rated_rating_groups = env.rate(rating_groups, ranks=[0, 1])
save new ratings
for player in [p1, p2, p3]: player.rating = rated_rating_groups[player.team][player]
where does player.team come from? this seems pulled out of thin air ...