Module skillratings::ingo
source · Expand description
The Ingo algorithm, the predecessor of DWZ and one of the first rating algorithms invented in 1947.
Sometimes still used in Xiangqi (“Chinese Chess”).
Unlike with the other rating systems, with Ingo a lower rating is more desirable,
and negative values are possible, though unlikely.
A player with an Ingo rating of 0 has an equivalent Elo rating of 2840, and an Ingo rating of -1 equals 2848 Elo.
Quickstart
This is the most basic example on how to use the Ingo Module.
Please take a look at the functions below to see more advanced use cases.
use skillratings::{
ingo::{ingo, IngoRating},
Outcomes,
};
// Initialise a new player rating.
// We need to set the actual age for the player,
// if you are unsure what to set here, choose something that is greater than 25.
let player_one = IngoRating::new(19);
// Or you can initialise it with your own values of course.
// Imagine these numbers being pulled from a database.
// The default rating is 230. Unlike with other algorithms, with Ingo a lower rating is more desirable.
let (some_rating, some_age) = (150.4, 23);
let player_two = IngoRating {
rating: some_rating,
age: some_age,
};
// The outcome of the match is from the perspective of player one.
let outcome = Outcomes::WIN;
// The ingo function will calculate the new ratings for both players and return them.
let (new_player_one, new_player_two) = ingo(&player_one, &player_two, &outcome);
More Information
Structs
- Struct to calculate ratings and expected score for
IngoRating
- The Ingo rating of a player.
Functions
- Calculates the expected outcome of two players based on Ingo.
- Calculates the expected outcome of a player in a rating period or tournament.
- Calculates the
IngoRating
s of two players based on their ratings, and the outcome of the game. - The “traditional” way of calculating a
IngoRating
of a player in a rating period.