Module skillratings::egf

source ·
Expand description

The EGF (European Go Federation) rating system is a variation of the Elo rating system, adapted for playing Go.
Used for calculating Go player ratings in Europe since 1998.

The ratings are loosely centred around the Go ranks, ranging from 30 kyu (lowest) to 9 dan (highest).
A rating of 2100 equals a rank of 1 dan, and 1 rank up and down equals a gain or loss of around 100 points.
So a 2 dan rank would equal around 2200 points, and so on. The lowest rank, 30 kyu, is equal to -900 points.
You start at a rating of 0, around 21 kyu. The full table of ranks/rating can be found here, or here is an unofficial comparison table that includes USCF chess ratings.

Quickstart

This is the most basic example on how to use the EGF Module.
Please take a look at the functions below to see more advanced use cases.

use skillratings::{
    egf::{egf, EGFConfig, EGFRating},
    Outcomes,
};

// Initialise a new player rating with a rating of 0.
let player_one = EGFRating::new();

// Or you can initialise it with your own values of course.
// Imagine these numbers being pulled from a database.
let some_rating = 325.0;
let player_two = EGFRating {
    rating: some_rating,
};

// The outcome of the match is from the perspective of player one.
let outcome = Outcomes::WIN;

// The config allows you to specify certain values in the EGF calculation.
// We set a handicap of 4.0 here for player one.
// This means that player_two starts with 4 handicap stones.
// For more details see the "Handicapping in Go" link below.
let config = EGFConfig { handicap: 4.0 };

// The egf function will calculate the new ratings for both players and return them.
let (new_player_one, new_player_two) = egf(&player_one, &player_two, &outcome, &config);

More Information

Structs

  • Struct to calculate ratings and expected score for EGFRating
  • Constants used in the EGF Calculations.
  • The EGF (European Go Federation) Rating for a player.

Functions

  • Calculates the EGFRatings of two players based on their old ratings and the outcome of the game.
  • Calculates an EGFRating in a traditional way using a rating period, commonly used for tournaments.
  • Calculates the expected score of two players based on their EGF rating.
  • Calculates the expected outcome of a player in a rating period or tournament.