goochjs / glicko2

Java implementation of the Glicko-2 rating algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

glicko2

OSGi-compatible Java implementation of the Glicko-2 rating algorithm

To use:

  • instantiate a RatingCalculator object
    • at instantiation, you can set the default rating for a player's volatility and the system constant for your game ("τ", which constrains changes in volatility over time) or just accept the defaults
  • instantiate a Rating object for each player
  • instantiate a RatingPeriodResults object
  • add game results to the RatingPeriodResults object until you reach the end of your rating period
    • use addResult(winner, loser) for games that had an outcome
    • use addDraw(player1, player2) for games that resulted in a draw
  • once you've reached the end of your rating period, call the updateRatings method against the RatingCalculator; this takes the RatingPeriodResults object as argument
    • note that the RatingPeriodResults object is cleared down of game results once the new ratings have been calculated
    • participants remain within the RatingPeriodResults object, however, and will have their rating deviations recalculated at the end of future rating periods even if they don't play any games. This is in-line with Glickman's algorithm
  • access the getRating, getRatingDeviation and getVolatility methods of each player's Rating to see the new values
  • repeat steps 4 and 5 for each future rating period

Copyright (C) 2013 Jeremy Gooch http://www.linkedin.com/in/jeremygooch/

The licence covering the contents of this file is described in the file LICENCE.txt, which should have been included as part of the distribution containing this file.

About

Java implementation of the Glicko-2 rating algorithm

License:BSD 2-Clause "Simplified" License


Languages

Language:Java 100.0%