From f700dc3eac5ad578fa12f11213c2a408db81190b Mon Sep 17 00:00:00 2001 From: Brennan Bibic Date: Sat, 6 Jul 2024 19:49:58 -0400 Subject: [PATCH] tRY FIX AGAIN --- ranked/api/lib.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ranked/api/lib.py b/ranked/api/lib.py index 7ac93dc..d44b5f3 100644 --- a/ranked/api/lib.py +++ b/ranked/api/lib.py @@ -131,12 +131,14 @@ def update_player_elos(match: Match, red_player_elos: List[PlayerElo], blue_play odds_diff = 0 - odds player.matches_lost += 1 - # Introduce a new factor to increase the importance of the score difference + # Increase the importance of the score difference importance_factor = 1.5 + adjusted_score_diff = importance_factor * relative_score_diff elo_change = (( - K / (1 + 0) + 2 * math.log(math.fabs(score_diff) + 1, 8)) * ( - odds_diff * importance_factor * relative_score_diff)) * (((B - 1) / (A ** num_played)) + 1) + K / (1 + 0) + 2 * math.log(adjusted_score_diff + 1, 8)) * ( + odds_diff)) * (((B - 1) / (A ** num_played)) + 1) + elo_changes.append(elo_change) player.elo += elo_change