Hacker News new | ask | show | jobs
by jade-cat 1007 days ago
There are two more things that should be considered. Both of them unlikely to influence a position, but they can matter - just like the en passant target.

The fifty move rule[0] is quite simple, just store a number, fits in five bits. But the threefold repetition rule[1] is quite a pickle - it basically means that to know everything about a position you need to know every position that occurred before it.

[0] https://en.wikipedia.org/wiki/Fifty-move_rule [1] https://en.wikipedia.org/wiki/Threefold_repetition

4 comments

Yeah, it seems like the author is storing more information than just the position but not enough to figure out all of the possible next states of the game.

Another straightforward thing missing is the player's turn; this could determine whether the position is a stalemate or not.

Not all previous positions, only the ones with the same pieces, pawn positions, castling rights and en passant rights.

But the standard, FEN, doesn't store that either. It's used more in the context of a full game than with individual positions.

Fair enough. Still up to 50 board states that can influence the current one (the 50 move rule is coming to help here)

FEN doesn't store previous states, but EPD can. It just goes to show how meanings and requirements change depending on context, which is super interesting in and of itself :P

Also, database software gets so clever with storing games that they often can't save games that have illegal moves in them. But there are plenty real games from real tournaments that had illegal moves in them that nobody noticed...
What's the proper notation for "while White closes his eyes to think about his next move, Black quietly moves one of his pawns over a square"? :)
Yeah, I was trying to send a chess puzzle to someone on Gameknot.com. White to mate in 1--except there was no black king. (The objective was to mate anyway--find the move that would mate the black king no matter where it was.) Their encoder created the king.
Do you perhaps mean that there was no white king?
No black king--in other words, you don't know where the black king is since it must exist. The puzzle was to find the move that would mate the king no matter what square it was in.
That's a very good point. Similar issues affect file systems that has to store files with invalid filenames and parsers that have to gracefully handle invalid parse trees.
I prefer the Ko rule of Go.

You can’t repeat the last position. But repeating a pattern of part of the board every two turns can force progress to resolution. The entire board never repeats, but it also stops the loop earlier.

They'd also need to store whose turn it is, so I'm guessing the article is strictly about "positions" and not game state.
I don't see how it can be considered a position without whose turn it is.