Användarnamn: Lösenord:
Registrering av Ny Användare
Moderator: SueQ , coan.net 
 Backgammon

Backgammon and variants.

Backgammon Links


Förteckning över diskussionsforum
Läge: Alla kan skriva
Söka bland inlägg:  

27. september 2005, 05:38:03
playBunny 
Ämne: Re: ELO Bg formula
Ändrat av playBunny (27. september 2005, 05:44:43)
And a good calculator once you get past airplane-cockpit syndrome, lol.

Javascript calaculation:
function afRatingChanges (fRatingP1, fRatingP2, uiExperienceP1, uiExperienceP2, uiMatchLength)
    {
    var fRatingDiff = Math.abs (fRatingP1 - fRatingP2);
    var fRootMatchLen = Math.sqrt (uiMatchLength);
    var fBasicMatchValue = 4 * fRootMatchLen;

    var fProbUnderdogWins = 1 / (1 + Math.pow (10, fRatingDiff * fRootMatchLen / 2000));

    if (fRatingP1 < fRatingP2)
{
     fProbWinsP1 = fProbUnderdogWins;
     fProbWinsP2 = 1 - fProbWinsP1;
     }
    else
   {
  fProbWinsP2 = fProbUnderdogWins;
    fProbWinsP1 = 1 - fProbWinsP2;
  }

    var fExperienceFactor1 = Math.max (1, 5 - (uiExperienceP1 + uiMatchLength) / 100); // Will be 1 when
    var fExperienceFactor2 = Math.max (1, 5 - (uiExperienceP2 + uiMatchLength) / 100); // Exp >= 400.

    var fRatingChange1W = fBasicMatchValue * fProbWinsP2 * fExperienceFactor1;
    var fRatingChange1L = fBasicMatchValue * fProbWinsP1 * fExperienceFactor1;
    var fRatingChange2W = fBasicMatchValue * fProbWinsP1 * fExperienceFactor2;
    var fRatingChange2L = fBasicMatchValue * fProbWinsP2 * fExperienceFactor2;

    return new Array (
       fRatingChange1W, fRatingChange1L,
      fRatingChange2W, fRatingChange2L);
    }

Datum och tid
Vänner online
Favoritforum
Vängrupper
Dagens tips
Copyright © 2002 - 2024 Filip Rachunek, all rights reserved.
Tillbaka till sidans början