skillratings
Calculate a player's skill level using Elo and Glicko-2 algorithms known from their usage in chess and other games.
Installation
Add the following to your Cargo.toml file:
[]
= "0.3.1"
Usage
For a detailed guide on how to use this crate, head over to the documentation.
Elo rating system
extern crate skillratings;
use ;
let player_one = EloRating ;
let player_two = EloRating ;
// The outcome is from the perspective of player one.
let outcome = WIN;
let = elo;
assert!;
assert!;
Glicko-2 rating system
Instead of the traditional way of calculating the Glicko-2 for only one player only using a list of results, we are calculating the Glicko-2 rating for two players at once, like in the Elo calculation, to make it easier to see instant results.
extern crate skillratings;
use ;
let player_one = GlickoRating ;
let player_two = GlickoRating ;
let outcome = WIN;
let = glicko2;
assert!;
assert!;
assert!;
assert!;
License
This project is licensed under the MIT License.