- Blind mode tutorial
lichess.org
Donate

The mechanics and maths of the glicko2 system

But it is good michuk to have an idea in certain cases what general effects certain things have on a pool of rated chess players. My interest in this is focused on the atomic player pool and issues to do with cheats and the inflation/deflation of ratings. While it's true I understand nothing about the Gaussian distribution, I think the simulation can give us some trends to look at. I don't think RealKool is stupid enough to think his simulation will be perfect, but if it gives him results on the basis of which he can theorize something, that's something, right?

But it is good michuk to have an idea in certain cases what general effects certain things have on a pool of rated chess players. My interest in this is focused on the atomic player pool and issues to do with cheats and the inflation/deflation of ratings. While it's true I understand nothing about the Gaussian distribution, I think the simulation can give us some trends to look at. I don't think RealKool is stupid enough to think his simulation will be perfect, but if it gives him results on the basis of which he can theorize something, that's something, right?

Preliminary plan on user interface.

It just consist of simple menu where the user has the power to create players, suspend cheaters, create new players, create new cheater, create arena tours, create matches, generate rating liist and others

  1. create players including cheaters
  2. create cheater players
  3. create good players
  4. create arena tour
  5. generate rating list including cheater
  6. generate rating list excluding cheaters
    And other menu number

The user will just type 1 and press enter to create random players with different r, Rd, vol and cheater mark. The simulator will then asked how many players will be created, and the percentage of cheaters.

If user want to create an arena tour, one has to just type 4 and press enter. Once done another question is asked, like how many players will be playing.

Preliminary plan on user interface. It just consist of simple menu where the user has the power to create players, suspend cheaters, create new players, create new cheater, create arena tours, create matches, generate rating liist and others 1) create players including cheaters 2) create cheater players 3) create good players 4) create arena tour 5) generate rating list including cheater 6) generate rating list excluding cheaters And other menu number The user will just type 1 and press enter to create random players with different r, Rd, vol and cheater mark. The simulator will then asked how many players will be created, and the percentage of cheaters. If user want to create an arena tour, one has to just type 4 and press enter. Once done another question is asked, like how many players will be playing.

#31

That's rarely how it works. A biased simulation can be worse than nothing; it can show you false trends which will cause you to make false theories

#31 That's rarely how it works. A biased simulation can be worse than nothing; it can show you false trends which will cause you to make false theories

@1,

You wrote:
""" 2) What happens in glicko2 terms to the LiChess playerbase when a player joins LiChess, cheats, takes a lot of points off law-abiding citizens and then has their account suspended? Does this deflate active players' ratings and make the law-abiding player pool averagely weaker? """

I got some data generated from simulation. The number of games is low (just over a million) in this result. I plan to increase this of course, just want to see the mean rating with or without cheaters in this number of games.

So this is how it is run.

  1. Create simulation #1 with cheaters, total pop = 10000 (Section A)

  2. Calculate the minimum and maximum rating

  3. Calculate the mean or average with cheaters

  4. Calculate the mean rating excluding cheaters so we can get comparison in (3)

  5. Create simulation #2 this time without cheaters (Section B)

  6. Calculate min, max, mean and stddev

A.0 Simulation #1 starting data summary:
Total players : 10000
Good players : 9686 (96.86%)
Cheaters : 314 (3.14%)
min rating : 1500
max rating : 2200

A.1 Summary with cheaters from simulation #1
total players : 10000
total good : 9686
total cheaters: 314 (3.14%)
total tour : 1000
total games : 1072565
min rating : 1397
max rating : 2616
mean rating before tour : 1836
mean rating after tour : 1889
StdDev after tour : 70
mean rating after tour excluding cheaters : 1883
StdDev after tour excluding cheaters : 24

B.0 Simulation #2 starting data summary:
Total players : 10000
Good players : 10000 (100.00%)
Cheaters : 0 (0.00%)
min rating : 1500
max rating : 2200

B.1 Summary without cheaters from simulation #2
total players : 10000
total tour : 1000
total games : 1157163
min rating : 1746
max rating : 2017
mean rating before tour : 1851
mean rating after tour : 1895
StdDev after tour : 24

In (A) the mean rating with cheaters (1889) does not matter much when compared to the mean rating excluding cheaters (1883) perhaps the number of cheaters is not that high (in this simulation I use around 3% cheaters of the population). There are 1000 arena type tournaments done with varying number of participants and number of games producing a total of 1072565 games. Before a tournament is done, I suspend one cheater that reaches rating > 2300 and games > 30, their cheater marks were set to 2. Cheater not caught, ch=1, suspended, ch=2. cheater with ch=2 cannot play in tournaments. All cheaters are set to have a rating of 1500 and RD=350 at the start.

In (B) this is a simulation without cheaters, the rating of 10000 players are randomly generated between 1500 to 2200. Its mean rating is 1851. After a 1157163 games the minimum rating is 1746 and maximum is 2017 with a mean of 1895.

Every simulation has an elapsed time of around 12 minutes for that 1000 tournaments.

Dev notes:
I hit a wall in developing this simulator. I had encountered a situation where the program would sometimes calculate for a long time (forcing me to terminate it) which would appear to be hanging. After debugging, found out that the problem is in the module glicko2.py provided by Mark for calculation of rating, RD and others gvien player results. It is on the function to calculate volatility.

def _newVol(self, rating_list, RD_list, outcome_list, v):
""" Calculating the new volatility as per the Glicko2 system.

_newVol(list, list, list) -> float

"""
i = 0
delta = self._delta(rating_list, RD_list, outcome_list, v)
a = math.log(math.pow(self.vol, 2))
tau = self._tau
x0 = a
x1 = 0

while x0 != x1:
# New iteration, so x(i) becomes x(i-1)
x0 = x1
d = math.pow(self.__rating, 2) + v + math.exp(x0)
h1 = -(x0 - a) / math.pow(tau, 2) - 0.5 * math.exp(x0)
/ d + 0.5 * math.exp(x0) * math.pow(delta / d, 2)
h2 = -1 / math.pow(tau, 2) - 0.5 * math.exp(x0) *
(math.pow(self.__rating, 2) + v)
/ math.pow(d, 2) + 0.5 * math.pow(delta, 2) * math.exp(x0)
* (math.pow(self.__rating, 2) + v - math.exp(x0)) / math.pow(d, 3)
x1 = x0 - (h1 / h2)

return math.exp(x1 / 2)

That loop, while x0 != x1: simply would not terminate!! or perhaps just take more time. I have seen it reached more than 5000 iteration without breaking the loop. So what I did is revised that function, limit it to loop a max of 1000 only to get the new volatility.

@1, You wrote: """ 2) What happens in glicko2 terms to the LiChess playerbase when a player joins LiChess, cheats, takes a lot of points off law-abiding citizens and then has their account suspended? Does this deflate active players' ratings and make the law-abiding player pool averagely weaker? """ I got some data generated from simulation. The number of games is low (just over a million) in this result. I plan to increase this of course, just want to see the mean rating with or without cheaters in this number of games. So this is how it is run. 1. Create simulation #1 with cheaters, total pop = 10000 (Section A) 2. Calculate the minimum and maximum rating 3. Calculate the mean or average with cheaters 4. Calculate the mean rating excluding cheaters so we can get comparison in (3) 5. Create simulation #2 this time without cheaters (Section B) 6. Calculate min, max, mean and stddev A.0 Simulation #1 starting data summary: Total players : 10000 Good players : 9686 (96.86%) Cheaters : 314 (3.14%) min rating : 1500 max rating : 2200 A.1 Summary with cheaters from simulation #1 total players : 10000 total good : 9686 total cheaters: 314 (3.14%) total tour : 1000 total games : 1072565 min rating : 1397 max rating : 2616 mean rating before tour : 1836 mean rating after tour : 1889 StdDev after tour : 70 mean rating after tour excluding cheaters : 1883 StdDev after tour excluding cheaters : 24 B.0 Simulation #2 starting data summary: Total players : 10000 Good players : 10000 (100.00%) Cheaters : 0 (0.00%) min rating : 1500 max rating : 2200 B.1 Summary without cheaters from simulation #2 total players : 10000 total tour : 1000 total games : 1157163 min rating : 1746 max rating : 2017 mean rating before tour : 1851 mean rating after tour : 1895 StdDev after tour : 24 In (A) the mean rating with cheaters (1889) does not matter much when compared to the mean rating excluding cheaters (1883) perhaps the number of cheaters is not that high (in this simulation I use around 3% cheaters of the population). There are 1000 arena type tournaments done with varying number of participants and number of games producing a total of 1072565 games. Before a tournament is done, I suspend one cheater that reaches rating > 2300 and games > 30, their cheater marks were set to 2. Cheater not caught, ch=1, suspended, ch=2. cheater with ch=2 cannot play in tournaments. All cheaters are set to have a rating of 1500 and RD=350 at the start. In (B) this is a simulation without cheaters, the rating of 10000 players are randomly generated between 1500 to 2200. Its mean rating is 1851. After a 1157163 games the minimum rating is 1746 and maximum is 2017 with a mean of 1895. Every simulation has an elapsed time of around 12 minutes for that 1000 tournaments. Dev notes: I hit a wall in developing this simulator. I had encountered a situation where the program would sometimes calculate for a long time (forcing me to terminate it) which would appear to be hanging. After debugging, found out that the problem is in the module glicko2.py provided by Mark for calculation of rating, RD and others gvien player results. It is on the function to calculate volatility. def _newVol(self, rating_list, RD_list, outcome_list, v): """ Calculating the new volatility as per the Glicko2 system. _newVol(list, list, list) -> float """ i = 0 delta = self._delta(rating_list, RD_list, outcome_list, v) a = math.log(math.pow(self.vol, 2)) tau = self._tau x0 = a x1 = 0 while x0 != x1: # New iteration, so x(i) becomes x(i-1) x0 = x1 d = math.pow(self.__rating, 2) + v + math.exp(x0) h1 = -(x0 - a) / math.pow(tau, 2) - 0.5 * math.exp(x0) \ / d + 0.5 * math.exp(x0) * math.pow(delta / d, 2) h2 = -1 / math.pow(tau, 2) - 0.5 * math.exp(x0) * \ (math.pow(self.__rating, 2) + v) \ / math.pow(d, 2) + 0.5 * math.pow(delta, 2) * math.exp(x0) \ * (math.pow(self.__rating, 2) + v - math.exp(x0)) / math.pow(d, 3) x1 = x0 - (h1 / h2) return math.exp(x1 / 2) That loop, while x0 != x1: simply would not terminate!! or perhaps just take more time. I have seen it reached more than 5000 iteration without breaking the loop. So what I did is revised that function, limit it to loop a max of 1000 only to get the new volatility.

This topic has been archived and can no longer be replied to.