Nitpicky question regarding 3-fold repetition

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

gschmidt

Nitpicky question regarding 3-fold repetition

Post by gschmidt »

In regards to 3-fold repetition, what is the disposition of the initial position?
I've seen some programs treat this as a position which resulted from a move made by black and thus declare a repetition draw if black's move produces this position two more times. OTOH, should the initial position not be considered since it does not truly result from either player's move?

I realize this is a nitpicky question and it would likely not arise in practice, but I'm also interested in games other than Chess and I'm looking for a complete definition of 3-fold repetition so that it can be implemented correctly for the general case (which also includes Chess).

Does anyone know?
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Nitpicky question regarding 3-fold repetition

Post by hgm »

For two positions to be the same, it is not a condition that they are reached by a move. Just that the pieces are placed in the same way, and you can do the same moves, and have the same castling rights.
gschmidt

Re: Nitpicky question regarding 3-fold repetition

Post by gschmidt »

...and you can do the same moves...
But doesn't that imply that the same player has the right to move when each of the repeated positions is encountered? I'm thinking of a case where two positions are the same, but with different player to move, and thus the legal moves will be not be the same since they will be for different players.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Nitpicky question regarding 3-fold repetition

Post by hgm »

If the other side is to move, the positions are indeed not the same. For the initial position of standard Chess this cannot happen, b.t.w. There is no possible sequence of moves that would recreate the position with the other side to move, because Knights are color-alternating pieces, and the only Rook moves they enable are also color-switching moves. In some Chess960 positions it would be possible (when the two Knights and one Rook or Queen start next to each other).
gschmidt

Re: Nitpicky question regarding 3-fold repetition

Post by gschmidt »

If the other side is to move, the positions are indeed not the same. For the initial position of standard Chess this cannot happen, b.t.w. There is no possible sequence of moves that would recreate the position with the other side to move, because Knights are color-alternating pieces, and the only Rook moves they enable are also color-switching moves. In some Chess960 positions it would be possible (when the two Knights and one Rook or Queen start next to each other).
Then for the sake of a complete definition of 3-fold repetition, assume we are talking about a game such as Chess960 or some other abstract game where it is possible to recreate the initial position by the other side.

Then I believe since it only matters that it's the same position and that the same legal moves are available, it's irrelevant that for the initial position, there was no previous player who actually made a move to produce that position. Therefore, (in the general case) the initial position should be considered a candidate position for repetition but would also be player specific due to the requirement of having the same legal moves. Does that interpretation seem correct?
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Nitpicky question regarding 3-fold repetition

Post by hgm »

It sounds correct. If with 'player specific' you mean that it matters who has the move. If the board position recurs with the other side to move, it is not considered a repetition. If there are different castling rights, or, with the same side to move, in one position an e.p. capture is possible which is no longer possible in the other position, they are not repetitions of eah other. Permuting pieces of identical type does not make it a different position. The opening position is no different from any other position in these respects.
gschmidt

Re: Nitpicky question regarding 3-fold repetition

Post by gschmidt »

It sounds correct. If with 'player specific' you mean that it matters who has the move. If the board position recurs with the other side to move, it is not considered a repetition. If there are different castling rights, or, with the same side to move, in one position an e.p. capture is possible which is no longer possible in the other position, they are not repetitions of eah other. Permuting pieces of identical type does not make it a different position. The opening position is no different from any other position in these respects.
If with 'player specific' you mean that it matters who has the move
Yes. Typically (but not necessarily) all of the things that end up being incorporated into the position hash. Thanks for the clarifications.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Nitpicky question regarding 3-fold repetition

Post by bob »

gschmidt wrote:
If the other side is to move, the positions are indeed not the same. For the initial position of standard Chess this cannot happen, b.t.w. There is no possible sequence of moves that would recreate the position with the other side to move, because Knights are color-alternating pieces, and the only Rook moves they enable are also color-switching moves. In some Chess960 positions it would be possible (when the two Knights and one Rook or Queen start next to each other).
Then for the sake of a complete definition of 3-fold repetition, assume we are talking about a game such as Chess960 or some other abstract game where it is possible to recreate the initial position by the other side.

Then I believe since it only matters that it's the same position and that the same legal moves are available, it's irrelevant that for the initial position, there was no previous player who actually made a move to produce that position. Therefore, (in the general case) the initial position should be considered a candidate position for repetition but would also be player specific due to the requirement of having the same legal moves. Does that interpretation seem correct?
The rule is simple. When the same position arises for the third time, where the same side is on move, and the same moves are possible in all 3 instances of the position, the side on move can claim a draw. He can claim it before making a move if the position before his move has happened 3 times as described above, or if his move causes the position to repeat for the third time, he can claim it after his move, although he doesn't physically make the move on the board but first notifies the arbiter or opponent after stopping the clock.
frankp
Posts: 228
Joined: Sun Mar 12, 2006 3:11 pm

Re: Nitpicky question regarding 3-fold repetition

Post by frankp »

9.5 b. If the claim is found to be incorrect, the arbiter shall add three minutes to the opponent’s remaining thinking time. Then the game shall continue. If the claim was based on an intended move, this move must be made as according to Article 4.

Not sure xboard implements this one :-)
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Nitpicky question regarding 3-fold repetition

Post by hgm »

You can be sure it doesn't. The purpose of XBoard is to be useful, not to follow FIDE rules, which are obviously made for humans, and counter-productive or pointless when appled to computers. If you want to play by FIDE rules, invite a FIDE arbiter, and buy a Chess board and clock...