Games-Ratings
view release on metacpan or search on metacpan
lib/Games/Ratings/Chess/FIDE.pm view on Meta::CPAN
$reverse_scoring_probability_lookup_table{'0.84'} = '284';
$reverse_scoring_probability_lookup_table{'0.85'} = '296';
$reverse_scoring_probability_lookup_table{'0.86'} = '309';
$reverse_scoring_probability_lookup_table{'0.87'} = '322';
$reverse_scoring_probability_lookup_table{'0.88'} = '336';
$reverse_scoring_probability_lookup_table{'0.89'} = '351';
$reverse_scoring_probability_lookup_table{'0.90'} = '366';
$reverse_scoring_probability_lookup_table{'0.91'} = '383';
$reverse_scoring_probability_lookup_table{'0.92'} = '401';
$reverse_scoring_probability_lookup_table{'0.93'} = '422';
$reverse_scoring_probability_lookup_table{'0.94'} = '444';
$reverse_scoring_probability_lookup_table{'0.95'} = '470';
$reverse_scoring_probability_lookup_table{'0.96'} = '501';
$reverse_scoring_probability_lookup_table{'0.97'} = '538';
$reverse_scoring_probability_lookup_table{'0.98'} = '589';
$reverse_scoring_probability_lookup_table{'0.99'} = '677';
}
1; # Magic true value required at end of module
__END__
=head1 NAME
Games::Ratings::Chess::FIDE - calculate changes to FIDE ratings (Elos)
=head1 VERSION
This document describes Games::Ratings::Chess::FIDE version 0.0.4
=head1 SYNOPSIS
use Games::Ratings::Chess::FIDE;
my $player = Games::Ratings::Chess::FIDE->new();
$player->set_rating(2240);
$player->set_coefficient(15);
$player->add_game( {
opponent_rating => 2114,
result => 'win', ## or 'draw' or 'loss'
}
);
my $rating_change = sprintf( "%+.2f", $player->get_rating_change() );
my $new_rating = $player->get_new_rating();
=head1 DESCRIPTION
This module provides methods to calculate FIDE rating (Elo) changes for one
player, having played one or more rated games. Gains and losses are calculated
according to the FIDE rating rules (cmp. FIDE Rating Regulations, FIDE
Handbook B.02.10: http://www.fide.com/info/handbook?id=75&view=article).
FIDE uses a table with scoring probabilities in dependence from rating
differences between the players.
FIDE does _not_ use the formula P = 1/(1 + 10 ^ [D/400]).
Furthermore FIDE uses a development coefficient (K) depending on the current
rating and the number of rated games.
* K = 25 for a player with a total of less than 30 games.
* K = 15 as long as a player`s rating remains under 2400.
* K = 10 once a player`s published rating has reached 2400
=head1 INTERFACE
This modules provides the following methods specific to FIDE ratings. Other
(more generic) methods for rating calculation are provided by Games::Ratings.
Please check the documentation of Games::Ratings for those methods.
=head2 get_rating_change
my $rating_change = sprintf("%+.2f", $player->get_rating_change() );
Calculate rating changes for all stored games and return sum of those
changes.
=head2 get_new_rating
my $new_rating = $player->get_new_rating();
Calculate new rating after the given games.
=head2 get_points_expected
my $points_expected = $player->get_points_expected();
Calculate expected points according to rating differences between own rating
and opponents ratings.
=head2 get_performance
my $performance = $player->get_performance();
Calculate performance according to average rating of opponents and percentage
score.
=head1 CONFIGURATION AND ENVIRONMENT
Games::Ratings requires no configuration files or environment variables.
=head1 DEPENDENCIES
This module relies on Games::Ratings which provides some generic methods, e.g.
* new()
* get_rating()
* set_rating()
* get_coefficient()
* set_coefficient()
* add_game()
* remove_all_games()
* DESTROY()
( run in 0.512 second using v1.01-cache-2.11-cpan-13bb782fe5a )