skillratings
Skillratings allows you to calculate the player's skill in 1v1 matches instantly.
Only player-versus-player matches are currently supported, no teams.
Instead of calculating results at the end of rating periods, we deliver the result instantly after a match.
Currently supported algorithms:
These are mainly known from their usage in chess and online games.
Installation
Add the following to your Cargo.toml file:
[]
= "0.8.0"
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;
// The config allows you to change certain adjustable values in the algorithms.
let config = new;
let = elo;
assert!;
assert!;
Glicko rating system
use ;
let player_one = GlickoRating ;
let player_two = GlickoRating ;
let outcome = WIN;
// The config allows you to change certain adjustable values in the algorithms.
let config = new;
let = glicko;
assert!;
assert!;
assert!;
assert!;
Glicko-2 rating system
extern crate skillratings;
use ;
let player_one = Glicko2Rating ;
let player_two = Glicko2Rating ;
let outcome = WIN;
// The config allows you to change certain adjustable values in the algorithms.
let config = new;
let = glicko2;
assert!;
assert!;
assert!;
assert!;
TrueSkill rating system
Caution regarding usage of TrueSkill: Microsoft permits only Xbox Live games or non-commercial projects to use TrueSkill(TM). If your project is commercial, you should use another rating system included here.
use ;
let player_one = new;
let player_two = TrueSkillRating ;
// The config allows you to change certain adjustable values in the algorithms.
let config = new;
let = trueskill;
assert!;
assert!;
assert!;
assert!;
DWZ (Deutsche Wertungszahl) rating system
use ;
let player_one = DWZRating ;
let player_two = DWZRating ;
let outcome = WIN;
let = dwz;
assert!;
assert_eq!;
assert!;
assert_eq!;
Ingo rating system
Wikipedia article (in german, no english version available)
use ;
let player_one = IngoRating ;
let player_two = IngoRating ;
let = ingo;
assert!;
assert!;
License
This project is licensed under the MIT License.