gomoku_rl.utils.elo module

class gomoku_rl.utils.elo.Elo[source]

Bases: object

addPlayer(name: str, rating: float = 1200)[source]
expected_score(player_0: str, player_1: str) float[source]
update(player_0: str, player_1: str, score: float, K: float = 64)[source]
gomoku_rl.utils.elo.compute_elo_ratings(payoff: ndarray, average_rating: float = 1200) ndarray[source]

compute Elo ratings from the payoff matrix

Parameters:
  • payoff (np.ndarray) – win rate matrix of shpe (n,n).

  • average_rating (float, optional) – I play Honor of Kings, so its default value is 1200.

Returns:

(n,) estimated elo ratings

Return type:

np.ndarray

gomoku_rl.utils.elo.compute_expected_score(rating_0: float, rating_1: float) float[source]