Skip to content

Commit

Permalink
Print out rating grids for our inspected players
Browse files Browse the repository at this point in the history
  • Loading branch information
anoek committed Jan 12, 2021
1 parent 05a7ddc commit 3c9b0d1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions analysis/analyze_glicko2_one_game_at_a_time_rating_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Computes one game at a time, for all 16 speed / size combinations

import configparser
from analysis.util import (
Glicko2Analytics,
InMemoryStorage,
Expand Down Expand Up @@ -154,6 +155,25 @@ def process_game(self, game: GameRecord) -> Dict[str, Glicko2Analytics]:
print(">>>>>>>>>>>>> %s <<<<<<<<<<<<<" % k)
tallies[k].print()

fname = "players_to_inspect.ini"
ini = configparser.ConfigParser()
ini.optionxform = lambda s: s # type: ignore
ini.read(fname)
for name in ini['ogs']:
id = int(ini['ogs'][name])
print('')
print('%s' % name)
for size in (999, 9, 13, 19):
line = ''
for speed in (999, 1, 2, 3):
k = '%d-%d' % (speed, size)
entry = storages[k].get(id)
line += '%.0f\t' % entry.rating
print(line)

print('')


self_reported_ratings = tallies['999-999'].get_self_reported_rating()
if self_reported_ratings:
aga_1d = (self_reported_ratings['aga'][30] if 'aga' in self_reported_ratings else [1950.123456])
Expand Down

0 comments on commit 3c9b0d1

Please sign in to comment.