Live data from Hacker News

No reachable chess position with more than 218 moves

lichess.org

11–20 of 195 posts

Re: No reachable chess position with more than 218 moves

#11
post #7

Isn't the very first move of any chess game a reachable chess position with more than 218 moves?

The initial board position is certainly reachable (and reached in every game!), but there are only 20 legal moves available: the 16 legal pawn moves for White, and the 4 legal knight moves for White.

Indeed. And 20 So your agree with the article so far.

Re: No reachable chess position with more than 218 moves

#13

They dont really spell it out but they mean "from this position the player has 218 possible legal moves to choose from"

I thought it was "How many moves in a game does it take to reach this position"

I also thought this but OP is right: https://dev.timenote.info/de/Nenad-Petrovic

> In 1964 Petrović constructed a position with 218 possible moves for White.

Re: No reachable chess position with more than 218 moves

#14

They dont really spell it out but they mean "from this position the player has 218 possible legal moves to choose from"

Ah, thank you. I was confused reading this article, thinking it's about the unique position that takes the most moves to reach.

Re: No reachable chess position with more than 218 moves

#16
post #7

Earlier quoted context omitted.

The initial board position is certainly reachable (and reached in every game!), but there are only 20 legal moves available: the 16 legal pawn moves for White, and the 4 legal knight moves for White.

Indeed. And 20 So your agree with the article so far.

When you use small context LLM, you get completion like this.

Re: No reachable chess position with more than 218 moves

#18
> There is no reachable chess position with more than 218 moves.

"no more than 218 possible next moves" would be a lot clearer...

> By checking all approximately 8.7x10^45 reachable chess positions?

That's a large overestimate.

https://github.com/tromp/ChessPositionRanking accurately estimates the number of legal chess positions at ~4.8x10^44.

Re: No reachable chess position with more than 218 moves

#19
I'm not sure but I think the original utility and motivation for this mathematical puzzle is how to represent possible legal moves when programming chess, and this would be evidence that an 8bit unsigned integer is sufficient for the worst case scenario, although you would need some complex kind of encoding mechanism to make the representation terse enough to represent the common moves along with 7 promoted queens in the same 256-moves space.

Practically I think I'll stay with a fixed-length encoding for each of the starting pieces and their movements assuming maximum freedom, while adding a variable length variable in case of promotions.

Although nowadays with OOP and classes and superfast CPUs you probably have entirely variable length encodings, you know, an array of piece objects each with their own legal_moves function. But back in the day, when chess engines were written in C, these things were managed globally with all kinds of hack to save space, not due to space reasons, but to improve locality by reducing cache sizes.

For example, even though the chess board is 8x8, a common trick is to make the board 12x12 to account for knight moves that go off the board (and mark them as ilegal of course.) Which goes to show that even with efficiency as the upmost consideration, a terse representation is not ideal, so I doubt we are going to see 8bit variables to represent moves.

Re: No reachable chess position with more than 218 moves

#20

They dont really spell it out but they mean "from this position the player has 218 possible legal moves to choose from"

Yes, very strange that the phrase "possible moves" never occurs in the article. The key word is "possible". The article consistently just uses the phrasing "have moves" but this is not an obvious way of phrasing things to the average person (although I think it's more common in chess lingo).
Post reply on HN