3 Fold Repetition discrepancy

Code, algorithms, languages, construction...
Post Reply
kickstone
Posts: 20
Joined: Fri Feb 26, 2016 7:27 am

3 Fold Repetition discrepancy

Post by kickstone » Sat Oct 27, 2018 8:31 pm

While playing my engine against chess apps on my iPhone like Hiarcs and Stockfish there are a few cases where my engine declares a draw by repetition one move before the app does. Here is an example:

In the following position r2r2k1/1p2qp2/4pn1Q/8/1bPN4/3B4/5PPP/3R1RK1 b - - 0 27

Black (Stockfish) plays 27 ...RxN giving this position r5k1/1p2qp2/4pn1Q/8/1bPr4/3B4/5PPP/3R1RK1 w - - 0 28 (first instance)

Play continues 28. Qg5+ Kh8 29. Qh6+ Kg8 (2nd repetition) 30. Qg5+ Kh8 31. Qh6+ Kg8 (3rd repetition)

Here after blacks move my engine declares a draw by repetition. But Stockfish needs to see 32. Qg5+ before it declares a draw.

Whats going on? Does a position need to result from the same move to be considered a repetition?

H.G.Muller
Posts: 190
Joined: Sun Jul 14, 2013 10:00 am
Real Name: H.G. Muller

Re: 3 Fold Repetition discrepancy

Post by H.G.Muller » Mon Jan 21, 2019 10:59 am

It seems the Apps are simply wrong. Note that Stockfish and HIARCS are UCI engines, which cannot claim draws at all. So the draw verdict must come from the GUI, and apparently this is buggy. Does this also happen when the move leading to the first occurrence is a non-capture? If not, than the bug is apparently that it does look one move less far back in the game history to check for the repetition than it should.

Post Reply