Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

whole_history_rating

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whole_history_rating

  • 0.1.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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
@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, -92, 71], [2, -94, 71], [3, -95, 71], [4, -96, 72]]
@whr.ratings_for_player("shusai") => [[1, 92, 71], [2, 94, 71], [3, 95, 71], [4, 96, 72]]

Enjoy!

-Pete

FAQs

Package last updated on 20 May 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc