Author: Odd Gunnar Malin
Date: 07:46:15 04/21/05
Go up one level in this thread
On April 21, 2005 at 09:57:34, Eelco de Groot wrote:
>I changed the Rtdiff routine so that it should now converge faster, using not a
>slope of fixed 700 everytime but making use of the fact that I can calculate the
>slope in Performance vs. Ratingdifference when assuming the normal distribution.
>I believe this is similar to Newton's method, for finding the roots of a graph
>or function numerically? But here I actually now the precise slope.
>
>But if Hastings approximation is just not good enough or I have forgotten
>another minus sign....it will of course not work... So I'll try to put this into
>an actual program. I have never made macro's for Excel yet, I will certainly try
>that now that you showed me how, Odd Gunnar! That is probably the easiest thing
>to do.
>
>These are the new routines, until further notice...:
>
>FUNCTION phi(x:REAL):REAL;
>CONST p=0.2316419;
> c1=0.31938153;
> c2=-0.356563782;
> c3=1.78147937;
> c4=-1.821255978;
> c5=1.330274429;
>VAR t,sndf:REAL;
>BEGIN
> sndf:=EXP(-SQR(x)/2)/SQRT(2*PI);
> t:=1/(p*x+1);
> phi:=-(((((c5*t+c4)*t+c3)*t+c2)*t+c1)*t*sndf)+1;
>END;
>
>
>
>FUNCTION Rtdiff(Performance:REAL):REAL;
>CONST tol=0.0001;
> sdev=200*SQRT(2);
>VAR delta,slope:REAL;
>BEGIN
> slope:=708;
> Rtdiff:=(Performance-0.50)*slope;
> delta:=1
> WHILE delta >= tol DO BEGIN
> Iteration:=phi(Rtdiff/sdev);
> delta:=Performance-Iteration;
> slope:=400*SQRT(PI)*EXP(SQR(Rtdiff/sdev)/2);
> Rtdiff:=Rtdiff+(delta*slope);
> END;
>END;
>
>
>Regards, Eelco
>
Now you have it!
http://home.online.no/~malin/sjakk/elo.gif
Your number are equal with Excels Norm.dist function.
Score FIDE Log10 Norm.dist. Schmitt W-L Groot
0,50 0 0 0 0 0 0
0,51 7 7 7 7 8 7
0,52 14 14 14 14 16 14
0,53 21 21 21 21 24 21
0,54 29 28 28 28 32 28
0,55 36 35 36 36 40 36
0,56 43 42 43 43 48 43
0,57 50 49 50 50 56 50
0,58 57 56 57 57 64 57
0,59 65 63 64 65 72 64
0,60 72 70 72 72 80 72
0,61 80 78 79 79 88 79
0,62 87 85 86 87 96 86
0,63 95 92 94 94 104 94
0,64 102 100 101 102 112 101
0,65 110 108 109 110 120 109
0,66 117 115 117 118 128 117
0,67 125 123 124 125 136 124
0,68 133 131 132 133 144 132
0,69 141 139 140 142 152 140
0,70 149 147 148 150 160 148
0,71 158 156 157 158 168 157
0,72 166 164 165 167 176 165
0,73 175 173 173 175 184 173
0,74 184 182 182 184 192 182
0,75 193 191 191 193 200 191
0,76 202 200 200 202 208 200
0,77 211 210 209 211 216 209
0,78 220 220 218 221 224 218
0,79 230 230 228 231 232 228
0,80 240 241 238 241 240 238
0,81 251 252 248 251 248 248
0,82 262 263 259 262 256 259
0,83 273 275 270 273 264 270
0,84 284 288 281 285 272 281
0,85 296 301 293 297 280 293
0,86 309 315 306 309 288 306
0,87 322 330 319 322 296 319
0,88 336 346 332 336 304 332
0,89 351 363 347 350 312 347
0,90 366 382 362 366 320 362
0,91 383 402 379 382 328 379
0,92 401 424 397 400 336 397
0,93 422 449 417 420 344 417
0,94 444 478 440 443 352 440
0,95 470 512 465 468 360 465
0,96 501 552 495 499 368 495
0,97 538 604 532 539 376 532
0,98 589 676 581 597 384 581
0,99 677 798 658 685 392 658
1,00
Excel format (basic) of your code:
Function phi(x)
p = 0.2316419
c1 = 0.31938153
c2 = -0.356563782
c3 = 1.78147937
c4 = -1.821255978
c5 = 1.330274429
Pi = 3.14159265358979
sndf = Exp(-(x * x) / 2) / Sqr(2 * Pi)
t = 1 / (p * x + 1)
phi = -((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t * sndf + 1
End Function
Function Rtdiff(Performance)
Pi = 3.14159265358979
tol = 0.0001
sdev = 200 * Sqr(2)
Slope = 708
Rtdiff2 = (Performance - 0.5) * Slope
delta = 1
Do While delta >= tol
Iteration = phi(Rtdiff / sdev)
delta = Performance - Iteration
Slope = 400 * Sqr(Pi) * Exp((Rtdiff * Rtdiff) / (sdev * sdev * 2))
Rtdiff = Rtdiff + (delta * Slope)
Loop
End Function
Odd Gunnar
This page took 0 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.