How many distinct chess games are possible, and which is the longest?

Sort:
SeanEnglish

rbjones,
I think the problem is hard enough without 3-fold repetition. Even though, a related question would be assuming 3-fold repetition is a forced draw, but 50 moves isn't, how many possible games are there? and what is the longest possible game?

the numbers would be a lot bigger with 3-fold repetition over the 50 move rule though. 

shell_knight

Oh, I see.

In a way it's interesting that we can (or are even prone to) imagine questions that are impossible to answer.

SeanEnglish

Shell_knight,

While the question of "how many chess games are possible?" may be impossible to answer, I think "what is the longest possible chess game?" isn't impossible to answer. I mean, with half an hours thought, I was able to figure out the answer is somewhere in between 5900 and 6300 moves, probably closer to 5900, so that seems like a question that can be answered.

shell_knight

Someone had asked this a few years ago on the forum.  IIRC the answer they arrived at was in the upper 5000s just like you're saying.

SeanEnglish

SeanHarper, assume time isn't an issue.

Shell_knight, I'll try to look for that old forum post(hopefully chess.com keeps their records for a while). 

SeanEnglish

Mashanator, maybe you misunderstood the original question, since there are positions that could be won if the 50-move rule wasn't there, but would be drawn otherwise(such as K+2NvsK+P endgames with mate in 82) what is the minimum number of moves that might be necessary with perfect play to make progress without an irreversable move.

So, the 50 move rule isn't applicable here. 

SeanEnglish

So I looked at some old forum posts, it looks like 5948 or 5949 are the two most supported answers. The reasoning for them follows almost the exact same thinking I used to come up with 5900.

shell_knight

I count 5950.

shell_knight
SeanEnglish wrote:

So I looked at some old forum posts, it looks like 5948 or 5949 are the two most supported answers. The reasoning for them follows almost the exact same thinking I used to come up with 5900.

Oh, ok.

I wonder why 5948 or 5949... oh, I guess because the player would declare 50 move rule without playing the last move?

SeanEnglish

actually... the 5948 is really interesting. It took me a little while to understand where it was comming from. To get 5950, you would need white to make all of the irreversable moves, since each time you switch which side is making the irreversable move, you lose half a move from the 50 moves. My calculations suggest that four half-moves must be lost to these switches(white starts with irreversable moves, gets his pawns on 4 files rather than 8, then lose a half-move to a switch so black can get his pawns on the other 4 files, then black promotes all his pawns, switch again so white can promote all his pawns and capture everything of blacks, then one last switch so black can capture all of white's remaining pieces), so that makes two less moves, guving 5948, or 5898 if you draw instantly once its KvK

shell_knight

This is what I was thinking when counted 5950.  I think it is correct?

Repeat this general maneuver 4 times will result in 8 lost pieces.  Then 22 non-kings left over so + 22*50



SeanEnglish

yeah, thats the basic idea, but you have to factor in the loss of halfmoves. for the 50 move rule, if white moves a pawn(or captures), 99 other half moves can happen before white has to movea pawn again or capture, giving 100 half-moves or 50 moves per irreversable move, but if white moves a pawn(or captures), and black is going to make the next irreversable move, only 98 other half-moves can happen before black has to make an irreversable move. this switch has to happen at least 4 times, losing two moves.

shell_knight

Ok so, each set of 50 is made up of 1 IM and 49 RM.

However in this even numbered set, the color that moves first and last must be different.  So the same player must keep initiating sets until there are no IR moves to play.  When that happens, the other player must take over on move 48 to avoid a draw, so this "last" set is cut short by 2 moves.

Ok, talking myself through it I get it now.  You explained it but I didn't get it by just reading.

SeanEnglish

nono, you're close to getting it, but not quite...

there are  118 IM to be made(22 non-pawn captures, 8 pawn captures, and 88 non-capturing pawn moves)
59 for white, 59 for black

If two IMs in a row are made by the same color, then 50 moves(99 reversable half-moves[RHM] and 1 irreversable half-move[IHM]) are in the set for the first IM. If two IMs in a row are made by different colors, then only 49.5 moves(98 RHM and 1 IHM) are in the set for the first IM.

For example, if black makes the first IHM on move 50(half move 100), then white makes the second IHM on move 100(half move 199), then black makes the third IHM on move 149(half move 298)

On the other hand, if black makes the first 3 IHM, they happen on move 50(half move 100), move 100(half move 200) and move 150(half move 300)

So every time the team making the IHM switches, half a move is lost. To get all the pawns across the board with minimal pawn capturing, at least four switches must happen(black moves pawns onto 4 files,[switch] white moves pawns onto 4 files and promotes all[switch], black promotes all and captures all[switch], white captures all remaining)

So there are actually only 3 switches(sorry), so the longest possible game should end when white makes the first half-move of move 5948.(5950-1.5)


 

shell_knight

Oooh, ok.  Thanks for explaining it.  Yes, I think you're right about 3 switches.  That is a fun problem, wish I had worked it out on my own.

Remellion

No, 4 switches is right. The 4th switch occurs in the final capturing phase - white can't make all 22 non-pawn captures obviously.

Also, castling is another often overlooked irreversible move. So overlooked that it's not in the FIDE laws. That would tack on another full 100 half-moves.

SeanEnglish

Remellion,

While castling(or even breaking castling potential) is irreversable, it isn't counted in the 50-move rule, but if it was, I think the totals would then be 6048(if castling is counted as an IM but breaking castling isn't) or 6148(if breaking castling potential is counted as a IM)

I'm still not sure why you need four switches... consider these phases:
 phase 1:black does 4 pawn captures[switch]white does 4 pawn captures, and promotes 8 pawns[Switch]black promotes 8 pawns and does 11 non-pawn captures[Switch]white's lone king captures all 11 of blacks remaining pieces, tie.

SeanEnglish

Oh, and Remellion, it's funny that you comment here...

I randomly stumbled upon a few of your compositions(I had never seen chess looked at in such a manor before), and those inspired my curiosity about the math behind chess, so you were part of the causal chain that led to this forum topic.

Remellion

Ah, yep. Three switches - I counted wrong in my head.

For the castling part, I don't see why losing castling rights as an IM should give a different answer from just plain castling. The act of castling loses castling rights, and once they're lost you can't get another 100 moves by castling.

I actually detest combinatorics and try to stay far away from those kind of problems usually. Very easy to go wrong counting. My problems are more to do with retroanalysis than maths/combi. (Speaking of retros, this is a great resource.)

SeanEnglish

Losing castling rights as an IM would give a different answer because you can lose castling rights twice if the first time you do it, its by moving one of your rooks, thus giving you four extra IMs rather than two.

These counting problems relate to your retroanalysis because I was trying to devise a retroanalysis problem with a prompt along the lines of "I was sure I was going to win, but my opponent claimed a draw... why was he able to do this?" where it would have a position that is obviously winning, but could only have been achieved by violating the 3-fold repetition rule or the 50 move rule, so I got to counting maximum possible moves, and one thing led to another.