Contempt and the ELO model.
Moderators: bob, hgm, Harvey Williamson
Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Contempt and the ELO model.
Standard contempt (changing the draw score) is supposed to make an engine play better against weaker engines and worse against stronger engines.
If(!) this is true then it is clearly impossible within the standard logistic elo model.
Question: is there a mathematically nice way of upgrading the elo model so that it can incorporate contempt like behaviour?
I assume it would involve introducing at least one additional engine parameter besides elo. Perhaps "aggressiveness"?
If(!) this is true then it is clearly impossible within the standard logistic elo model.
Question: is there a mathematically nice way of upgrading the elo model so that it can incorporate contempt like behaviour?
I assume it would involve introducing at least one additional engine parameter besides elo. Perhaps "aggressiveness"?
 hgm
 Posts: 24622
 Joined: Fri Mar 10, 2006 9:06 am
 Location: Amsterdam
 Full name: H G Muller
 Contact:
Re: Contempt and the ELO model.
Setting contempt would simply decrease the DrawElo parameter of the model, right? You would get fewer draws, and force them to become either wins or losses. What they become depends (statistically) on the Elo difference with your opponent; you are not going to play any better just because you refuse to take draws.
To use this in an analysis you should allow a twoparameter description of players (strength, predisposition for contempt), where the DrawElo should be a function of the rating difference and predisposition for contempt of both players.
To use this in an analysis you should allow a twoparameter description of players (strength, predisposition for contempt), where the DrawElo should be a function of the rating difference and predisposition for contempt of both players.
Re: Contempt and the ELO model.
I think that things are not so simple.hgm wrote:Setting contempt would simply decrease the DrawElo parameter of the model, right? You would get fewer draws, and force them to become either wins or losses. What they become depends (statistically) on the Elo difference with your opponent; you are not going to play any better just because you refuse to take draws.
To use this in an analysis you should allow a twoparameter description of players (strength, predisposition for contempt), where the DrawElo should be a function of the rating difference and predisposition for contempt of both players.
I can imagine that contempt that is too high may increase the number of draws against some weaker opponent.
Imagine that you play against some opponent and you need to choose between move A and move B.
After move A the opponent can force a draw and you see it but the opponent does not see the draw or evaluates some alternative as better than draw for it.
After move B the opponent has an advantage of 0.5 pawn but no forced draw that you can see.
With very high comtempt you can prefer move B and later fight for a draw and get the draw when practically you could win by move A because in case of move A the choice of the opponent is not to force the draw but to play a losing move.
Re: Contempt and the ELO model.
I like the suggestion but I would like to see a model...
How would you model "predisposition for contempt"? And how would DrawElo be computed from it?
DrawElo seems to be dependent on absolute elo and not just elo difference. Of course this can be explained by the fact that the parameters (elo,"predisposition for contempt") maybe somewhat correlated with weaker engines generally having higher "predisposition for contempt".
Another issue is that DrawElo is bigger for self play than for foreign play. But this is unmodelable with engine parameters I think. It would require instead a "similarity" parameter for pairs of engines.
My suggestion did not use DrawElo but instead an extra parameter "aggessiveness" (agg). The effective elo difference for a match between two engines would be (ignoring black/white).
agg1*agg2*(elo2elo1)
Note that this increases the gauge group from a 1 dimensional group (translations) to a two dimensional group (translations and dilations). So "gauge fixing" (standard candles if you want) becomes an issue.
How would you model "predisposition for contempt"? And how would DrawElo be computed from it?
DrawElo seems to be dependent on absolute elo and not just elo difference. Of course this can be explained by the fact that the parameters (elo,"predisposition for contempt") maybe somewhat correlated with weaker engines generally having higher "predisposition for contempt".
Another issue is that DrawElo is bigger for self play than for foreign play. But this is unmodelable with engine parameters I think. It would require instead a "similarity" parameter for pairs of engines.
My suggestion did not use DrawElo but instead an extra parameter "aggessiveness" (agg). The effective elo difference for a match between two engines would be (ignoring black/white).
agg1*agg2*(elo2elo1)
Note that this increases the gauge group from a 1 dimensional group (translations) to a two dimensional group (translations and dilations). So "gauge fixing" (standard candles if you want) becomes an issue.
 Kirill Kryukov
 Posts: 492
 Joined: Sun Mar 19, 2006 3:12 am
Re: Contempt and the ELO model.
This problem is one of the reasons why I am estimating performance slope in addition to ratings in KCEC list ("Perf. slope" column). I assume each engine gains or loses rating depending on difference from opponent, and that this value depends linearly on rating difference.Michel wrote:Standard contempt (changing the draw score) is supposed to make an engine play better against weaker engines and worse against stronger engines.
If(!) this is true then it is clearly impossible within the standard logistic elo model.
Question: is there a mathematically nice way of upgrading the elo model so that it can incorporate contempt like behaviour?
I assume it would involve introducing at least one additional engine parameter besides elo. Perhaps "aggressiveness"?
Some engines have significant slope, for example Requiem or Simontacchi (you can see the scatterplots of performances at those links). This slope only sometimes results from contempt. More often it's a consequence of severe bugs.
The easiest way to address the problem may be to first estimate the ratings normally, and then correct the ratings using performance slope and average opponent for each engine. This won't be very accurate, a better way would be to incorporate these extra parameters into the model. Another additional parameter may be drawness. So each engine will be described by three numbers (rating, perf. slope, drawness) instead of just rating.
I haven't completed the method yet, so for now it's just some observations.
Re: Contempt and the ELO model.
Hey that is very nice data! I will look closer at it.This problem is one of the reasons why I am estimating performance slope in addition to ratings in KCEC list ("Perf. slope" column). I assume each engine gains or loses rating depending on difference from opponent, and that this value depends linearly on rating difference.
It seems "Perf. slope" may be somewhat similar to the "aggressiveness" parameter I was proposing.

 Posts: 2557
 Joined: Thu Jun 07, 2012 9:02 pm
Re: Contempt and the ELO model.
Yes  Kirill's site is superb. A hidden gem that many people are not aware of.Michel wrote:Hey that is very nice data! I will look closer at it.This problem is one of the reasons why I am estimating performance slope in addition to ratings in KCEC list ("Perf. slope" column). I assume each engine gains or loses rating depending on difference from opponent, and that this value depends linearly on rating difference.
It seems "Perf. slope" may be somewhat similar to the "aggressiveness" parameter I was proposing.

 Posts: 3943
 Joined: Tue Mar 14, 2006 10:34 am
 Location: Ethiopia
 Contact:
Re: Contempt and the ELO model.
I did something similar in Bopo but it is not same as contempt. Instead of fixed 'Drawelo' and 'Homeadvantage', I have additional slope parameters for both that vary with the average elo of the players (not their difference). Then I used CG to minimize the likelihood function that takes much longer time than MM. This was found to give much better results but Remi didn't like the two additional parameters and slow computation.
As you pointed out, Drawelo is probably not same as contempt as it depends on average elo. You can have one additional parameter, contempt, for each player and scale up/down the elo differences between players based on it like you did in your formula. It should be easy to incorporate it in bopo and solve with CG as follows but it would require a parameter for each player unlike the shared eloDraw and eloHomeAdvantge params.
As you pointed out, Drawelo is probably not same as contempt as it depends on average elo. You can have one additional parameter, contempt, for each player and scale up/down the elo differences between players based on it like you did in your formula. It should be easy to incorporate it in bopo and solve with CG as follows but it would require a parameter for each player unlike the shared eloDraw and eloHomeAdvantge params.
Code: Select all
static double win_prob(double pelo,double oelo) {
double eloDelta = pelo  oelo; /****** change this to agg1*agg2*(pelooelo)*********/
//double avg = (elo_to_gamma(pelo) + elo_to_gamma(oelo)) / 2;
double eloD = eloDraw;//eloDrawSlope * avg + eloDraw;
double eloH = eloHome;//eloHomeSlope * avg + eloHome;
if(eloModel == 0) {
return logistic(eloDelta  eloH + eloD);
} else if(eloModel == 1) {
double thetaD = elo_to_gamma(eloD);
double f = thetaD * sqrt(logistic(eloDelta + eloH) * logistic(eloDelta  eloH));
return logistic(eloDelta  eloH) / (1 + f);
/*
double g1 = elo_to_gamma(pelo);
double g2 = elo_to_gamma(oelo);
double th = elo_to_gamma(eloH);
double td = elo_to_gamma(eloD);
return th * g1 / (th * g1 + g2 + td * pow(th * g1 * g2,DVPWR));
*/
} else {
return gaussian(eloDelta  eloH + eloD);
}
}
Re: Contempt and the ELO model.
In Ordo's conceptual model, every match is played at the same temperature. In your case, there are players who play "hot" (win more against stronger opposition but lose more against weaker ones) or "cold" (the opposite). Temperature is part of the Boltzmann Beta (beta = 1/(k*T)), which ends up being the beta of the logistic equation. So, each player should have an extra parameter that modifies the particular beta for that particular match.Michel wrote:Standard contempt (changing the draw score) is supposed to make an engine play better against weaker engines and worse against stronger engines.
If(!) this is true then it is clearly impossible within the standard logistic elo model.
Question: is there a mathematically nice way of upgrading the elo model so that it can incorporate contempt like behaviour?
I assume it would involve introducing at least one additional engine parameter besides elo. Perhaps "aggressiveness"?
I do not think it will give significant improvement and could overfit the data. But it will be interesting to explore.
Miguel
Re: Contempt and the ELO model.
What is CG? Probably obvious but I feel a bit stupid right now...It should be easy to incorporate it in bopo and solve with CG as follows but it would require a parameter for each player unlike the shared eloDraw and eloHomeAdvantge params.
Having an extra parameter is a nuissance but unavoidable I think.
It would be nice if the model would quantify that certain engines play "drawish" or "aggressive".