{"id":27839,"library":"glicko2","title":"glicko2","description":"A Python implementation of the Glicko-2 rating system, used for ranking players in games like chess or esports. Current version 2.1.0, requires Python >=3.7. Maintained, release cadence irregular.","status":"active","version":"2.1.0","language":"python","source_language":"en","source_url":"https://github.com/deepy/glicko2","tags":["glicko2","rating","game","chess"],"install":[{"cmd":"pip install glicko2","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Direct import of module does not give attributes; use explicit class import.","wrong":"import glicko2","symbol":"Player","correct":"from glicko2 import Player"}],"quickstart":{"code":"from glicko2 import Player\n\n# Initialize with default rating (1500), rating deviation (200), volatility (0.06)\np1 = Player()\np2 = Player()\n\n# Simulate a match: p1 wins\np1.update_player([p2], [1.0])\np2.update_player([p1], [0.0])\n\nprint(p1.rating, p1.rd, p1.vol)\nprint(p2.rating, p2.rd, p2.vol)","lang":"python","description":"Create two players, simulate a match, and print updated ratings."},"warnings":[{"fix":"Call update_player and then access the updated attributes on the same object.","message":"The Player.update_player() method modifies the player in place; it does not return a new Player object.","severity":"gotcha","affected_versions":"all"},{"fix":"Only call update_player with non-empty opponent lists and corresponding scores.","message":"If you pass an empty list of opponents to update_player, the player's rating will drift toward the mean, which can cause unexpected rating changes.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the Player class and its update_player method instead.","message":"The function glicko2.glicko2() is deprecated in favor of the Player class interface. Direct function usage may be removed in future versions.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from glicko2 import Player' instead of 'import glicko2'.","cause":"Common mistake: importing the module instead of the class.","error":"AttributeError: module 'glicko2' has no attribute 'Player'"},{"fix":"Provide both opponent list and scores list, e.g., update_player([opponent], [1.0]) for a win.","cause":"Calling update_player with only opponent list, missing scores list.","error":"TypeError: update_player() missing 1 required positional argument: 'scores'"},{"fix":"Ensure opponents list is non-empty before calling update_player.","cause":"Passing an empty list to update_player.","error":"ValueError: The ratings list must contain at least 1 opponent"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}