lichess.org
Donate

The Uniqueness of Chess Games.

First off sorry for the late response. I have to say I'm impressed with your industriousness in working on this question and the way you laid everything out. I once had that kind of energy when I was a youngster lol.
I don't have a python interpreter installed, but I'm guessing I could run that on an online one?
Very interesting that in case one even to depth 40 it is a ~certainty that two identical games have been played. I think at some point in this thread we were saying it'd be like a 0.0001 chance. So it's amazing we went from those very low odds to virtual certainty.

"For case 2 (any of the games played by a specific player is identical to any of the other games played by other players) the probability is already relatively low around move 20."
But in your post you gave a value of "1" for that probability? I'm guessing that was a typo.

Now here is another thing to ponder that strikes me now. For all the first 3 cases the specific move order is NOT a factor. So in other words if two different move orders transpose to the same position you are counting that as identical games, whereas in the last 3 cases the move order must be identical. So in the first 3 cases, where move order is not a factor, what comes to mind for me is that I believe the probability as a function of depth should have a lowest value.
In other words as you start increasing the depth the probability will go down BUT in reality when you get to depth 80 at that point because the number of pieces remaining on the board is greatly reduced the probability should actually start going UP again. Think of how many games have been won with just a K and R vs K for example, and there are only so many checkmate positions possible with those pieces into which all possible move orders that end like that must converge. With that kind of depth I'd bet we are back at p=~1 again.
And this is a great example to illustrate the idea that theoretical calculations while appearing convincing and giving us great confidence, can be wayyyyyyyyy off by orders of magnitude because factor X was not taken into account :P
Still as you said it's very nice to get some numbers down to look at. Even if they are just a frame of reference that you might think of as a lower or upper bound.
@President_DonaldDuck

Good idea with the online interpreter:

repl.it/repls/LiquidAdventurousGlitches

Select the main module on the left and then click the 'run' button on the top.

---

Notice that in my examples from #40 'depth' means 'ply' alias HALF moves. It was not a typo, the examples are referring to move 10, 20, 25, 30, 40. alias half move 20, 40, 50, 60, 80. See the glossary in my repo: github.com/heronils/Chessprob#glossary (the DEPTH variable).

---

Regarding your third paragraph, no, you misunderstood that, the six cases always exclude transpositions. It is best explained by example:

If we convert your first sentence in #1 ...

'Sometimes when I'm playing chess I wonder if this exact game has ever been played before'

... to examples for the six cases, then it would become:

case 1: 'I wonder if any game has been played twice'
case 2: 'I wonder if any of my games has been played twice'
case 3: 'I wonder if the first game played in 1980 has been played twice' (this probability matches your question)
case 4: 'I wonder if the moves "1.e4 e5 Nf3" have been played twice' (this is different to case 3 because the moves may also have never been played)
case 5: 'I wonder if any of my games has the moves "1.e4 e5 Nf3" and has been played twice'
case 6: 'I wonder if if the first game played in 1980 has the moves "1.e4 e5 Nf3" and has been played twice'

I didnt ask (or didnt mean to ask) for the cases four to six but Eyeballfrog included them, so i also included them in my code.

---

There is an error in Eyeballfrogs formulas and in my code. We did not divide ALLGAMES by 2 (this needs to be done because the players play against each other). Fixed.

This topic has been archived and can no longer be replied to.