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

Migrate rating system from Topcoder to Elo-MMR #1751

Merged
merged 24 commits into from
Aug 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions judge/ratings.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def solve_idx(i, bounds=VALID_RANGE):
y_tg -= 1. / (TANH_C * delta[j])
# Otherwise, this is a tie that counts as half a win, as per Elo-MMR.
new_p[i] = solve(tanh_terms, y_tg, bounds=bounds)
historical_p[i] = [new_p[i]] + historical_p[i]

# Fill all indices between i and j, inclusive. Use the fact that new_p is non-increasing.
def divconq(i, j):
Expand All @@ -120,7 +119,7 @@ def divconq(i, j):
tanh_terms = []
w_prev = 1.
w_sum = 0.
for j, h in enumerate(historical_p[i]):
for j, h in enumerate([new_p[i]] + historical_p[i]):
quantum5 marked this conversation as resolved.
Show resolved Hide resolved
gamma2 = (VAR_PER_CONTEST if j > 0 else 0)
h_var = get_var(times_ranked[i] + 1 - j)
k = h_var / (h_var + gamma2)
Expand Down