Skip to content
Little GolemMake your next move.

score table of einstein

Public forum discussion.

Einstein

#1 · Hjallti

14 Oct 2009

It might be a nice and not so hard challenge to create a programm that given a tournament of einstein

returns

1) a table with the scores so far

2) a table with results if the leaders in each game win

3) a table with predicted results (a 1-0 lead should get less importance than a 2-0 lead)

What I wanted to say is that I would be very grateful if someone programmed this and would make a feature we all can use :-)

#2 · FatPhil

14 Oct 2009

Looking into individual games is something which RoRoRo doesn't do, and one that would have no use except in EinStein. I'm certainly not going to have him make any predicitions based on board position (that being 'talking about a game in progress').

#3 · Hjallti

15 Oct 2009

I even didn't consider that you had all the input info on one page. Anyway the challenge stands, and was never supposed to be a direct question to you. By the way it might be useful in StreetSoccer as well, but in games like reversi and go it would be really bad.

#4 · FatPhil

24 Nov 2009

This is in a trial state for EinStein currently. They're not published yet, but I ran them over an example MC league, and here are the debugging logs:

Tournament: einstein.mc.2009.may.2.3
<br/>Num Players: 6
<br/>Games completed: 5/15
<br/>Game Value: 2
<br/> N Player                        Rating | 1 2 3 4 5 6 Score Son  p(win)  p(draw)
<br/> 1 Jordi                         (1674) | \ + = - = 2   2     0  18.95%  5.43%
<br/> 2 Diamante                      (1728) | - \ = - = 2   2     0  30.72%  5.99%
<br/> 3 pyssso                        (1541) | = = \ + = 2   2     0   4.58%  2.32%
<br/> 4 FatPhil                       (1730) | + + - \ = 2   2     0  31.46%  6.10%
<br/> 5 Hubert O G                    (1583) | = = = = \ 2   2     0   7.58%  3.06%
<br/> 6 S_pecial                      (1448) | 0 0 0 0 0 \   0     0    0       0
<br/>

Is that the kind of thing you had in mind? (The HTML might be a little more informative than just '+','=','-'.)

The advantage/disadvantage _isn't_ yet factored into the predictions, but I'd need to do some maths to work out how partial scores affect outcomes.

#5 · FatPhil

24 Nov 2009

I wish Richard hadn't 'fixed' pre elements. Let's try something different...

o o<br/> l<br/>\_/

#6 · Dvd Avins

24 Nov 2009

The challenge I see, and it doesn't seem like an especially hard one, is to figure what rating difference in a 1-point match would make for a given ratign difference in best 3-of-5. You then translate all ra5ting differences to the smaller best-of-1 differences and figure each point individually.

#7 · FatPhil

30 Nov 2009

See my recent posts to sci.math regarding inversion of the function. It was harder than expected. In the end I used simulated annealing to evolve a function which is accurate to 3d.p. everywhere, based on Don Reble's suggestion.

Anyway, RoRoRo now takes the frame score into account when evaluating probabilities for victory. He does this by using a modified value for player 1's ratings.

Only exercised once, for this tournament here. I just put the finishing touches on the formulae now, and unfortunately it's not tested the 1-1 or 2-2 pathways, but it still looks promising:

ESbot:getdrawvariance(1731,1772,2-1)

wr=1731, sr=1772, wadj=2-1, flip= :

ww5=0.441268630675239, ww1=0.468613238353314 (ww5=0.441304239166581)

-> ww5=0.717628109546649. So dr=-162.031192126494, wr->1934.03119212649

ESbot:getdrawvariance(1647,1772,1-0)

wr=1647, sr=1772, wadj=1-0, flip= :

ww5=0.327490356665015, ww1=0.405658820238613 (ww5=0.327263753050015)

-> ww5=0.534554808565084. So dr=-24.0494770633294, wr->1796.04947706333

ESbot:getdrawvariance(1731,1506,1-1)

wr=1506, sr=1731, wadj=1-1, flip=1:

ww5=0.214973263001828, ww1=0.33656166558549 (ww5=0.214682305249821)

-> ww5=0.263574057099074. So dr=178.490567166742, wr->1552.50943283326

but flipped, so [1731,1506] -> [1684.49056716674,1506]

ESbot:getdrawvariance(1647,1641,1-0)

wr=1641, sr=1647, wadj=0-1, flip=1 :

ww5=0.491366164178917, ww1=0.495490663847081 (ww5=0.491545453168833)

-> ww5=0.3057666790857. So dr=142.446119245607, wr->1504.55388075439

but flipped, so [1647,1641] -> [1783.44611924561,1641]

ESbot:getdrawvariance(1641,1535,1-0)

wr=1535, sr=1641, wadj=0-1, flip=1 :

ww5=0.352016986749694, ww1=0.419603417035106 (ww5=0.35183451497424)

-> ww5=0.202514511001248. So dr=238.106656697536, wr->1402.89334330246

but flipped, so [1641,1535] -> [1773.10665669754,1535]

Everything's done in terms of the weaker player's probabilities, which is why there's a 'flip' mentioned.

wr and sr are the weaker and stronger players' ratings.

ww5 starts as the a priori probability of the weaker player winning a best of 5 based on nothing but those ratings.

ww1 is then the probability that the weaker player would win 1 game.

(ww5 is then the result of putting ww1 back into the best-of-5 formula as a sanity check - all are within about 0.0002)

-> ww5 is the deduced probability of winning this game given the current score.

dr is the synthesised ratings difference between the two players given this probability

Then the flipping kicks back in to confuse matters, for reasons of implementation

If player 1 is the weaker player, then wr will be his new synthesised rating based on sw and dr.

If player 2 is the weaker player, then we instead modify the stronger player's rating based on wr and dr.

And no, I'm not expecting you to check my calculations, but I just want people to be assured that RoRoRo's not doing anything meaningless.

And now to street-soccer! (Which requires a change to the architecture, as I need to know the move number in order to evaluate the advantage :-o )

#8 · FatPhil

30 Nov 2009

Woh - it did test the 1-1 pathway! In all my runs last night, there were no 1-1 games. And it looked like it worked.

ESbot:getdrawvariance(1731,1506,1-1) ... [1684,1506]

So the 1-1 state has improved the odds for the weaker player, it's as if he's playing a less strong opponent now.

I'll consider that code path tested now too!

#9 · Dvd Avins

30 Nov 2009

You might consider steering clear of street-soccer-specific calculations. There, one's level of desperation can affect the appropriate strategy. It really is a single game. That's as opposed to Einstein, where each point is really a separate contest that does not affect the strategy for the next contest.

#10 · Dvd Avins

30 Nov 2009

BTW, very nice work on Einstein. I was imagining that if a theoretical solution was difficult, you'd just use simulations to create a table of appropriate ww1s. But a theoretical solution, which I guess you found, is much more satisfying.

#11 · FatPhil

30 Nov 2009

Thanks - It was a simply inversion of a quintic between two local flat-spots. Newton-Raphson would have done the business quite easily too, but I wanted a simple formula rather than iteration. Robert Israel's posted an even better formula to sci.math, so I'll migrate to that next time I edit the source.

Regarding street soccer - I don't know what I'll do, but given that nobody else has any idea what to do either, I can't go far wrong! As long as it's correct in the middle, correct at the extrema, points in approximately the right direction at those 3 places, and transitions smoothly between them I shall be happy. I suspect it will end up being nothing more than an arctangent, or hyperbolic sine, or something...

You're certainly right that being a single game does make it a different situation from the EinStein one.

#12 · Dvd Avins

30 Nov 2009

My point was that since it is a single game, using the score and the number of moves left is at least entering a gray area regarding analyzing the position on the board. Personally, I think that gray is rather charcoal colored. It also is prone to be inaccurate, as the situation certainly changes the strategies used by the players.

#13 · Dvd Avins

30 Nov 2009

What can be done without distortion or making assumptions about players' strategy, is to 1) treat as decided any game where the losing side has fewer kicks left than they are goals behind, 2) eliminate as a possibility of all games in overtime a 5-0 score, 3) eliminate from games in overtime either a 2-2 score or a 3-2 score, depending on whether the current score in 0-0, and 4) in regulation time, where based on kicks remaining the losing player can at best tie, eliminate the possibilities of a 5-0 win, a 2-2 tie, and a 3-2 loss.

All that seems like more trouble than it's worth, to me.

#14 · FatPhil

30 Nov 2009

Regarding the comment 11 hours back - the situation does indeed change the strategy used by the players, but as long as RoRoRo's prediction doesn't change the strategy used by either player, then I don't think it falls foul of the making a comment about a game progress principle. The guy who's up already knows that he's ahead. That's all RoRoRo's predictions will tell him.

Your latter comment, however, is much closer to the reality - he's very very sloppy about the rules currently, and doesn't even understand all the possible outcomes. Fortunately most games result in 5-0, so the error's not as bad as it could be. He does understand non-5-0 results exist, but I'll not say much more than that lest you laugh.

#15 · FatPhil

30 Nov 2009

Actually, the _predictions_ won't even tell him that. Only the putative '+' sign will tell him that.

#16 · Hjallti

15 Apr 2010

I totally missed this... Great work FatPhil! Thanks!!!!