Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Libraries

    Chess::Elo 0.02

    Download button

    No screenshots available
    Downloads: 574  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Terrence Brannon | More programs
    Perl Artistic License / FREE
    January 5th, 2007, 04:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Chess::Elo description

    Chess::Elo is a Perl module to calculate Chess "Elo" ratings.

    Chess::Elo is a Perl module to calculate Chess "Elo" ratings.

    SYNOPSIS

    use Chess::Elo qw(:all);

    # Alice is going to thump Bob...
    my ($alice_elo, $bob_elo) = (2100, 1200);

    # Oh no, Alice lost to Bob!
    my $result = 0; # 0.5 for draw, 1 for win

    my @new_elo_alice_bob = elo ($alice, 0, $bob);
    use Data::Dumper; warn Dumper(@new_elo_alice_bob);

    [
    '2068.17894295388', # My, Alice took a hit on her rating :)
    '1231.82105704612' # Bob is setting pretty
    ];

    This module provides a single function, elo which allows one to calculate individual ratings based on performance. Typically, a player is given an initial provisional rating of 1600 points. In all cases, one gains and loses points as a function of the playing strength of both parties and the result of their encounter.

    The formula used is the same one used at magi-nation:

    http://www.magi-nation.com/Tournaments/ratingsfaq.htm

    Or, quantitatively speaking:

    A2 = A1 + 32 ( G - ( 1 / ( 1 + 10 ** ( ( B1 -A1) / 400 ) ) ) )
    A2 is Alice's post-game rating
    A1 is Alice rating before the game against Bob
    B1 is Bobs rating before the game against Alice
    G is the game result, in this case:

    1, if A beats B

    0, if A loses to B

    0.5, if A draws to B

    METHODS

    ($new_a, $new_b) = elo($elo_a, $result, $elo_b)

    This function takes 3 arguments describing the result of a person with rating $elo_a competing with the person with rating $elo_b. The result argument is from the perspective of person A. Thus if A won $result is 1. If A lost, $result is 0. If A drew, $result is 0.5.

    EXPORT

    None by default, elo upon request.

    Requirements:

    · Perl



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    calculate ratings | chess ratings | Perl module | Chess::Elo | calculate | chess



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM