Preferences

But this an interesting problem too. More specifically is there an upper bound for the number of moves in a legal chess game?

I believe 8848.5 under modern rules (with the 75-move rule, as in FIDE rules since 2014). There's a reasonably rigorous demonstration here:

https://wismuth.com/chess/longest-game.html

Thanks for that link! I was looking for that answer a few years ago, but I couldn't find anyone who had carried it out all the way through (with the cost of "switching control" fully accounted for), nor many people who were even aware of the 75-move rule.
75 move rule?! Did they go and change the 50 move rule or something, because I've never heard of it.
The 50 move rule is still there: either player has the right to claim a draw after 50 moves without a pawn move or a capture. So the game can end then if either player wishes it to (and it almost always will end, because at least one player can expect no better than a draw).

After 75 moves, however, it's not optional, the game has ended. It's still a draw if the game subsequently "ends" in checkmate or a loss on time, though maybe not the players sign the score sheet, move on to the next round, etc.

how can the longest game have half a move???
"Moves" are counted for both players. Half a move means White moved but Black hasn't yet.
thank you!
An A press is an A press. You can't say it's only a half.
there certainly is if you consider 50 moves rule.

And you can derive an easy upper bound from that as 50x8x8x2 (basically each 50 moves you make a pawn move)

if you only consider 3 moves repetition and not 50 move rule then this is harder and the number becomes one of those crazy combinatorical numbers.

> And you can derive an easy upper bound from that as 50x8x8x2 (basically each 50 moves you make a pawn move)

This is not high enough, because the 50 move rule also resets when a piece is captured.

Actually no. 50×(16×6 + 32) = 50×(16× 8) works I think. Every 50 moves, move a pawn or capture. There are 16 pawns. Each pawn can be moved 6 times, so there are 16×6 pawn moves available. In addition there are 32 captures available.
The 50 move rule is a rule of chess so it must be considered.

The 3 repetition rule is an opportunity for one of the players to declare a draw, but games can continue beyond that. The mandatory draw rule is 5 repetitions. In any case, the 50 move rule is far more limiting as to the number of moves in a game, since repetitions are necessarily neither pawn moves nor captures (the whole point of the 50 move rule being limited to those is that they are irreversible).

The 50 moves rule doesn't have be considered as it is optional. The players may claim, but they don't have to. So the game can continue.

The 75 move rule is the exact same thing but mandatory. That has to be considered.

(same thing is true for 5 times repetition vs 3 times).

Captures also reset the counter, not only pawn moves.

Not explicitly, but when you consider the "cannot repeat the same board layout three times" rule, the number of moves possible in a game does have a limit.
The 3 repetition draw rule has no bearing on the number of possible chess positions. And for the number of possible moves in a game the 50 moves with no capture or pawn move rule is a much more stringent limit.

BTW, the 3 repetition rule only comes into play is one of the players invokes it ... games can legally have more than 3 repetitions, but not more than 5 repetitions.

I didn't know it required a player to invoke it, I was basing the statement on chess implementations I've read (and written) where it kicks in automatically... but the 5-time limit you mention still supports my case that there's an upper limit. As long as the number of pieces remains the same, there are a finite number of arrangements for them so eventually (after a finite number of moves) a position would be repeated enough times. If a piece is captured (or converted) it resets this but still yields a finite number of new arrangements. Eventually you either cannot avoid the repetition, or a win condition is met, or a draw for insufficient material.

Compare this to, say, the L game, where the number of moves is unbounded.

Your "case" that there's a limit isn't in question ... as I said, the 50 move rule is a far more stringent limitation. And those 50 moves cannot include repetitions--they are captures and pawn moves, which are irreversible.

If you read my comment that you responded to carefully, you will find that it is precise and accurate--as I said, the repetition rule has no bearing on the number of positions.

This horse is dead, so I'm moving on.

The 50 moves rule also needs to be claimed by one of the players.

However there is a 75 move rule and a 5 time repetition rule that are both automatic (don't need to be claimed).

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal