Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Rough approximation Re: ELO Calculations

Author: Dieter Buerssner

Date: 12:16:00 04/27/05

Go up one level in this thread


I tried the formula given by Odd Gunnar, in the hope to reproduce the numbers on
the FIDE site. I give my little program. I don't have erf() with me, so I can
only compare the Schmitt formula and the formula from the logistic distribution.
I could not reproduce the numbers. Although, I should check the program
carefully - it is only a five minute hack. In one comment, I show parts of an
older post of mine. It shows 2 data points calculated with an accurate erf()
implementation. I also give some part of the output at the end - first column is
the elo difference, second column the expected score by the Schmitt formula and
third column the formula [1] given in the comment.

I doubt very much, that the accuracy you mentioned can be achieved with the
Schmitt formula (neither do I think, that it really matters - I was only
curious, if I can reproduce the official numbers). I do of course not doubt,
that erf() can be approximated very well by a polynom (or some more
sophisticated methods) - but not when coefficients with only 5 significant
digits are used. So, it still is a mystery for me, where the official FIDE
numbers come from.

Cheers,
Dieter


/* With the logistic distribution, the formula is

p = 1/(1+10^(-dp/400)) [1]

while for the normal distribution it would be

p = 0.5+0.5*erf(dp/400) [2]

erf=error function, dp is the rating difference. When I now look at the
(seemingly official?) table at
http://www.fide.com/official/handbook.asp?level=B0210 I see:

p dp using [1] using [2]
0.99 677 0.9801 0.9917
0.98 589 0.9674 0.9813
[First 2 columns from the link]

So, using formula [1] gives a p, that is outside the rounding range, while using
[2] it actually gives the number given in the table at FIDE to the given
precision. Still, I have some doubt, because a better number dp for 0.99 would
be 658, yielding in p=0.9900009 with [2].
*/


/* Alghorithm from Simon Schmitt's site on the net.

   Die offiziellen Elo-Zahlen werden nach folgender Formel errechnet:
    Erwartung = 0,5 + 1,4217 x 10^-3  x D
                - 2,4336 x 10^-7  x D x |D|
                - 2,5140 x 10^-9  x D x |D|^2
                + 1,9910 x 10^-12 x D x |D|^3

   wobei gilt:
    D   = Differenz = Elo(eigene, alt) - Elo(Gegner, alt)
    |D| = Absolutbetrag von D
*/

#include <stdio.h>
#include <math.h>

/
double expected_score(double d)
{
  int sign = 0;
  double p;
  if (d < 0.0)
  {
    sign = 1;
    d = -d;
  }
  p = d*(1.4217e-3 + d*(-2.4336e-7 + d*(-2.5140e-9 + d*1.9910e-12)));
  return (sign ? 0.5-p : 0.5+p);
}

int main(void)
{
  int d;
  double p;
  for (d=650; d<700; d++)
    printf("%d %.6f %.6f\n", d, expected_score(d), 1.0/(1.0+pow(10.0,
-d/400.0)));
  return 0;
}

And some part of the output that includes one data point from the comment above:

655 0.986812 0.977478
656 0.986917 0.977604
657 0.987022 0.977730
658 0.987127 0.977855
659 0.987232 0.977979
660 0.987336 0.978103
661 0.987441 0.978226
662 0.987546 0.978348
663 0.987651 0.978470
664 0.987755 0.978591
665 0.987860 0.978711
666 0.987965 0.978831
667 0.988070 0.978950
668 0.988175 0.979068
669 0.988280 0.979186
670 0.988385 0.979303
671 0.988491 0.979419
672 0.988596 0.979535
673 0.988702 0.979650
674 0.988808 0.979764
675 0.988914 0.979878
676 0.989020 0.979991
677 0.989126 0.980104
^^^^^^^^^^^^^^^^^^^^^
678 0.989233 0.980216
679 0.989340 0.980327
680 0.989447 0.980438
681 0.989555 0.980548
682 0.989663 0.980657
683 0.989771 0.980766
684 0.989880 0.980874
685 0.989989 0.980982
[But somewhere in between 685 and 686 would be accurate with the Schmitt
formula]
686 0.990098 0.981089
687 0.990208 0.981196
688 0.990318 0.981302
689 0.990429 0.981407
690 0.990540 0.981512




This page took 0.02 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.