TheXeos commited on
Commit
179e497
1 Parent(s): 6ac0a0d

Add base file

Browse files
Files changed (2) hide show
  1. env_elos/elo.csv +3 -0
  2. matchmaking.py +3 -2
env_elos/elo.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ model,elo,env
2
+ model1,1200,snowballfight
3
+ ,,
matchmaking.py CHANGED
@@ -11,10 +11,11 @@ class Model:
11
  :param elo: Elo rating of the model
12
  :param games_played: Number of games played by the model (useful if we implement sigma uncertainty)
13
  """
14
- def __init__(self, name, elo):
15
  self.name = name
16
  self.elo = elo
17
  self.games_played = 0
 
18
 
19
 
20
  class Matchmaking:
@@ -46,7 +47,7 @@ class Matchmaking:
46
  self.matches = self.matches.sort_values("datetime")
47
  self.matches.reset_index(drop=True, inplace=True)
48
  model_names = self.matches["model1"].unique()
49
- self.models = [Model(name, self.start_elo) for name in model_names]
50
 
51
  def compute_elo(self):
52
  """ Compute the elo for each model after each match. """
 
11
  :param elo: Elo rating of the model
12
  :param games_played: Number of games played by the model (useful if we implement sigma uncertainty)
13
  """
14
+ def __init__(self, name, elo, env):
15
  self.name = name
16
  self.elo = elo
17
  self.games_played = 0
18
+ self.env = env
19
 
20
 
21
  class Matchmaking:
 
47
  self.matches = self.matches.sort_values("datetime")
48
  self.matches.reset_index(drop=True, inplace=True)
49
  model_names = self.matches["model1"].unique()
50
+ self.models = [Model(name, self.start_elo, self.matches[self.matches["name"] == name].iloc[0]["env"]) for name in model_names]
51
 
52
  def compute_elo(self):
53
  """ Compute the elo for each model after each match. """