Module skill_rating::elo [] [src]

ELO rating

This module contains all of the standard methods that would be used to calculate elo. The module provied the constants WIN, LOSE and DRAW.

Modules

systems

Convenience functions for various popular rating systems using elo.

Constants

DRAW

The score for a drawn game

LOSS

The score for a lost game

WIN

The score for a won game

Functions

expected_score

Calculates the expected outcome of a match between two players. This will always be a number between 0 and 1. The closer to 1 the more favored the match is for player a.

game

Calculates the updated elo ratings of both players after a match. The k_a and k_b are the K factors used to determine the updated rating, If you just want a default behaviou set these to 32, or use game_icc() instead.

series

Calculates the updated elo of a player, after a series of games. This might be used to calculate the rating of a player after a tournement.

Type Definitions

EloRating

The EloRating type is i32 since a rating can be negative.