Elo Calcuation

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Elo Calcuation

Post by Laskos »

hgm wrote:The problem is that the engine you want to calculate the winning probability of has to be compared to the maximum of the score of its competitors. Ad there usually are only a small number of serious competitors, even in a large round-robin. The distribution of the maxium of a small number of normally distributed variables is not very Gaussian.
True, but this is a problem when one has few widely ditributed on Elo scale participants. I would try to take these 1900, 2600, 2700 Elo participants to see what happens. I am also disturbed by that 1900 participant, as the trinomial distributions would look more like Poisson or Gamma, but I hope it doesn't matter, because it will fade away after several games. For now I have an empirical normalized distribution function of points for a participant which scores ProbabilityOfSuccess against its opponent (I fitted the normalized Gaussian to a binomial, not trinomial, but the errors are small)

1/(sqrt(NumberOfGames) * 0.44*sqrt(2*pi)) * exp((X-ProbabilityOfSuccess * NumberOfGames)^2/(0.3872 * NumberOfGames))

where X is the number of points for which the distribution function gives the probability.

(your 0.40 formula for sigma becomes now 0.44 because of the binomial distribution taken, but it's a first try :) )

It's very easy now (with Erf function, integrating the Gaussian on an interval ) to calculate the probability of a tourney win for two engines, I hope it's simple to generalize to arbitrary number of participants. But it will be a pretty cumbersome rule of thumb :)


Kai
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Elo Calcuation

Post by Laskos »

There is a minus sign inside the exponential.

The first results only with 2600 and 2700 participants, the probabilities of a win (and half of the draws) in a tourney for 2600 participant are

4 games 26%
10 games 16%
40 games 2.2%
100 games 0.001%

I will include the 1900 participant, hope it's easy.

Kai
Rémi Coulom
Posts: 438
Joined: Mon Apr 24, 2006 8:06 pm

Re: Elo Calcuation

Post by Rémi Coulom »

Codeman wrote:For an Opening Book I want to use the elo information of the players
So lets say in a certain position 2 moves exist in a pgn to be parsed, I would weigh the two moves according to the probability of either player winning in a 1vs1 tournament.

E = 1 / (1 + 10 ^ ( ( EloB - EloA ) / 400 ) )

So this should work easily.

But what can I do if there is more than one possible move.
is there a simple way to estimate the chance of one person winning in a tournament versus several opponents?
Hi,

It is easy to generalize the Elo formula to more than two players, if this is what you wish to do. You can rewrite your formula that way, by multiplying numerator and denominator by 10^(EloA/400):

E = 10^(EloA/400) / (10^(EloA/400) + 10^(EloB/400))

So, if you have a third player, with EloC, you would write:

E = 10^(EloA/400) / (10^(EloA/400) + 10^(EloB/400) + 10^(EloC/400))

I am not sure this is what you wish to achieve, though.

Rémi
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Elo Calcuation

Post by Laskos »

I, like Remi, am not sure if I am answering your question, I understood that you need the probability of winning a RR tourney for each participant.

I fitted the normalized Gaussian to the trinomial with 1/3 draws, the distribution function now looks like

1/(Sigma*sqrt(2*pi)) * exp (-X^2/(2*Sigma^2))

where Sigma=0.41 * sqrt(Ngames)

Now, if p is the probabity of success (given by 1 / (1 + 10 ^ ( ( EloB - EloA ) / 400 ) )), then one has to integrate the above distribution function on the variable X from minus infinity to Ngames * (p(A)-p(b))/2 (or Erf function) for each pair of participants. When I have time I will try to give some numbers with three participants.

But maybe what you need is the simple Remi answer.

Kai
Edmund
Posts: 670
Joined: Mon Dec 03, 2007 3:01 pm
Location: Barcelona, Spain

Re: Elo Calcuation

Post by Edmund »

Thanks for your help!

Well .. what I have after parsing a pgn for my opening Book is for a certain position, many pairs of Elo and Game outcome for different moves. The question now, how can I weigh the moves using this information.

One simple way would be to just weigh according to win + draw counts.

Another alternative would be to look at the Elos (not at the results) and assume that better Players would rather chose a better move. Ie weigh the moves according to the chance of the average elo player (or the best player) winning a tournament against the players of the other moves.

A third Option I now considered was to use all information (Elos and Gameresult) present and assume that a move which led to a win for a player with a lower chance of winning to be stronger.

What do you think of the third option? I presented some formulas for it in earlier posts. Or any other suggestions for optimally using the available data.

Edmund
MattieShoes
Posts: 718
Joined: Fri Mar 20, 2009 8:59 pm

Re: Elo Calcuation

Post by MattieShoes »

I think the quality of the pgn file probably has more importance than anything. Assuming it contains only GM games and the position occurs often enough, the most common move is going to be a solid book move regardless of score or results or ratings of the players involved.

Of course, then you have to ask whether the engine can play the resulting positions correctly... I think the most common issue is comps playing c5 in certain openings where a GM would not.

[d] rnbqkbnr/pp2pppp/2p5/3p4/2PP4/8/PP2PPPP/RNBQKBNR w KQkq - 0 1

It's my understanding that c5 relieves tension in the middle and is very bad for white, but comps like to play it anyway. So unless steps are taken, comps tend to underperform in the slav or stonewall
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Elo Calcuation

Post by Laskos »

Codeman wrote:Thanks for your help!

Well .. what I have after parsing a pgn for my opening Book is for a certain position, many pairs of Elo and Game outcome for different moves. The question now, how can I weigh the moves using this information.

One simple way would be to just weigh according to win + draw counts.

Another alternative would be to look at the Elos (not at the results) and assume that better Players would rather chose a better move. Ie weigh the moves according to the chance of the average elo player (or the best player) winning a tournament against the players of the other moves.

A third Option I now considered was to use all information (Elos and Gameresult) present and assume that a move which led to a win for a player with a lower chance of winning to be stronger.

What do you think of the third option? I presented some formulas for it in earlier posts. Or any other suggestions for optimally using the available data.

Edmund
I don't think you can apply statistics to such a parser, at least not the Elo score. Elo value applies only to the final score and is intrisically a statistical quantity. The human games would differ from computer ones based on move-by-move analysis, as humans are playing variedly strong and weak moves. And I do not know how to quantize the move's Elo component, as the final result, which is reflected in Elo statistics, is about 50 moves long game of small or bigger mistakes. I am very skeptical of such assertions that this move is 3200 and this is 2400. Based on what?

I was just trying to give the probability of winnning a RR tourney for the predefined Elo values of engines, for several games each opponent, thus applying a statistical Elo-related method.

Regards,
Kai