0

Consider the following latent variable model for a potential Elo rating with additional player type.

Each player has a performance level $r$ and a playing type $\theta$. Assume that a game between two players can be modelled as follows

  • Compute the difference in playing styles $$d_1 = \frac{\theta_1 - \theta_2}{2 \pi} \text{ modulo 1} \\d_2 = \frac{\theta_2 - \theta_1}{2 \pi} \text{ modulo 1}\\$$
  • Draw two random variables from a normal distribution $$X_1 = N(r_1+f(d_1),1) \\ X_2 = N(r_2+f(d_2),1)$$ where in the example here $f(d) = 300(1-d)^4d^2$
  • The player with the largest number wins.

The $r$ plays a role of a traditional ELO rating. The $\theta$ has an adjusting effect on the probability of outcomes. When an opponent is $1/3$ clockwise from you, then you have an advantage, when an opponent is $1/3$ counter-clockwise from you, then you have a disadvantage.

Below is an example of a simulation for 25 players, playing a round-robin tournament where each player sees another player 20 times (each player has 480 games).

example

In the image you can see the effect of the playing style. The scissor in the top with a score of 228 has an above average performance $r$, but is scoring lower than several rocks in the bottom with lower $r$. This is because the rocks encounter many scissors where they have an advantage, but the scissors encounter not so many papers.


Question: Say we have a matrix of results from players' games, can we estimate the underlying latent variables $r$ and $\theta$? (Where the $\theta$ has of course a free degree of freedom due to symmetry and we can only recover the relative $\theta$ values)

R code for generating example data:

set.seed(1)

generate some players

with random statistics

n = 25 r = rgamma(n,100,10) angle = runif(n,0,360)

function for outcome of a single game

game = function(x1,t1,x2,t2) { angle1 = ((t1-t2) %% 360)/360 angle2 = ((t2-t1) %% 360)/360 performance1 = rnorm(1,x1)+300(1-angle1)^6angle1^2 performance2 = rnorm(1,x2)+300(1-angle2)^6angle2^2 if (performance1 >= performance2) { return(1) } else { return(2) } }

play some games

M = matrix(rep(0,n*n),n)

for (i in 1:n) { for (j in 1:n) { if (i != j) { for (k in 1:10) { outcome = game(r[i],angle[i],r[j], angle[j]) if(outcome == 1) { M[i,j] = M[i,j] +1 } else { M[j,i] = M[j,i] +1 } } } } }

M[1:5,1:5]

The first 5 entries in the table will look like

     [,1] [,2] [,3] [,4] [,5]
[1,]    0   15    0   19   10
[2,]    5    0    0   17   13
[3,]   20   20    0   19   20
[4,]    1    3    1    0    5
[5,]   10    7    0   15    0
  • 1
    +1 Interesting problem. But what is your rationale for your choice of $f(d)$? https://doi.org/10.1006/anbe.1998.0755 does something similar but predicts intransitivity from known covariates rather than latent variables (so that the model can be fitted as a simple glm). – Jarle Tufto Mar 12 '23 at 11:15
  • @JarleTufto it is just a random function such that there is an effect that the best and worst opponents are at 1/3 rotation. In a more advanced situation this function $f(d)$ can be more flexible and itself subject of the estimation. I was thinking of alternatives that could work but a linear model but hadn't an idea. I will look at your reference. – Sextus Empiricus Mar 12 '23 at 11:31
  • At the moment I am thinking of an algorithm that looks at similarities between different players which might allow to order the players according to play type. I know something similar is done is movies of a beating heart where the frame rate is similar or slower than the heart beat, and the movie is reconstructed by ordering frames that look alike. (Virtual High-Framerate Microscopy Of The Beating Heart Via Sorting Of Still Images) – Sextus Empiricus Mar 12 '23 at 11:33

0 Answers0