Draw by 3-fold repetition?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Draw by 3-fold repetition?

Post by hgm »

I thought there were tools (by George Lyapko?) to check PGN for faulty result claims. I never used them, because I always use WinBoard, and it already does this checking for me, but I heard they exist.
User avatar
trojanfoe
Posts: 65
Joined: Sun Jul 31, 2011 11:57 am
Location: Waterlooville, Hampshire, UK

Re: Draw by 3-fold repetition?

Post by trojanfoe »

natasha wrote:thank you were number of those3 fold drawn games not that many moves . under 50 moves :?:
Sorry Natasha; I don't understand your question.
User avatar
trojanfoe
Posts: 65
Joined: Sun Jul 31, 2011 11:57 am
Location: Waterlooville, Hampshire, UK

Re: Draw by 3-fold repetition?

Post by trojanfoe »

hgm wrote:I thought there were tools (by George Lyapko?) to check PGN for faulty result claims. I never used them, because I always use WinBoard, and it already does this checking for me, but I heard they exist.
I'll look into that, cheers.

EDIT: I found the page (http://www.reocities.com/lyapko/winboard.htm and http://www.reocities.com/lyapko/lgpgnver.htm) but I cannot find a download link... I'll use WinBoard instead (I try to avoid Windows if I possibly can).
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Draw by 3-fold repetition?

Post by Evert »

trojanfoe wrote: EDIT: I found the page (http://www.reocities.com/lyapko/winboard.htm and http://www.reocities.com/lyapko/lgpgnver.htm) but I cannot find a download link... I'll use WinBoard instead (I try to avoid Windows if I possibly can).
So why not use XBoard then?
It's the same program, but for non-Windows systems. Requires X11 though, which is a little annoying on a Mac.
User avatar
trojanfoe
Posts: 65
Joined: Sun Jul 31, 2011 11:57 am
Location: Waterlooville, Hampshire, UK

Re: Draw by 3-fold repetition?

Post by trojanfoe »

Evert wrote:
trojanfoe wrote: EDIT: I found the page (http://www.reocities.com/lyapko/winboard.htm and http://www.reocities.com/lyapko/lgpgnver.htm) but I cannot find a download link... I'll use WinBoard instead (I try to avoid Windows if I possibly can).
So why not use XBoard then?
It's the same program, but for non-Windows systems. Requires X11 though, which is a little annoying on a Mac.
I have tried it but it doesn't work as well as Winboard (doesn't show moves when loaded from a PGN file). Winboard is better but I couldn't see how to get it to automatically adjudicate the game, as suggested earlier by HGM.

The games adjudicated by 3-fold rep and 50-move rule look OK to me, however I did find a bug in the 'draw by insufficient material' (game 8). That is now hopefully fixed and I will run another 100-game tournament to test.

Cheers,
Andy
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Draw by 3-fold repetition?

Post by hgm »

Not sure what you mean by 'showing moves when loaded from a PGN file'? Do you mean it auto-plays them? Or do you mean the Move History window? XBoard has both of that.

But if your ar fine with running WinBoard under wine, that is OK too. WinBoard is a little bit ahead in some respects, but the difference nowadays is very small (mainly ICS chat boxes and a better ICS context menu).

WinBoard / XBoard only adjudicates when moves are played (by Human or Engine), never when reading from PGN. So what I did was loading the game in game viewer mode, step back one ply, and then replay the move by hand, so it will be subjected to adjudication (with the proper settings of the Options->Adjudicate dialog: repeats set to 3, reversible moves to 50 and detect mates on.)

That is not really automatic, though... :(
User avatar
trojanfoe
Posts: 65
Joined: Sun Jul 31, 2011 11:57 am
Location: Waterlooville, Hampshire, UK

Re: Draw by 3-fold repetition?

Post by trojanfoe »

hgm wrote:Not sure what you mean by 'showing moves when loaded from a PGN file'? Do you mean it auto-plays them? Or do you mean the Move History window? XBoard has both of that.
I mean't the moves in the move history window, which appeared correctly under winboard.
hgm wrote: But if your ar fine with running WinBoard under wine, that is OK too. WinBoard is a little bit ahead in some respects, but the difference nowadays is very small (mainly ICS chat boxes and a better ICS context menu).
I run vmware images of Windows under Linux (work) or Mac OS (home) so I used one of those; I don't fancy getting involved with wine...
hgm wrote: WinBoard / XBoard only adjudicates when moves are played (by Human or Engine), never when reading from PGN. So what I did was loading the game in game viewer mode, step back one ply, and then replay the move by hand, so it will be subjected to adjudication (with the proper settings of the Options->Adjudicate dialog: repeats set to 3, reversible moves to 50 and detect mates on.)

That is not really automatic, though... :(
Cool - I'll use that to validate the next batch of games.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Draw by 3-fold repetition?

Post by hgm »

trojanfoe wrote:I mean't the moves in the move history window, which appeared correctly under winboard.
OK. XBoard does have that too (like with WinBoard, it can be opened from the View->Move History menu). In the latest versions it even looks the same as in WinBoard (so you can also display score/depth with the moves).
User avatar
trojanfoe
Posts: 65
Joined: Sun Jul 31, 2011 11:57 am
Location: Waterlooville, Hampshire, UK

Re: Draw by 3-fold repetition?

Post by trojanfoe »

hgm wrote:
trojanfoe wrote:I mean't the moves in the move history window, which appeared correctly under winboard.
OK. XBoard does have that too (like with WinBoard, it can be opened from the View->Move History menu). In the latest versions it even looks the same as in WinBoard (so you can also display score/depth with the moves).
OK, I'll give it a go tomorrow. Thanks for your help HGM.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Draw by 3-fold repetition?

Post by Don »

sje wrote:
bob wrote:Some have used a hash table for repetitions. Bruce Moreland was the first I had heard this from. Idea is that when you enter a position, you look for a repetition match. If present, increment the included rep counter and do what you want (most call 2 reps a draw, but you can be more careful and only allow 3 reps near the root if you want (I do not like the idea, but some have used it.) If you do the probe and find nothing, you enter the signature and a count of one. When you return from this ply, you decrement the counter and if zero, remove the entry. I think he used a table of 2K entries.
If I recall correctly, Ken Thompson long ago used the main and only transposition table in Belle to recognize repeated positions in the search. Upon entering a node for the first time, it was stored in the transposition table with a flag saying "current variation position". Upon exiting the node, the flag was reset. Upon entering the same node a second time by a deeper path the flag was checked and if set, the node was scored as a draw. The controlling program in the attached pdp-11 had the logic for detecting threefold at ply one. It all worked, although there was a slight risk that a table element overwrite could cause a false negative and a repetition would be missed.
This is also how super-connie does it.