Commit e4d5a340 authored by uudlo's avatar uudlo

Remove tracking of participations

This is not needed because the rd is capped by the start_rd
parent f3b6dd24
......@@ -142,10 +142,6 @@ def _glicko2(players, periods, glicko2):
for player in players:
ratings[player] = [glicko2.create_rating()]
participated_game = {}
for player in players:
participated_game[player] = False
for period in periods:
updates_opponents = {}
updates_results = {}
......@@ -167,15 +163,8 @@ def _glicko2(players, periods, glicko2):
updates_opponents[game.player2].extend([rating0])
updates_results[game.player2].extend([1-game.won])
participated_game[game.player0] = True
participated_game[game.player1] = True
participated_game[game.player2] = True
for player in players:
if participated_game[player]:
ratings[player].append(glicko2.update_rating(ratings[player][-1], updates_opponents[player], updates_results[player]))
else:
ratings[player].append(ratings[player][-1])
ratings[player].append(glicko2.update_rating(ratings[player][-1], updates_opponents[player], updates_results[player]))
return ratings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment