Help - How are ratings calculated ?

A programmers view of the process.
V4 August 2020 steve.bush@neosys.com

Contents:
1. Definitions
2. Process
3. Output
4. Notes
5. K Rating Algorithm
6. Elo Rating Difference Table
7. P Rating Algorithm
8. Elo Performance Table
9. Source Code

DEFINITIONS

1. K Rating An Elo current rating algorithm to determine a rating based on a previous rating and results versus opponents ratings.
"The Rating of Chess Players, Past and Present" Arpad E. Elo 1978
Wikipedia Elo_rating_system
2. P Rating An Elo performance rating algorithm to determine a rating based solely on performance versus opponents ratings without reference to any previous rating. ECF includes a fictional draw against a fictional opponent of nominal rating.
3. Partial Rating A rating calculated from a small number of games (<10) using P Rating.
4. Full Rating a) A rating calculated using K Rating
or
b) A rating calculated using P Rating on at least 10 games.
5. Fully Rated Players All players who have a prior period Full Rating and have played at least one rated game in the prior 60 months (5 years).
6. Partially Rated Players All players who have a prior period Partial Rating and have played at least one rated game in the prior 60 months (5 years).
7. New Players All players who are neither Fully Rated Players nor Partially Rated Players and have played at least one game in the period being rated.
Note that this will include returning players.
8. All Players All players who fall into one of the above definitions.

PROCESS

Pass 1. Rate New Players and Partially Rated Players versus Fully Rated Players
Perform P Rating to produce either a Partial Rating "A" or a Full Rating "A" for each player.
Pass 2. Rate New Players and Partially Rated Players versus All Players
Perform P Rating to produce either a Partial Rating "B" or a Full Rating "B" for each player.
Where opponents are New Players or Partially Rated Players, use their Partial Rating "A" or Full Rating "A" from Pass 1
Pass 3. Rate Fully Rated Players versus All Players
Perform K Rating to produce a new Full Rating "B" for every RATED PLAYER.
Where opponents are New Players or Partially Rated Players, use their Partial Rating or Full Rating "B" from Pass 2.
When using an opponents Partial Rating use a K of 40 for that opponent. This has the effect of reducing any rating adjustment by 50%.

OUTPUT

All Players acquire either a Partial Rating "B" or a Full Rating "B" in the above process.
Full Rating "B" is used as the "Full Rating" in the next rating cycle.
Partial Rating "B" plays no further role in rating.

NOTES

The sets of Fully Rated Players, Partially Rated Players and New Players are defined only by reference to prior periods therefore the sets of players do not change throughout the process. Players are divided into two groups at the beginning of the process. Group one, the sets of New Players and Partially Rated Players, are always processed twice (pass 1 and 2) and group 2, the set of Fully Rated Players, are always only rated once (pass3).

K Rating Algorithm

No.  Variable Calculation Comment
1. D = Opponent Rating - Player Rating Difference in Rating. Positive if opponent rating is greater.
2. D Offset = Lookup abs(D) in the Elo Rating Difference Table and restore the sign. Convert [-392 ... 392] => [-8.4 ... +8.4]
Very approx. 1 rating point per 40 rating points difference.
3. Score Win = 1, Draw = 0.5, Loss = 0
4. Score Offset Win = +10, Draw = 0, Loss = -10 Convert Win/Draw/Loss to +10/0/-10
5. Player K = 40 if age < 18 and New Rating> Old Rating
= 700 / No. of Games This Month if (20 x No. of Games this month) > 700
= 20 otherwise
6. Opponent Q = 40 if Opponent Rating Type is Partial
= 20 otherwise
7. Game Increment = (D Offset + Score Offset) x Player K / Opponent Q Typically Player K and Opponent Q are both 20 and cancel each other out.
8. Adjustment = Adjustment A + Old Rating x Adjustment B May be used in some years to slowly correct rating drift for all players. Usually zero.
9. New Rating = Old Rating + Sum of Game Increments + Adjustment
(Minimum 100)
10. New Rating Type = "Full" Always Full

Elo Rating Difference Table

D Min D Max D Offset
0 3 0.0
4 10 0.2
11 17 0.4
18 25 0.6
26 32 0.8
33 39 1.0
40 46 1.2
47 53 1.4
54 61 1.6
62 68 1.8
69 76 2.0
77 83 2.2
84 91 2.4
92 98 2.6
99 106 2.8
107 113 3.0
114 121 3.2
122 129 3.4
130 137 3.6
138 145 3.8
146 153 4.0
154 162 4.2
163 170 4.4
171 179 4.6
180 188 4.8
189 197 5.0
198 206 5.2
207 215 5.4
216 225 5.6
226 235 5.8
236 245 6.0
246 256 6.2
257 267 6.4
268 278 6.6
279 289 6.8
290 302 7.0
303 315 7.2
316 328 7.4
329 344 7.6
345 357 7.8
358 374 8.0
375 391 8.2
392 8.4

P Rating Algorithm

No.  Variable Calculation Comment
1. Dummy Opponent Rating = 1800 for Adults (18+)
= 100 x Age for Juniors (U18)
both less 100 for Rapid Time Control
2. Total No. Games = Prior No. of Games
+ Current Total No. Games
+ 1 Dummy Draw
Include one Dummy Draw
3. Total Opponents Ratings = Prior No. of Games x Prior Average Opponent Rating
+ Total Actual Opponents Ratings
+ 1 x Dummy Opponent Rating
Include Dummy Opponent Rating
4. Average Opponent Rating = Total Opponents Ratings / Total No. Games
5. Total Points = Prior Total Points + Current Total Points + 0.5 Include a Dummy Draw of 0.5
6. Average Score (p) = Total Points / Total No. Games Range is [0 ... 1]
The dummy draw prevents a perfect 0 or 1.
8. dp Lookup Average Score (p) in Elo Performance Table. Convert an Average Score (p) of [0 ... 1] to [-800 ... +800]
9. New Player Rating = Average Opponent Rating + dp (Minimum 100)
10. New Rating Type = "Full" if Total No. Games - 1 x Dummy Draw is 10 or more.
= "Partial if otherwise.
P Rating can produce either Partial or Full Ratings

Elo Performance Table


Compact Format
p dp p dp p dp p dp p dp p dp p dp p dp p dp p dp
1.00 800 0.90 366 0.80 240 0.70 149 0.60 72 0.50 0 0.40 -72 0.30 -149 0.20 -240 0.10 -366
0.99 677 0.89 351 0.79 230 0.69 141 0.59 65 0.49 -7 0.39 -80 0.29 -158 0.19 -251 0.09 -383
0.98 589 0.88 336 0.78 220 0.68 133 0.58 57 0.48 -14 0.38 -87 0.28 -166 0.18 -262 0.08 -401
0.97 538 0.87 322 0.77 211 0.67 125 0.57 50 0.47 -21 0.37 -95 0.27 -175 0.17 -273 0.07 -422
0.96 501 0.86 309 0.76 202 0.66 117 0.56 43 0.46 -29 0.36 -102 0.26 -184 0.16 -284 0.06 -444
0.95 470 0.85 296 0.75 193 0.65 110 0.55 36 0.45 -36 0.35 -110 0.25 -193 0.15 -296 0.05 -470
0.94 444 0.84 284 0.74 184 0.64 102 0.54 29 0.44 -43 0.34 -117 0.24 -202 0.14 -309 0.04 -501
0.93 422 0.83 273 0.73 175 0.63 95 0.53 21 0.43 -50 0.33 -125 0.23 -211 0.13 -322 0.03 -538
0.92 401 0.82 262 0.72 166 0.62 87 0.52 14 0.42 -57 0.32 -133 0.22 -220 0.12 -336 0.02 -589
0.91 383 0.81 251 0.71 158 0.61 80 0.51 7 0.41 -65 0.31 -141 0.21 -230 0.11 -351 0.01 -677
0.00-800

Symmetrical Format
pdppdp
1.008000.00-800
0.996770.01-677
0.985890.02-589
0.975380.03-538
0.965010.04-501
0.954700.05-470
0.944440.06-444
0.934220.07-422
0.924010.08-401
0.913830.09-383
0.903660.10-366
0.893510.11-351
0.883360.12-336
0.873220.13-322
0.863090.14-309
0.852960.15-296
0.842840.16-284
0.832730.17-273
0.822620.18-262
0.812510.19-251
0.802400.20-240
0.792300.21-230
0.782200.22-220
0.772110.23-211
0.762020.24-202
0.751930.25-193
0.741840.26-184
0.731750.27-175
0.721660.28-166
0.711580.29-158
0.701490.30-149
0.691410.31-141
0.681330.32-133
0.671250.33-125
0.661170.34-117
0.651100.35-110
0.641020.36-102
0.63950.37-95
0.62870.38-87
0.61800.39-80
0.60720.40-72
0.59650.41-65
0.58570.42-57
0.57500.43-50
0.56430.44-43
0.55360.45-36
0.54290.46-29
0.53210.47-21
0.52140.48-14
0.5170.49-7
0.5000.500

Source Code

K Rating
P Rating

[Next] [Index]