Remix.run Logo
weinzierl 6 hours ago

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

dmurray 6 hours ago | parent | next [-]

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

LegionMammal978 6 hours ago | parent | next [-]

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.

sim7c00 5 hours ago | parent | prev [-]

how can the longest game have half a move???

InitialLastName 5 hours ago | parent | next [-]

"Moves" are counted for both players. Half a move means White moved but Black hasn't yet.

sim7c00 4 hours ago | parent [-]

thank you!

pxx 2 hours ago | parent | prev [-]

An A press is an A press. You can't say it's only a half.

unkulunkulu 6 hours ago | parent | prev | next [-]

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.

Scarblac 4 hours ago | parent | next [-]

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.

CrazyStat 5 hours ago | parent | prev | next [-]

> 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.

Certhas 2 hours ago | parent [-]

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.

jibal 5 hours ago | parent | prev [-]

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).

kevindamm 6 hours ago | parent | prev [-]

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.

jibal 6 hours ago | parent [-]

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.

kevindamm 5 hours ago | parent | next [-]

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.

jibal 5 hours ago | parent [-]

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.

4 hours ago | parent [-]
[deleted]
Scarblac 3 hours ago | parent | prev [-]

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).