## How to simulate a game outcome given Elo difference?

**Moderators:** bob, hgm, Harvey Williamson

**Forum rules**

This textbox is used to restore diagrams posted with the [d] tag before the upgrade.

### How to simulate a game outcome given Elo difference?

Can I do it in 2 steps, like considering draw probability constant, and then using Elo formula to "predict" the result, then take that as a probability for the stronger engine to win?

The problem with this approach is that the draw probability also depends on the Elo difference, at least when this is far from 0...

The problem with this approach is that the draw probability also depends on the Elo difference, at least when this is far from 0...

### Re: How to simulate a game outcome given Elo difference?

First, use logistic for score <---> Elo, the evidence supports that. Second, it's plausible that in (computer) Chess the draws obey Davidson model ---> draw_probab**2 = C*loss_probab*win_probab. You will not find agreement with Bayeselo, which uses Rao-Kupper ---> draw_probab**1 = C*loss_probab*win_probab, but it was shown empirically that Rao-Kupper doesn't suit well computer Chess. Use Ordo for ratings, as it uses Davidson.nionita wrote:Can I do it in 2 steps, like considering draw probability constant, and then using Elo formula to "predict" the result, then take that as a probability for the stronger engine to win?

The problem with this approach is that the draw probability also depends on the Elo difference, at least when this is far from 0...

### Re: How to simulate a game outcome given Elo difference?

Thanks Kai.Laskos wrote:First, use logistic for score <---> Elo, the evidence supports that. Second, it's plausible that in (computer) Chess the draws obey Davidson model ---> draw_probab**2 = C*loss_probab*win_probab. You will not find agreement with Bayeselo, which uses Rao-Kupper ---> draw_probab**1 = C*loss_probab*win_probab, but it was shown empirically that Rao-Kupper doesn't suit well computer Chess. Use Ordo for ratings, as it uses Davidson.nionita wrote:Can I do it in 2 steps, like considering draw probability constant, and then using Elo formula to "predict" the result, then take that as a probability for the stronger engine to win?

The problem with this approach is that the draw probability also depends on the Elo difference, at least when this is far from 0...

I came up with the equations:

d = 2 * e - 2 * w

d * d = C * w * (1 - w - d)

where w, d are probabilities to win, respective draw,

e is the expectation result (score given Elo difference), and

C is a constant which has to be somehow determined (do you have values?)

At the end the final equation for win probability is:

(4-C)*w*w + (2*C*e - 8*e - C)*w + 4*e*e = 0

I wondered is I can find conditions for C so that this equation has always real solutions, at least one in (0, 1), for every e in (0, 1). But the calculations are complicated.

### Re: How to simulate a game outcome given Elo difference?

This solution for w:nionita wrote:Thanks Kai.Laskos wrote:First, use logistic for score <---> Elo, the evidence supports that. Second, it's plausible that in (computer) Chess the draws obey Davidson model ---> draw_probab**2 = C*loss_probab*win_probab. You will not find agreement with Bayeselo, which uses Rao-Kupper ---> draw_probab**1 = C*loss_probab*win_probab, but it was shown empirically that Rao-Kupper doesn't suit well computer Chess. Use Ordo for ratings, as it uses Davidson.nionita wrote:Can I do it in 2 steps, like considering draw probability constant, and then using Elo formula to "predict" the result, then take that as a probability for the stronger engine to win?

The problem with this approach is that the draw probability also depends on the Elo difference, at least when this is far from 0...

I came up with the equations:

d = 2 * e - 2 * w

d * d = C * w * (1 - w - d)

where w, d are probabilities to win, respective draw,

e is the expectation result (score given Elo difference), and

C is a constant which has to be somehow determined (do you have values?)

At the end the final equation for win probability is:

(4-C)*w*w + (2*C*e - 8*e - C)*w + 4*e*e = 0

I wondered is I can find conditions for C so that this equation has always real solutions, at least one in (0, 1), for every e in (0, 1). But the calculations are complicated.

w = (-C - 8*e + 2*C*e + sqrt[C] * sqrt[C + 16*e - 4*C*e - 16*e*e + 4*C*e*e]) / (2*[C-4])

has real results for w in (0,1) for every e in the interval (0,1) for any positive C. There is a second solution, but it gives weird results.

Empiric values for C are in units, say C=4 for reasonably matched engines at reasonable time controls. In fact the draw model is pretty crappy, as C depends on each engine pair and on strength (slowly increases with strength).

- Ajedrecista
**Posts:**1405**Joined:**Wed Jul 13, 2011 7:04 pm**Location:**Madrid, Spain.-
**Contact:**

### Re: How to simulate a game outcome given Elo difference?

Hello:

I hope no typos. I did C = C(e, w) while Kai did w = w(e, C). It looks like I agree with Kai (C = 4 + ...). I wish you good luck.

Regards from Spain.

Ajedrecista.

I got the following:nionita wrote:

Thanks Kai.

I came up with the equations:

d = 2 * e - 2 * w

d * d = C * w * (1 - w - d)

where w, d are probabilities to win, respective draw,

e is the expectation result (score given Elo difference), and

C is a constant which has to be somehow determined (do you have values?)

At the end the final equation for win probability is:

(4-C)*w*w + (2*C*e - 8*e - C)*w + 4*e*e = 0

I wondered is I can find conditions for C so that this equation has always real solutions, at least one in (0, 1), for every e in (0, 1). But the calculations are complicated.

Code: Select all

```
C = d²/[w*(1 - w - d)]
C = [2*(e - w)]²/{w*[1 - w - 2*(e - w)]}
C = 4*(e² - 2*e*w + w²)/(w - 2*e*w + w²)
C = 4*(e² - 2*e*w + w² + w - w)/(w - 2*e*w + w²)
C = 4*[1 + (e² - w)/(w - 2*e*w + w²)]
====================================
C = 4 + (4/w)*(e² - w)/(1 - 2*e + w)
====================================
```

Regards from Spain.

Ajedrecista.

### Re: How to simulate a game outcome given Elo difference?

We also have to restrict solutions to be squeezed between w=e (w is always smaller or equal to e) and w=2*e-1 (d is between 0 and 1), thus C might be restricted, but it turns out it's unbounded positive:Ajedrecista wrote:Hello:

I got the following:nionita wrote:

Thanks Kai.

I came up with the equations:

d = 2 * e - 2 * w

d * d = C * w * (1 - w - d)

where w, d are probabilities to win, respective draw,

e is the expectation result (score given Elo difference), and

C is a constant which has to be somehow determined (do you have values?)

At the end the final equation for win probability is:

(4-C)*w*w + (2*C*e - 8*e - C)*w + 4*e*e = 0

I wondered is I can find conditions for C so that this equation has always real solutions, at least one in (0, 1), for every e in (0, 1). But the calculations are complicated.

I hope no typos. I did C = C(e, w) while Kai did w = w(e, C). It looks like I agree with Kai (C = 4 + ...). I wish you good luck.Code: Select all

`C = d²/[w*(1 - w - d)] C = [2*(e - w)]²/{w*[1 - w - 2*(e - w)]} C = 4*(e² - 2*e*w + w²)/(w - 2*e*w + w²) C = 4*(e² - 2*e*w + w² + w - w)/(w - 2*e*w + w²) C = 4*[1 + (e² - w)/(w - 2*e*w + w²)] ==================================== C = 4 + (4/w)*(e² - w)/(1 - 2*e + w) ====================================`

Regards from Spain.

Ajedrecista.

Orange ---> solution to w(e,C).

Green ---> w=e

Blue ---> w=2*e-1

The solution never intersects boundaries, so C in unrestricted positive.

### Re: How to simulate a game outcome given Elo difference?

I think the correct approach is to determine C statistically and solve the equation for w (then d and l) given e, which comes from Elo difference.

Many thanks, I needed it to test an algorithm for parameter optimization, and before I try long chess matches I wanted to be sure it works well on some known functions, where I consider the function value as Elo difference.

Many thanks, I needed it to test an algorithm for parameter optimization, and before I try long chess matches I wanted to be sure it works well on some known functions, where I consider the function value as Elo difference.