It’s open source…

I guess it also is there in the code

from when the rating calculator was created, so possibly should be too hard, once eveything works

This function only considers `this`

player’s rating deviation and disregards the opponent’s (`white`

) deviation. This means that the result changes depending on which “side” you look from. i.e. p(A beats B) != 1 - p(B beats A).

It is named `expected_win_probability`

, but really just implements the function `E()`

from the Glicko PDF. Glicko does not mention the expected win probability, it only documents the rating update mechanism.

Does it?

```
const E =
1 /
(1 +
10 **
((-g(
Math.sqrt(this.deviation ** 2 + white.deviation ** 2),
this.deviation,
ignore_g,
) *
(this.rating + handicap_adjustment - white.rating)) /
400));
return E;
}
```

I see both this.rating and white.rating, this.deviation and white.deviation.

I know it doesn’t mention probability explicitly in the doc, but presumably, the expected win rate estimates the win probability within some confidence interval, given the ratings are only estimated with a confidence interval also?

The result of the expression `Math.sqrt(this.deviation ** 2 + white.deviation ** 2)`

is passed as the first argument to the `g`

function, namely `rd`

. This symbol does not occur in the body of `g`

and its value has no effect on the return value of `g`

.

Are we both talking about the document “The Glicko System” by Glickman, referred to in the comment under its URL http://www.glicko.net/glicko/glicko.pdf? It does not mention the expected win rate or anything “expected”.

Edit: Sorry for just repeating myself. So, you are actually saying that the expected win rate exists. And I agree. If you can figure it out, please tell me, I want to know too.

This is a good point actually, and also a reason where having some method where changes to the python code, could also update the js frontend code (as opposed to manually translating it ).

Originally it was based on the python code above here, which has been updated since.

That looks like it’s the opponents’ (whites) phi variable now, which was called deviation.

That probably makes more sense.

I suppose, if we’re not understanding each other, we can try work it out My guess is that it’s the same E used in Elo, the expected win rate (which is the probability for one player given that we’re not looking at draws) and the random variable is just win=1, loss=0.

It’s very much used in the same way, in the rating adjustments, the g factor weights the contribution of the score from the expected score, and then overall that seems to be scaled by some variance factor.

I suppose if we dig deeper than the glicko and glicko 2 pdfs, which seem more like example calculations, and look at the derivation in the other paper

http://www.glicko.net/research/glicko.pdf

with

from earlier.

I think functionally it looks the same, but is it being evaluated at different parameters?

In the glicko pdf you mentioned it does mention something “expected” on page 5

I guess this is why it’s not massively straightforward then to *just*

It’s confusing trying to figure out what it actually is, has it been implemented correctly, and so on

Shocking!

The version I have looks almost the same on the first page, except for being subtitled “June 1999” while the linked one is undated.

My copy does not include the sections “Expected outcome of a game” and “Confidence interval for a rating”. Now I don’t recall where I originally got it from; I thought it was just that same URL. Thanks for posting that excerpt! So we have worked out that I was confused and in the wrong.

From the homepage

Two rating systems I have invented:

- The Glicko rating system, which is in the public domain (document revised Sept 10, 2016, to clarify various aspects of the algorithm)
- The Glicko-2 rating system, an improvement on the original Glicko system. This document has been revised on March 22, 2022, to replace a “<” with “<=” in item 4(b) of Step 5 (page 3). The Glicko and Glicko-2 systems are in the public domain.

I’m guessing people rehost these pdfs all over the place, so I imagine it could be fairly easy to get an older version, if not just getting it pre an update.

In terms of the formula then, as I also would like to understand it, it seems like you use the g/E functions from the update steps but g is being evaluated at a different parameter is it when estimating win probability?

Maybe @dexonsmith knows also since he was testing some things with the python code (I can try mirror the changes if needed to the rating calculator).

[Edit: I’m noticing some other small differences, other than notation between the documents, like the argument to g being g(sigma^2) vs g(sigma) which is probably why there’s a sqrt in the expression on that page 5]

When deviation = 0, the estimated win rate E is equal to the ELO estimate. Outside of rating updates it should be safe to ignore the deviation.