Games::Ratings::Go::EGF - calculate changes to EGF ratings (GoR)
This document describes Games::Ratings::Go::EGF version 0.0.1
use Games::Ratings::Go::EGF; my $player = Games::Ratings::Go::EGF->new(); $player->set_rating(2240); $player->add_game( { opponent_rating => 2114, result => 'win', ## or 'draw' or 'loss' handicap => '+5', ## got 5 handicap ## or '-2': gave 2 h. ## can be ommitted } ); my $rating_change = $player->get_rating_change(); my $new_rating = $player->get_new_rating();
This module provides methods to calculate EGF rating (GoR) changes for one player, having played one or more rated games. Gains and losses are calculated according to the EGF rating rules (cmp. EGF Official ratings: http://gemma.ujf.cas.cz/~cieply/GO/gor.html).
Basically EGF uses a formula to calculate scoring probabilities in dependence from rating differences between players: Se(A) = 1/(e^[D/a] + 1).
Furthermore EGF uses a coefficient ('con') depending on the current rating which reduces rating change for stronger players and increases rating change for weaker players: Rnew - Rold = con * (Sa - Se).
This modules provides the following methods specific to EGF ratings. Other (more generic) methods for rating calculation are provided by Games::Ratings. Please check the documentation of Games::Ratings for those methods.
my $rating_change = $player->get_rating_change();
Calculate rating changes for all stored games and return sum of those changes.
my $new_rating = $player->get_new_rating();
Calculate new rating after the given games.
my $points_expected = $player->get_points_expected();
Calculate expected points according to rating differences between own rating and opponents ratings.
Games::Ratings requires no configuration files or environment variables.
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()
At the moment, there are no error or warning messages that the module can generate.
Error message here, perhaps with %s placeholders
[Description of error here]
Another error message here
[Et cetera, et cetera]
None reported.
No bugs have been reported.
At the moment, it's not possible to compute a EGF rating for a previously unrated player.
Please report any bugs or feature requests to bug-games-ratings@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-games-ratings@rt.cpan.org
Christian Bartolomaeus <bartolin@gmx.de>
<bartolin@gmx.de>
Many thanks to Ales Cieply for answering my questions about the EGF rating system.
http://en.wikipedia.org/wiki/Elo_rating for informations about the Elo system.
http://gemma.ujf.cas.cz/~cieply/GO/gor.html for informations about the EGF rating system.
Copyright (c) 2010, Christian Bartolomaeus <bartolin@gmx.de>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install Games::Ratings, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::Ratings
CPAN shell
perl -MCPAN -e shell install Games::Ratings
For more information on module installation, please visit the detailed CPAN module installation guide.