Skip to content

Commit 5a4d888

Browse files
committed
Minor fixes
1 parent f08528c commit 5a4d888

2 files changed

Lines changed: 18 additions & 13 deletions

File tree

codeclash/analysis/metrics/elo.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,22 +168,27 @@ def main(log_dir: Path, k_factor: int, starting_elo: int, weighting_function: st
168168
]
169169
print("\n".join(sorted(lines)))
170170

171-
# Weighted average ELO per player across all games
171+
# ELO per player across all games
172172
weighted_elo = {}
173173
total_games = {}
174174
for profile in player_profiles.values():
175175
mid = profile.model
176176
weighted_elo[mid] = weighted_elo.get(mid, 0) + profile.rating * profile.rounds_played
177177
total_games[mid] = total_games.get(mid, 0) + profile.rounds_played
178178

179-
print("\nWeighted average ELO per player (across all games):")
179+
print("\nELO per player (across all games):")
180180
calc_avg_elo = lambda total_elo, games: total_elo / games
181-
lines = [
182-
f" - {pid}: Weighted Avg ELO {calc_avg_elo(weighted_elo[pid], total_games[pid]):.1f} (Games: {total_games[pid]})"
183-
for pid in weighted_elo
184-
if total_games[pid] > 0
185-
]
186-
print("\n".join(sorted(lines)))
181+
lines = sorted(
182+
[
183+
f"{pid}: {calc_avg_elo(weighted_elo[pid], total_games[pid]):.1f} (Games: {total_games[pid]})"
184+
for pid in weighted_elo
185+
if total_games[pid] > 0
186+
],
187+
key=lambda x: float(x.split(":")[1].split("(")[0]),
188+
reverse=True,
189+
)
190+
for i, line in enumerate(lines, 1):
191+
print(f"{i}. {line}")
187192

188193

189194
if __name__ == "__main__":

configs/scripts/main_tracker.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,27 @@
5252
"claude-sonnet-4-5-20250929.grok-code-fast-1": "10 (152 rounds)",
5353
"claude-sonnet-4-5-20250929.gemini-2.5-pro": "10 (154 rounds)",
5454
"claude-sonnet-4-5-20250929.glm-4-5": "0 (0 rounds)",
55-
"claude-sonnet-4-5-20250929.gpt-5": "3 (35 rounds)",
55+
"claude-sonnet-4-5-20250929.gpt-5": "2 (32 rounds)",
5656
"claude-sonnet-4-5-20250929.gpt-5-mini": "10 (160 rounds)",
5757
"claude-sonnet-4-5-20250929.qwen3-coder-plus-2025-09-23": "0 (0 rounds)",
5858
"claude-sonnet-4-5-20250929.o3": "3 (42 rounds)",
5959
"gemini-2.5-pro.grok-code-fast-1": "12 (177 rounds)",
6060
"glm-4-5.grok-code-fast-1": "0 (0 rounds)",
6161
"gpt-5.grok-code-fast-1": "11 (167 rounds)",
6262
"gpt-5-mini.grok-code-fast-1": "10 (160 rounds)",
63-
"grok-code-fast-1.qwen3-coder-plus-2025-09-23": "10 (120 rounds)",
63+
"grok-code-fast-1.qwen3-coder-plus-2025-09-23": "11 (158 rounds)",
6464
"grok-code-fast-1.o3": "10 (158 rounds)",
6565
"gemini-2.5-pro.glm-4-5": "0 (0 rounds)",
66-
"gemini-2.5-pro.gpt-5": "10 (147 rounds)",
66+
"gemini-2.5-pro.gpt-5": "12 (182 rounds)",
6767
"gemini-2.5-pro.gpt-5-mini": "10 (160 rounds)",
68-
"gemini-2.5-pro.qwen3-coder-plus-2025-09-23": "10 (134 rounds)",
68+
"gemini-2.5-pro.qwen3-coder-plus-2025-09-23": "12 (166 rounds)",
6969
"gemini-2.5-pro.o3": "10 (160 rounds)",
7070
"glm-4-5.gpt-5": "0 (0 rounds)",
7171
"glm-4-5.gpt-5-mini": "0 (0 rounds)",
7272
"glm-4-5.qwen3-coder-plus-2025-09-23": "0 (0 rounds)",
7373
"glm-4-5.o3": "0 (0 rounds)",
7474
"gpt-5.gpt-5-mini": "10 (155 rounds)",
75-
"gpt-5.qwen3-coder-plus-2025-09-23": "6 (80 rounds)",
75+
"gpt-5.qwen3-coder-plus-2025-09-23": "9 (127 rounds)",
7676
"gpt-5.o3": "10 (160 rounds)",
7777
"gpt-5-mini.qwen3-coder-plus-2025-09-23": "10 (160 rounds)",
7878
"gpt-5-mini.o3": "10 (160 rounds)",

0 commit comments

Comments
 (0)