No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
This gem provides a library and executables that take as input as set of games and output a set of skill rankings for the players of those games. The algorithm is a version of Remi Coulom's Whole-History Rating modified to support handicaps, and implemented in Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Whole History Rating

A system for ranking game players by skill, based on Rémi Coulom's Whole History Rating algorithm, with modifications to support handicaps.

Developed for use on GoShrine, but the code is not go specific. It can support any two player game, as long as the outcome is a simple win/loss.

Installation

  • gem install whole_history_rating

Usage

require 'whole_history_rating'

@whr = WholeHistoryRating::Base.new

# WholeHistoryRating::Base#create_game arguments: black player name, white player name, winner, day number, handicap
# Handicap should generally be less than 500 elo
@whr.create_game("shusaku", "shusai", "B", 1, 0)
@whr.create_game("shusaku", "shusai", "W", 2, 0)
@whr.create_game("shusaku", "shusai", "W", 3, 0)

# Iterate the WHR algorithm towards convergence with more players/games, more iterations are needed.
@whr.iterate(50)

# Results are stored in one triplet for each day: [day_number, elo_rating, uncertainty]
@whr.ratings_for_player("shusaku") => 
  [[1, -43, 84], 
   [2, -45, 84], 
   [3, -45, 84]]
@whr.ratings_for_player("shusai") => 
  [[1, 43, 84], 
   [2, 45, 84], 
   [3, 45, 84]]

Optional Configuration

One of the meta parameters to WHR is the variance of rating change over one time step, :w2, which determines how much that a player's rating is likely change in one day. Higher numbers allow for faster progress. The default value is 300, which is fairly high.

@whr = WholeHistoryRating::Base.new(:w2 => 17)