The position after White moves on move 15, 17 and 19 are exactly the same with the same side move. It it just the positions that have to be the same, the move reaching any of the 3 fold positions can be totally different. As an example, the positions reached after moves 15. h4, 19. Nc3 and 21. Qb3 in the game below are identical even though the moves to reach that position were different, thus it is draw by 3-fold repetition.
There are instances where board position can look exactly the same three times and it will not be 3-fold repetition. As an example, in the game below, the positions after moves 11. ... c5, 13. ... Nbd7 and 15. ... Nbd7 appear to be exactly the same, but they are not. After move 11. ... c5. white has the ability to play the en passant move 12.bc6 but that option is not available after moves 13. ... Nbd7 and 15. ... Nbd7, so the 3-fold position has not been met. Technically, the rule is that the positions AND the legal moves available must be exactly the same three times.
Thank you. And also thanks to Adam.
Yes the problem was that 15. h4 was a double push.
And that I did not check if an enpassant capture was actually possible.
Fixed now!
MikeB wrote:Technically, the rule is that the positions AND the legal moves available must be exactly the same three times.
What happens in cases where there would have been an en passant capture available, but it was illegal due to a discovered check? For example in this contrived example:
After "1... b5", the pieces are in the same position and the same moves are available as after "5... Ng8", so I would be inclined to say it is a threefold repetition. However my engine would not presently agree.
MikeB wrote:Technically, the rule is that the positions AND the legal moves available must be exactly the same three times.
What happens in cases where there would have been an en passant capture available, but it was illegal due to a discovered check?
Then there was no legal ep capture available.
Most engines don't get this right, but it is very rare and the worst that can happen is that the game ends in a draw when the engine thinks the position has only repeated once.