Class EloRating

java.lang.Object
org.episteme.social.sports.EloRating

public final class EloRating extends Object
Implementation of the Elo rating system for measuring relative skill levels in zero-sum games and sports competitions. Reference: Elo, Arpad (1978). The Rating of Chessplayers, Past and Present.
Since:
1.0
Version:
1.1
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • calculateExpectedScore

      public static double calculateExpectedScore(double ratingA, double ratingB)
      Calculates the expected score (probability of winning) for player A.
      Parameters:
      ratingA - skill rating of player A
      ratingB - skill rating of player B
      Returns:
      expected score between 0.0 and 1.0
    • updateRating

      public static double updateRating(double currentRating, double actualScore, double expectedScore, double kFactor)
      Calculates the newly adjusted rating for a player after a match.
      Parameters:
      currentRating - the previous rating
      actualScore - the outcome (1.0 = win, 0.5 = draw, 0.0 = loss)
      expectedScore - the pre-match probability calculated via calculateExpectedScore(double, double)
      kFactor - the sensitivity factor (e.g., 32 for novices, 16 for masters)
      Returns:
      the updated Elo rating