It's not supposed to be stateful. The ko rule is only there to block infinite loops.

What I mean is you can’t just look at a board and know the ko “state” - but yes I’m sure in practice it’s not that important.

Just my engineering brain picking up on it.

Chess also has this "problem" thanks to rules like castling and en passant capture.

>> What I mean is you can’t just look at a board and know the ko “state” - but yes I’m sure in practice it’s not that important.

> Chess also has this "problem" thanks to rules like castling and en passant capture.

Chess is intended to be stateful. If you forget whether a castle has occurred (and then the king walked back to its starting position, and a rook repositioned into the corner) or not, chess players will note that you've messed up the game. The castling rule is there to stop you from castling more than once.

Go is not intended to be stateful, and if you forget that a particular board layout may have come up in the past, go players will not note that you've messed up the game. It doesn't matter. The ko rule isn't there to stop you from repeating a board twice. It's there to stop you from having to repeat a board layout an infinite number of times, because things like the need for food and sleep would interfere with the game.

Wrt the implementation concern, this distinction means, for example, that you must always track the castling state regardless of whether a player asks for it, whereas you're fine not bothering to track the history of a go board unless a player asks for it. You can just say "if you want to invoke ko, press this button, and we'll remember that board layout, and if it's already been flagged, the game will draw". That isn't done, but it could be done.

I'm not a Go player so I don't really know how it works in practice, but what you are saying seems to disagree with the wording in Wikipedia, so I'm curious which one is correct?

You say:

> if you forget that a particular board layout may have come up in the past, go players will not note that you've messed up the game. It doesn't matter. The ko rule isn't there to stop you from repeating a board twice.

Wikipedia says:

> Rule 8. A play is illegal if it would have the effect (after all steps of the play have been completed) of creating a position that has occurred previously in the game.

> Consequence (ko rule). One may not play in such a way as to recreate the board position following one's previous move.

> While its purpose is similar to that of the threefold repetition rule of Western chess, it differs from it significantly in nature; the superko rule bans moves that would cause repetition, whereas Western chess allows such moves as one method of forcing a draw.

To me that sounds like you do need to track this, in both chess and in Go, though for different reasons (to force a draw vs to prevent an illegal move). Is this not enforced in practice?