Elo and Draws.
Thu 04 May 2017
by
Steven E. Pav
I still had some nagging thoughts after my recent
examination of the distribution of Elo. In that
blog post, I recognized that a higher probability of a draw would lead
to tighter standard error around the true 'ability' of a player, as
estimated by an Elo ranking. Without any data, I punted on what that
probability should be. So I decided to look at some real data.
I started working in a risk role about a year ago. Compared to my
previous gig, there is a much greater focus on discrete event
modeling than on continuous outcomes. Logistic regression and
survival analysis are the tools of the trade. However,
financial risk modeling is more complex than the textbook
presentation of these methods. As is chess. A loan holder might
go bankrupt, stop paying, die, etc. Similarly, a chess player
might win, lose or draw.
There are two main ways of approaching multiple outcome discrete
models that leverage the simpler binary models: the competing hazards
view, and the sequential hazards view. Briefly, risk under
competing hazards would be like traversing the Fire Swamp: at any time,
the spurting flames, the lightning sand or the rodents of unusual
size might harm you. The risks all come at you at once.
An example of a sequential hazard is undergoing
surgery: you might die in surgery, and if you survive you might incur
an infection and die of complications; the risks present themselves
conditional on surviving other risks. (Both of these
views are mostly just conveniences, and real risks are never so
neatly defined.)
Returning to chess, I will consider sequential hazards.
Assume two players, and let the difference in true abilities between
them be denoted \(\Delta a\).
As with Elo, we want the difference in abilities is such that
the odds that the …
read more
Distribution of Elo.
Sat 15 April 2017
by
Steven E. Pav
I have been thinking about Elo ratings recently, after
analyzing my tactics ratings. I have a lot of
questions about Elo: is it really predictive of performance? why don't we
calibrate Elo to a quantitative strategy? can we really compare players
across different eras? why not use an extended Kalman Filter instead of
Elo? etc. One question I had which I consider here is, "what is the
standard error of Elo?"
Consider two players. Let the difference in true abilities between
them be denoted \(\Delta a\), and let the difference in their
Elo ratings be \(\Delta r\). The difference in abilities is such that
the odds that the first player wins a match between them
is \(10^{\Delta a / 400}\). Note that the raw abilities and ratings
will not be used here, only the differences, since they are only
defined up to an arbitrary additive offset.
When the two play a game, both their scores are updated according
to the outcome. Let \(z\) be the outcome of the match from the
point of view of the first player. That is \(z=1\) if the first player
wins, \(0\) if they lose, and \(1/2\) in the case of a draw. We update
their Elo ratings by
$$
\Delta r \Leftarrow \Delta r + 2 k \left(z - g\left(\Delta r\right) \right),
$$
where \(k\) is the \(k\)-factor (typically between 10 and 40), and \(g\)
gives the expected value of the outcome based on the difference in
ratings, with
$$
g(x) = \frac{10^{x/400}}{1 + 10^{x/400}}.
$$
Because we add and subtract the same update to both players' ratings, the
difference between them gets twice that update, thus the \(2\).
Let \(\epsilon\) be the error in the ratings: \(\Delta r = \Delta a + \epsilon\).
Then the error updates as
$$
\epsilon …
read more
Chess Tactics.
Thu 30 March 2017
by
Steven E. Pav
I have become more interested in chess in the last year, though I'm still
pretty much crap at it. Rather than play games, I am practicing tactics
at chesstempo. Basically you are presented
with a chess puzzle, which is selected based on your estimated tactical
'Elo' rating, and your rating (and the puzzle's) is adjusted based
on whether you solve it correctly. (Without time limit for standard
problems, though I believe one can also train in 'blitz' mode.)
I decided to look at the data.
I have a few reasons for this exercise:
- To see if I could do it. You cannot easily download your stats
from the site unless pay for gold membership. (I skimped and
bought a silver.) I wanted to practice my web scraping skills,
which I have not exercised in a while.
- To see if the site's rating system made sense as a logistic
regression, and were consistent with the 'standard' definition
of Elo rating.
- To see if I was getting better.
- To see if there was anything simple I could do to improve, like
take longer for problems, or practice certain kinds of problems.
- To look for 'hot hands' phenomenon, which would translate into
autocorrelated residuals.
The bad and the ugly
Scraping my statistics into a CSV turned out to be fairly straightforward.
The statistics page will
look uninteresting if you are not a member. Even if you are, the data
themselves are served via JavaScript, not in raw HTML. While this
could in theory be solved via, say, phantomJS,
I opted to work with the developer console in Chrome directly.
First go to your statistics page in Chrome.
Then conjure the developer console by pressing <CTRL>-<SHIFT>-I
.
A frame should appear.
Click on the 'Console' tab, then type in it:
copy(document.body …
read more