The article itself doesn't arrive at the correct number of 5898 moves, but some of the commenters do. At my own page http://tromp.github.io/chess/longest.html you can play through a 3-moves-shorter game.
Seems like longest chess game is about less than 300 turns, there are 64 cells, and even if you don't know chess, and even without efficiently coded there are max of 128bits per turn (a lot of them not valid, and probably space that can be explored better) - e.g. it feels like not only the current position, but the history can be recorded in small amount of data in an URL.
Picking 16 out of thin air as the average number of possible moves per turn because it is ‘about right (tm)’ and simplifies the math, that would be just over 2,435 bytes (yes, even assuming that ‘16’ is the average, that math is broken, but who cares?)
You seem to be refuting a specific point of my argument which has little bearing on the overall point I was making.
All games were provided in the article. None of them were 4 move checkmates; nearly every one is longer than 20 moves and some are 40 or longer. There is simply no possible way that ChatGPT is regurgitating the exact same 40-move-long game it's seen before. You can check a chess database if you'd like; virtually all games longer than 20 moves are unique.
Maybe it was a typo. I also noticed that the article says "...the number of possible unique chess positions [is] roughly 1043," which is a typo. 1043 should be 10^43.
> Note: If you counted the pawn moving forward two squares with its initial move as distinct from its moving two individual squares, then there are 160 paths. Feeling generous, I gave full credit for either approach.
Chess is far more constrained than that. Pawns generally have 0 or 1 move with the maximum possible of 3 moves followed by piece selection which is knight or queen as bishops and rooks have the subset of a queens moves. There are a maximum of 8 pawns. Thus (8 * 3 * 2) = 48
Kings have a maximum of 8 moves. 2 Rooks a maximum of 14 = 28, 2 bishops 12 = 24, and 2 knights 8 = 16, queen = 36. And this is individually on an actual board there is often less then 50 legal choices (ex: 20 for opening) and the average game is 40 move (pairs).
Thus you could encode most chess matches as a tweet.
I think you need fewer than 17 bits: 1 for "who is to move", 4 for castling, 6.6 for the 50 moves (100 ply) rule would leave less than 6 for en passant. There potentially are 7 possible en passant moves (white pawns at a5, c5, e5, g5 and black ones at b5, d5, f5, and h5 or vice versa), but all you need to store is "the n-th pawn just moved" with n in 0..8. That is just over 3 bits.
There is a way more significant flaw in your logic, though: the "three times the same board position with the same player to move is a draw" rule. That explodes your estimate, as there could be (if we do not call in additional chess rules) up to 10^71 positions hat have been visited earlier.
With that in mind, I am not sure your limit is correct. There are at most 96 pawn moves in a game (16 pawns walk in 6 moves to the other side of the board) and 30 captures (7 pieces each plus 8 promoted pawns each). With the 50-move rule, that gives at most 126 x 50 = 6300 moves in a game. Each move can be encoded in 12 bits (starting and ending square for white's and black's move), so we need 75600 bits. Taking 2^10 = 1000, that gives me 10^22680 possible games as an upper limit.
I once studied the expected remaining length of a game of chess, as a function of moves played: https://chess.stackexchange.com/questions/2506/what-is-the-a...
What was interesting is that for the first 20 moves (40 half moves) the expected remaining length will decrease at a near linear rate, but then it levels off at about 25 remaining moves, and after 45 moves every move played will _increase_ the expected remaining length.
At the time it surprised me, but of course it is natural to expect long games to be long.
The longest 2x2 game possible seems to be 46 [1].
I can't find the source for the number given by tromp either. But considering that log_2(386,356,909,593) = ~ 38 and log_3(386,356,909,593) = ~24. If the board can have a branching factor of 2.5 on average for a game length of 30 moves, the number seems reasonable. There are 81 possible states (counting illegal states), and seems to be about 50 legal states. And I'd imagine any given state on a 2x2 board would easily have more than 2 possible moves :-).
reply