GeneThello Home

net.sf.genethello.ga
Class Elo

java.lang.Object
  extended by net.sf.genethello.ga.Elo

public class Elo
extends java.lang.Object

A class to calculate ELO rating of each player.

Author:
praz

Constructor Summary
Elo()
           
 
Method Summary
static int calcDraw(int a, int b)
          Calculates rating gain RatingGainA when player A draws player B.
static int calcWin(int a, int b)
          Calculates rating gain RatingGainA when player A wins over player B.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Elo

public Elo()
Method Detail

calcWin

public static int calcWin(int a,
                          int b)
Calculates rating gain RatingGainA when player A wins over player B. New ELO rating will be

NewELO_A = CurrentELO_A + RatingGainA
NewELO_B = CurrentELO_B - RatingGainA

Parameters:
a - current ELO rating of player A
b - current ELO rating of player B
Returns:
rating gain for player A

calcDraw

public static int calcDraw(int a,
                           int b)
Calculates rating gain RatingGainA when player A draws player B. New ELO rating will be

NewELO_A = CurrentELO_A + RatingGainA
NewELO_B = CurrentELO_B - RatingGainA

Parameters:
a - current ELO rating of player A
b - current ELO rating of player B
Returns:
rating gain for player A

GeneThello Home

Get GeneThello: Genetic Othello at SourceForge.net. Fast, secure and Free Open Source software downloads