Bug in the threefold repetition rule?

Sort:
Klodshans85

Edit: Solved

While playing the Computer4-Impossible I encountered an abnormality as I was claiming a draw by the threefold repetition rule.

The game can be seen here:

http://www.chess.com/blog/pHUMpK1Ns/my-first-half-point-vs-computer4-impossible

With white I claimed a draw after 15...Bf2+ and I expected the game to end instantly, but the draw was first given after I moved 16.Kd2. At 15....Bf2+ the position on the board has been repeated 3 times with the same colour to move. However, I think that the software wrongly thinks that at 11...Bf2+ the position is not equal to that of 13...Bf2+ and 15...Bf2+, because white had the right to castle prior to the first check. What do you think?

Martin_Stahl
pHUMpK1Ns wrote:

... However, I think that the software wrongly thinks that at 11...Bf2+ the position is not equal to that of 13...Bf2+ and 15...Bf2+, because white had the right to castle prior to the first check. What do you think?

 

I believe you hit upon the reason. Not only does the position have to be repeated three times but all possible moves from the first position have to be possible in the third and that includes the right to castle. Technically white didn't really have the right to castle, since you can't castle out of check, and this might be an edge case.

I'm 99% positive that the chess.com triple repetition draw code just looks at the FEN string of the positions and the FEN for the first position would not match the second two, due to the ability to castle in the first one, since that isn't removed from the FEN until after the King (or either rook) moves..

Klodshans85

It's stunning that there's still some defects in the programming of the rules of chess on this site!

Martin_Stahl

I think it is more of a case where the situation occurs so infrequently no one even really thought about it and probably wasn't worth coding a solution for it, since it rarely happens. Though, I could be wrong on the why.

Would be interesting to see how many other implementations miss that particular case.

MasterMatthew52

Firethorn15  

"The software wrongly thinks that at 11...Bf2+ the position is not equal to that of 13...Bf2+ and 15...Bf2+, because white had the right to castle prior to the first check."

This is correct. Castling rights have to be the same each repetition.


I have to agree with this comment. That's why the comper did not draw you at first. 

Klodshans85

I don't know what to believe anymore Foot in Mouth

Firethorn15

From the FIDE rules (2015):

9.2 

The game is drawn, upon a correct claim by a player having the move, when the same position for at least the third time (not necessarily by a repetition of moves): 

  1. is about to appear, if he first writes his move, which cannot be changed, on his scoresheet and declares to the arbiter his intention to make this move, or 
  2. has just appeared, and the player claiming the draw has the move. 
Positions areconsidered the same if and only if the same player has the move, pieces of the same kind and colour occupy the same squares and the possible moves of all the pieces of both players are the same. Thus positions are not the same if:
  1. at the start of the sequence a pawn could have been captured en passant. 
  2. a king or rook had castling rights, but forfeited these after moving. The castling rights are lost only after the king or rook is moved.
Martin_Stahl

In a general sense 2 is what stops it from being triple-repetition but in reality, castling is not possible (though semantically the right is there until after the move) due to the fact one can not castle out of check an no other options were available to the king.

MasterMatthew52

All software does this: https://www.youtube.com/watch?v=ChK6PtLT_mA

Klodshans85

@ Firethorn15

"The castling rights are lost only after the king or rook is moved."

Thank you. So, even though I could never castle in the future after the first check, because the only move was to move the king, then technically, my castling rights wasn't lost until I executed my only move 12.Kd2. That's kinda funny Tongue Out

I apologize to chess.com to spread doubt about the validity of their chess software Yell

MasterMatthew52
pHUMpK1Ns wrote:

@ Firethorn15

"The castling rights are lost only after the king or rook is moved."

Thank you. So, even though I could never castle in the future after the first check, because the only move was to move the king, then technically, my castling rights wasn't lost until I executed my only move 12.Kd2. That's kinda funny 

I apologize to chess.com to spread doubt about the validity of their chess software 

Yes. If the bishops were not there and you were not in check you technically had the right to still castle which changed the FEN string ever so slightly but even then, it was still a change which the computer reconized as "different"

Kind of weird, I know, but that's how a computer thinks.

deepThought_C-137

Sorry to resurrect this one, but I was wondering, does it apply when only the King remains?

Martin_Stahl
somnath_adhikari1 wrote:

Sorry to resurrect this one, but I was wondering, does it apply when only the King remains?

 

Yes. If only one side has a king it is still possible to repeat positions.

Klodshans85

Somnath: FromThe FIDE rules posted as #7:

"The castling rights are lost only after the king or rook is moved."

 

I guess that if you have no rooks, Then your castling rights are lost. After all, they was "moved" from the board. So in case of a lone king, you can claim a draw right after the third repetitive check before the king moves out of the check, as usual.

 

Edit: from FIDE rules: "If a piece moves to a square occupied by an opponent’s piece the latter is captured and removed from the chessboard as part of the same move.". So if your rooks are captured, that Will count as if they have "moved" as I expected in the above.

ThrillerFan

It's probably bug that follows a really old USCF rule that has since been abolished.

Once upon a time, you could only claim a draw based on your own move.

 

So in the original position, only black could claim a draw after 15...Bf2+.  Only White could claim a draw based on 16.Kd2.

 

That lead to the problem that not all 3-folds are "back-and-forth" scenarios, and therefore it wasn't fair that only Black or only White could claim a draw because it wasn't achieved as a back and forth process.  The USCF has therefore removed that restriction.

 

Looks like Chess.com never updated that.  Chess.com is based in the United States, and follows USCF rules a lot more closely than FIDE.  For example, if Black has an h-pawn and King, White has a Knight and King, and White can't "force" mate - helpmate would be required, and Black's flag falls, it's a win for White in FIDE because mate is "possible", it's a draw in USCF because K, K+N, K+B, or K+N+N with no P's for the opponent are all considered insufficient mating material and are only wins if the mate can be forced.  There's the one difference here, even if it can be forced, chess.com doesn't recognize it and still calls it a draw.

 

For example:  WBh6, WKe6, BKg8, BPh7, BPe7, Black to move.  He let's his clock run out in USCF, White wins, here, it's a draw, despite the forced mate with 1...Kh8 2.Kf7 e6 (or 2...e5) 3.Bg7#

MasterMatthew52

It does not matter if it is 3 moves in a row or not. All that has to happen is the position repeat 3 times.

reinbot

Hi, I have a similar issue with this match

[Event "malaga9444 vs. reinbot"]
[Site " Chess.com"]
[Date "17.08.2018"]
[White "malaga9444"]
[Black "reinbot"]
[Result "1-0"]
[WhiteElo "1020"]
[BlackElo "1015"]
[TimeControl "1 in 0 day"]
[SetUp "1"]
[Termination "malaga9444 won on time"]
1. e4 e5 2. d4 exd4 3. Qxd4 Qe7 4. Nc3 Nf6 5. f3 c5 6. Qa4 b6 7. Bg5 h6 8. Bxf6 Qxf6 9. O-O-O Be7 10. Nd5 O-O 11. Nxf6+ Bxf6 12. Bb5 Nc6 13. Bxc6 dxc6 14. Qxc6 Be6 15. Kb1 a5 16. Qxb6 a4 17. a3 c4 18. c3 Rfb8 19. Qe3 g5 20. Nh3 Kg7 21. f4 g4 22. Nf2 Be7 23. f5 Bg5 24. Qd4+ Bf6 25. Qe3 Bg5 26. Qd4+ Bf6 27. Qe3 Bg5 28. Qd4+ Bf6 29. Qe3 Bg5 30. Qg3 1-0

 

 

How come this is not a draw? 

Sent from my Android

 

reinbot
reinbot hat geschrieben:

Hi, I have a similar issue with this match 

www.chess.com/live/game/3011881984

[Event "malaga9444 vs. reinbot"]
[Site " Chess.com"]
[Date "17.08.2018"]
[White "malaga9444"]
[Black "reinbot"]
[Result "1-0"]
[WhiteElo "1020"]
[BlackElo "1015"]
[TimeControl "1 in 0 day"]
[SetUp "1"]
[Termination "malaga9444 won on time"]
1. e4 e5 2. d4 exd4 3. Qxd4 Qe7 4. Nc3 Nf6 5. f3 c5 6. Qa4 b6 7. Bg5 h6 8. Bxf6 Qxf6 9. O-O-O Be7 10. Nd5 O-O 11. Nxf6+ Bxf6 12. Bb5 Nc6 13. Bxc6 dxc6 14. Qxc6 Be6 15. Kb1 a5 16. Qxb6 a4 17. a3 c4 18. c3 Rfb8 19. Qe3 g5 20. Nh3 Kg7 21. f4 g4 22. Nf2 Be7 23. f5 Bg5 24. Qd4+ Bf6 25. Qe3 Bg5 26. Qd4+ Bf6 27. Qe3 Bg5 28. Qd4+ Bf6 29. Qe3 Bg5 30. Qg3 1-0

 

 

How come this is not a draw? 

Sent from my Android

 

 

Firethorn15

You didn't claim a draw. You need to click on the draw button. Same as you need claim threefold repetition in OTB chess.