bizarre repetition detection issue

Discussion of chess software programming and technical issues.

Moderator: Ras

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

Re: bizarre repetition detection issue

Post by hgm »

bob wrote:(1) if I disallow repetitions beyond a null with positions that occur before the null move, Elo goes down.

(2) if I allow repetitions beyond a null-move within the first 4 plies, Elo also goes down.
OK, to make absolutely sure I understand this:

(A) Your reference is when you compare the current position to all positions since the last irreversible real move if there were no null moves in the last 4 ply.

(1) is the case where you only check back to the last null move

(2) is the case where you do check for repetitions since the last reversible real move even if there was a null move in the last 4 ply.

Both (1) and (2) perform worse than (A).

Correct?

Then I think I explained (2): Peformance is worse there, because all high-failing null-move searches now take larger depth, because the pattern <null> <move> <null> is doomed, and must be followed by the less reduced, and thus more expensive <null> <move> <move>. This blows p the tree. Bigger tree for the same depth => lower Elo.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: bizarre repetition detection issue

Post by bob »

hgm wrote:
bob wrote:(1) if I disallow repetitions beyond a null with positions that occur before the null move, Elo goes down.

(2) if I allow repetitions beyond a null-move within the first 4 plies, Elo also goes down.
OK, to make absolutely sure I understand this:

(A) Your reference is when you compare the current position to all positions since the last irreversible real move if there were no null moves in the last 4 ply.

(1) is the case where you only check back to the last null move

(2) is the case where you do check for repetitions since the last reversible real move even if there was a null move in the last 4 ply.

Both (1) and (2) perform worse than (A).

Correct?

Then I think I explained (2): Peformance is worse there, because all high-failing null-move searches now take larger depth, because the pattern <null> <move> <null> is doomed, and must be followed by the less reduced, and thus more expensive <null> <move> <move>. This blows p the tree. Bigger tree for the same depth => lower Elo.
Only fly in the ointment. Why "4"? Any other number is worse than 4, so what is magic about testing for repetition after 4 plies rather than after 3 or 5, etc?

There has to be some sort of rational explanation. I suspect that it might provide some useful information...
Ralph Stoesser
Posts: 408
Joined: Sat Mar 06, 2010 9:28 am

Re: bizarre repetition detection issue

Post by Ralph Stoesser »

bob wrote:
hgm wrote:
bob wrote:(1) if I disallow repetitions beyond a null with positions that occur before the null move, Elo goes down.

(2) if I allow repetitions beyond a null-move within the first 4 plies, Elo also goes down.
OK, to make absolutely sure I understand this:

(A) Your reference is when you compare the current position to all positions since the last irreversible real move if there were no null moves in the last 4 ply.

(1) is the case where you only check back to the last null move

(2) is the case where you do check for repetitions since the last reversible real move even if there was a null move in the last 4 ply.

Both (1) and (2) perform worse than (A).

Correct?

Then I think I explained (2): Peformance is worse there, because all high-failing null-move searches now take larger depth, because the pattern <null> <move> <null> is doomed, and must be followed by the less reduced, and thus more expensive <null> <move> <move>. This blows p the tree. Bigger tree for the same depth => lower Elo.
Only fly in the ointment. Why "4"? Any other number is worse than 4, so what is magic about testing for repetition after 4 plies rather than after 3 or 5, etc?

There has to be some sort of rational explanation. I suspect that it might provide some useful information...
Could you please provide a few examples, maybe for 3, 4 and 5 plies?
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: bizarre repetition detection issue

Post by bob »

Ralph Stoesser wrote:
bob wrote:
hgm wrote:
bob wrote:(1) if I disallow repetitions beyond a null with positions that occur before the null move, Elo goes down.

(2) if I allow repetitions beyond a null-move within the first 4 plies, Elo also goes down.
OK, to make absolutely sure I understand this:

(A) Your reference is when you compare the current position to all positions since the last irreversible real move if there were no null moves in the last 4 ply.

(1) is the case where you only check back to the last null move

(2) is the case where you do check for repetitions since the last reversible real move even if there was a null move in the last 4 ply.

Both (1) and (2) perform worse than (A).

Correct?

Then I think I explained (2): Peformance is worse there, because all high-failing null-move searches now take larger depth, because the pattern <null> <move> <null> is doomed, and must be followed by the less reduced, and thus more expensive <null> <move> <move>. This blows p the tree. Bigger tree for the same depth => lower Elo.
Only fly in the ointment. Why "4"? Any other number is worse than 4, so what is magic about testing for repetition after 4 plies rather than after 3 or 5, etc?

There has to be some sort of rational explanation. I suspect that it might provide some useful information...
Could you please provide a few examples, maybe for 3, 4 and 5 plies?
I am not sure what you mean. When I say 3, 4 and 5, I ran 30K game matches using each option. 4 is clearly best, 3 and 5 are worse by at least 4-5 Elo...
Ralph Stoesser
Posts: 408
Joined: Sat Mar 06, 2010 9:28 am

Re: bizarre repetition detection issue

Post by Ralph Stoesser »

bob wrote:
Ralph Stoesser wrote:
bob wrote:
hgm wrote:
bob wrote:(1) if I disallow repetitions beyond a null with positions that occur before the null move, Elo goes down.

(2) if I allow repetitions beyond a null-move within the first 4 plies, Elo also goes down.
OK, to make absolutely sure I understand this:

(A) Your reference is when you compare the current position to all positions since the last irreversible real move if there were no null moves in the last 4 ply.

(1) is the case where you only check back to the last null move

(2) is the case where you do check for repetitions since the last reversible real move even if there was a null move in the last 4 ply.

Both (1) and (2) perform worse than (A).

Correct?

Then I think I explained (2): Peformance is worse there, because all high-failing null-move searches now take larger depth, because the pattern <null> <move> <null> is doomed, and must be followed by the less reduced, and thus more expensive <null> <move> <move>. This blows p the tree. Bigger tree for the same depth => lower Elo.
Only fly in the ointment. Why "4"? Any other number is worse than 4, so what is magic about testing for repetition after 4 plies rather than after 3 or 5, etc?

There has to be some sort of rational explanation. I suspect that it might provide some useful information...
Could you please provide a few examples, maybe for 3, 4 and 5 plies?
I am not sure what you mean. When I say 3, 4 and 5, I ran 30K game matches using each option. 4 is clearly best, 3 and 5 are worse by at least 4-5 Elo...
I mean positions and lines from real search trees which span null moves. Visualization may help to understand what exactly is happening.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: bizarre repetition detection issue

Post by bob »

Ralph Stoesser wrote:
bob wrote:
Ralph Stoesser wrote:
bob wrote:
hgm wrote:
bob wrote:(1) if I disallow repetitions beyond a null with positions that occur before the null move, Elo goes down.

(2) if I allow repetitions beyond a null-move within the first 4 plies, Elo also goes down.
OK, to make absolutely sure I understand this:

(A) Your reference is when you compare the current position to all positions since the last irreversible real move if there were no null moves in the last 4 ply.

(1) is the case where you only check back to the last null move

(2) is the case where you do check for repetitions since the last reversible real move even if there was a null move in the last 4 ply.

Both (1) and (2) perform worse than (A).

Correct?

Then I think I explained (2): Peformance is worse there, because all high-failing null-move searches now take larger depth, because the pattern <null> <move> <null> is doomed, and must be followed by the less reduced, and thus more expensive <null> <move> <move>. This blows p the tree. Bigger tree for the same depth => lower Elo.
Only fly in the ointment. Why "4"? Any other number is worse than 4, so what is magic about testing for repetition after 4 plies rather than after 3 or 5, etc?

There has to be some sort of rational explanation. I suspect that it might provide some useful information...
Could you please provide a few examples, maybe for 3, 4 and 5 plies?
I am not sure what you mean. When I say 3, 4 and 5, I ran 30K game matches using each option. 4 is clearly best, 3 and 5 are worse by at least 4-5 Elo...
I mean positions and lines from real search trees which span null moves. Visualization may help to understand what exactly is happening.
I have not identified a specific position, this is a systemic issue across _all_ trees where null-move is playable...
User avatar
hgm
Posts: 28405
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: bizarre repetition detection issue

Post by hgm »

What I was asking is to show us some of these repeat loops that occur 1, 2 or 3 ply after null. (Perhaps a dozen or so of each.) To get an idea of the search patterns that occur, and their frequency.
Ralph Stoesser
Posts: 408
Joined: Sat Mar 06, 2010 9:28 am

Re: bizarre repetition detection issue

Post by Ralph Stoesser »

bob wrote:
I have not identified a specific position, this is a systemic issue across _all_ trees where null-move is playable...
Yes, but I ask for examples, board pictures and list of moves, nothing specific, but, if possible, from real search of your engine.

I ask for it because I'm too stupid to be able to imagine why repetition draw detection across null moves could make sense in the first place, let aside this 4-plies-away-from-last-null-move rule (if I have understand it correctly).

A null move is a non-reversible move, right?
I can't undo a null move by moving a piece or by making another null move. But if both sides make a null move, they may annul each other in a way that makes it meaningful to check repetion draws across null moves.
User avatar
opraus
Posts: 166
Joined: Wed Mar 08, 2006 9:49 pm
Location: S. New Jersey, USA

Re: bizarre repetition detection issue

Post by opraus »

bob wrote: Only fly in the ointment. Why "4"? Any other number is worse than 4, so what is magic about testing for repetition after 4 plies rather than after 3 or 5, etc?

There has to be some sort of rational explanation. I suspect that it might provide some useful information...
Perhaps it is because the preponderance of 'bogus' draws (refuting the null move) occur at the 4th ply after NM, while so may others (before and after the 4th ply) are legitimate draw scores.

Have you tried ply != 4 ? (excluding only ply=4)
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: bizarre repetition detection issue

Post by bob »

opraus wrote:
bob wrote: Only fly in the ointment. Why "4"? Any other number is worse than 4, so what is magic about testing for repetition after 4 plies rather than after 3 or 5, etc?

There has to be some sort of rational explanation. I suspect that it might provide some useful information...
Perhaps it is because the preponderance of 'bogus' draws (refuting the null move) occur at the 4th ply after NM, while so may others (before and after the 4th ply) are legitimate draw scores.

Have you tried ply != 4 ? (excluding only ply=4)
No. just excluding none, or 1 ply, or 2 plies, ... up to 3 plies (< 4).