Here is something I have not seen asked or discussed previously. I found a serious repetition bug in Crafty that has been around for a couple of years. But in fixing it I looked carefully at how/when/where it was called, and came across the following issue.....
Do you still do repetition checks below a null-move? I have not yet concluded whether the answer should be yes or no. For me, I have been doing so, but it appears that it is wasted and might even break a null-move search here and there, because obviously there can be no repetition below a null-move that repeats a position prior to the null move. Actually there can be, but do we want it to terminate the null-move search? I am thinking "no" since the purpose of the null-move is to determine whether my current position is so good that even if I "pass" I am still winning, and a repetition might cause the answer to be "no" erroneously...
Has anyone given this any kind of thought??? If so, did you actually reach any kind of useful conclusion as a result?
Bob
Repetition detection question
Moderators: hgm, Rebel, chrisw
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
-
- Posts: 2250
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: Repetition detection question
Why not treat null-move as irreversible?bob wrote:Here is something I have not seen asked or discussed previously. I found a serious repetition bug in Crafty that has been around for a couple of years. But in fixing it I looked carefully at how/when/where it was called, and came across the following issue.....
Do you still do repetition checks below a null-move? I have not yet concluded whether the answer should be yes or no. For me, I have been doing so, but it appears that it is wasted and might even break a null-move search here and there, because obviously there can be no repetition below a null-move that repeats a position prior to the null move. Actually there can be, but do we want it to terminate the null-move search? I am thinking "no" since the purpose of the null-move is to determine whether my current position is so good that even if I "pass" I am still winning, and a repetition might cause the answer to be "no" erroneously...
Has anyone given this any kind of thought??? If so, did you actually reach any kind of useful conclusion as a result?
Bob
-
- Posts: 317
- Joined: Mon Jun 26, 2006 9:44 am
Re: Repetition detection question
I'm very far from an expert on nullmove, but here is my take on this issue.
If you repeat a position from before the null move, that is a demonstration that for at least that one line after the null move, the null move was of no benefit to the other side i.e. the position is still good for the null moving side, so the repetition should be counted, but not as a draw, but as a fail high position for the null moving side.
I may be way off base, but that is what seems to make sense to me.
If you repeat a position from before the null move, that is a demonstration that for at least that one line after the null move, the null move was of no benefit to the other side i.e. the position is still good for the null moving side, so the repetition should be counted, but not as a draw, but as a fail high position for the null moving side.
I may be way off base, but that is what seems to make sense to me.
-
- Posts: 1922
- Joined: Thu Mar 09, 2006 12:51 am
- Location: Earth
Re: Repetition detection question
I check(ed) for null moves in the history, because I use infinitely recursive null move and it could immediately return a draw. I didn't really think it through, I just needed to not return reps after null moves. Now I realize the Gerd's suggestion is a much better way of handling it.bob wrote:Here is something I have not seen asked or discussed previously. I found a serious repetition bug in Crafty that has been around for a couple of years. But in fixing it I looked carefully at how/when/where it was called, and came across the following issue.....
Do you still do repetition checks below a null-move? I have not yet concluded whether the answer should be yes or no. For me, I have been doing so, but it appears that it is wasted and might even break a null-move search here and there, because obviously there can be no repetition below a null-move that repeats a position prior to the null move. Actually there can be, but do we want it to terminate the null-move search? I am thinking "no" since the purpose of the null-move is to determine whether my current position is so good that even if I "pass" I am still winning, and a repetition might cause the answer to be "no" erroneously...
Has anyone given this any kind of thought??? If so, did you actually reach any kind of useful conclusion as a result?
Bob
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Repetition detection question
That is what I have been doing, but I thought I would ask to see if there were any different opinions...Gerd Isenberg wrote:Why not treat null-move as irreversible?bob wrote:Here is something I have not seen asked or discussed previously. I found a serious repetition bug in Crafty that has been around for a couple of years. But in fixing it I looked carefully at how/when/where it was called, and came across the following issue.....
Do you still do repetition checks below a null-move? I have not yet concluded whether the answer should be yes or no. For me, I have been doing so, but it appears that it is wasted and might even break a null-move search here and there, because obviously there can be no repetition below a null-move that repeats a position prior to the null move. Actually there can be, but do we want it to terminate the null-move search? I am thinking "no" since the purpose of the null-move is to determine whether my current position is so good that even if I "pass" I am still winning, and a repetition might cause the answer to be "no" erroneously...
Has anyone given this any kind of thought??? If so, did you actually reach any kind of useful conclusion as a result?
Bob
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Repetition detection question
My question would be, why is that good? Suppose I am winning handily before trying a null-move. How does repeating a position after the null that was played before the null prove that this position is good for me???rjgibert wrote:I'm very far from an expert on nullmove, but here is my take on this issue.
If you repeat a position from before the null move, that is a demonstration that for at least that one line after the null move, the null move was of no benefit to the other side i.e. the position is still good for the null moving side, so the repetition should be counted, but not as a draw, but as a fail high position for the null moving side.
I may be way off base, but that is what seems to make sense to me.
-
- Posts: 317
- Joined: Mon Jun 26, 2006 9:44 am
Re: Repetition detection question
It's just as good as the position before the the null move that got repeated. You gave up a tempo with the nullmove and wrested the tempo back. What could be more convincing (besides mate)?bob wrote:My question would be, why is that good? Suppose I am winning handily before trying a null-move. How does repeating a position after the null that was played before the null prove that this position is good for me???rjgibert wrote:I'm very far from an expert on nullmove, but here is my take on this issue.
If you repeat a position from before the null move, that is a demonstration that for at least that one line after the null move, the null move was of no benefit to the other side i.e. the position is still good for the null moving side, so the repetition should be counted, but not as a draw, but as a fail high position for the null moving side.
I may be way off base, but that is what seems to make sense to me.
-
- Posts: 317
- Joined: Mon Jun 26, 2006 9:44 am
Re: Repetition detection question
Here is another way of looking at it if you prefer.bob wrote:My question would be, why is that good? Suppose I am winning handily before trying a null-move. How does repeating a position after the null that was played before the null prove that this position is good for me???rjgibert wrote:I'm very far from an expert on nullmove, but here is my take on this issue.
If you repeat a position from before the null move, that is a demonstration that for at least that one line after the null move, the null move was of no benefit to the other side i.e. the position is still good for the null moving side, so the repetition should be counted, but not as a draw, but as a fail high position for the null moving side.
I may be way off base, but that is what seems to make sense to me.
If you answer "no" as you suggested to the original question you posed, then what will happen is that your program will then look up the position in the hash table and get a hit if the entry has not been overwritten.
Naturally, the entry will have more than enough depth to it and your program will use the entry for a cutoff producing essentially the same result.
-
- Posts: 373
- Joined: Wed Mar 22, 2006 10:17 am
- Location: Novi Sad, Serbia
- Full name: Karlo Balla
Re: Repetition detection question
I treat NULL move just like pawn push somewhere out of board.bob wrote:That is what I have been doing, but I thought I would ask to see if there were any different opinions...Gerd Isenberg wrote:Why not treat null-move as irreversible?bob wrote:Here is something I have not seen asked or discussed previously. I found a serious repetition bug in Crafty that has been around for a couple of years. But in fixing it I looked carefully at how/when/where it was called, and came across the following issue.....
Do you still do repetition checks below a null-move? I have not yet concluded whether the answer should be yes or no. For me, I have been doing so, but it appears that it is wasted and might even break a null-move search here and there, because obviously there can be no repetition below a null-move that repeats a position prior to the null move. Actually there can be, but do we want it to terminate the null-move search? I am thinking "no" since the purpose of the null-move is to determine whether my current position is so good that even if I "pass" I am still winning, and a repetition might cause the answer to be "no" erroneously...
Has anyone given this any kind of thought??? If so, did you actually reach any kind of useful conclusion as a result?
Bob
(every NULL is different pawn push). With that approach even double NULL work fine in pawn endgames
Best Regards,
Karlo Balla Jr.
Karlo Balla Jr.
-
- Posts: 1154
- Joined: Fri Jun 23, 2006 5:18 am
Re: Repetition detection question
This is an interesting question. Has anyone actually collected any data as to which way works best in games?
-Sam
-Sam