218 legal moves
If it's black to play, there is 0 moves...
rrrttt posted on Feb 6 2010 a position with 216 possible moves, but claimed that this yields 218 moves. However, there is a position with 218 moves. Actually one gets a position with 218 moves by moving the white King in rrrttt's position one place to the right, i.e from e1 to f1. See also https://www.chessprogramming.org/Chess#Chess_Maxima This also answers the Question of HarshHose, which also has been answered by RandJoe.
However I still don't know any proof that more than 218 is not possible. Thus we only have a position of 218 moves as a lower bound for the maximum number of moves possible in a legal chess position. I have a proof that more than 268 is not possible.
This upper bound is lousy in the sense, that it is based on wildly unrealistic optimistic assumptions. I have some ideas to improve this upper bound substantially. My feeling is that 218 is very close to the maximum, if it is not already the maximum.
I came up with this position that has 270 legal moves:
Can you do better than this?
This may jeopardize some compression algorithms for chess games that use 8 bits for the maximum number of legal moves.
218 legal moves
Does this position actually have 218 legal moves? I used a program to generate all the legal moves for white and there are only 216.
Boulayo, sorry to take your record from you, but this position has 275 legal moves. I know it looks suspiciously similar to yours, but I didn't see your thing before solving this question
Boulayo, sorry to take your record from you, but this position has 275 legal moves. I know it looks suspiciously similar to yours, but I didn't see your thing before solving this question
I could only find 265 legal moves: Qa1b2, Qa1c3, Qa1d4, Qa1e5, Qa1f6, Qag7, Qbb2, Qbb3, Qbb4, Qbb5, Qbb6, Qbb7#, Qbc2, Qbd3, Qbe4#, Qbf5, Qbg6, Qc1c2, Qc1c3, Qc1c4, Qc1c5, Q1c6#, Q1c7, Qcb2, Qcd2, Qce3, Qcf4, Qcg5, Qd1d2, Qd1d3, Qd1d4, Q1d5#, Q1d6, Q1d7, Qdc2, Qdb3, Qde2, Qdf3#, Qdg4, Qe1e2, Qe1e3, Qe1e4#, Qe1e5, Q1e6, Q1e7, Qed2, Qec3, Qeb4, Qef2, Qeg3, Qf1f2, Qf1f3#, Qf1f4, Qf1f5, Qf1f6, Q1f7, Qfe2, Qfd3, Qfc4, Qfb5, Qfg2#, Qg1g2#, Qg1g3, Qg1g4, Qg1g5, Qg1g6, Qg1g7, Qgf2, Qge3, Qgd4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, Q8e2, Qef7, Qeg6, Qed7, Qec6#, Qeb5, Qf8f7, Qf8f6, Qf8f5, Q8f4, Q8f3#, Q8f2, Qfg7, Qfe7, Qfd6, Qfc5, Qfb4, Qg8g7, Qg8g6, Qg8g5, Qg8g4, Q8g3, Q8g2#, Qgf7, Qge6, Qgd5#, Qgc4, Qgb3, Qh8g7, Qh8f6, Qh8e5, Qh8d4, Qh8c3, Q8b2
Is there something I'm missing?
Counting one by one isn't reliable.
So First, I counted how many horizontal (left or right) queen moves there are. I counted 11 queens can move up to 6 squares horizontally. So I added 66 because 11x6=66
Then I counted vertical (up or down) moves, which also has 11 queens with 6 moves each, so 11x6=66
For the verticals, I counted all the increasing diagonals ( THIS DIRECTION --> / ) Example: 1 increasing diagonal move for the A6 queen, 2 for the A5 queen, 3 for the A4 queen, etc. You should get 36. After that, multiply that by 2 because another queen shares that diagonal. Example: The queens on A3 & F8 share the same diagonal. So 36x2=72.
It is the same for the decreasing diagonal except for subtracting 12 because there are no squares controlling the B7-G2 diagonal (6 squares long) And for every other diagonal 2 queens control it, which is the purpose of doubling the length of each diagonal, so 6x2=12, which means 72-12=60
And then 10 bishop moves and 1 king move.
So 66+66+72+60+10+1=275
No, sorry man, diagonals B6-F2 and C7-B3 are controlled only by one queen. Therfore there are 265 moves in that position.
The last two positions with tons of queens had no way for Black to have made the last move, so Black was on move and they were stalemate.
And here is another legal position before any promotions are made, this time with 142 moves for White: