Input this position and analyze with crafty 23.2:
[d]8/8/8/1p6/1N6/pKp5/1b6/k7 w - - 0 1
Crafty says Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bc1 4. Nb3# <HT>
Now make the move Kc2:
Now crafty says Mat05 1. ... Bc1 2. Kxc1 c2 3. Kxc2 <EGTB>
Apparently, crafty pruned a move that would postpone the mate. I assume that crafty could have pruned a move which would have allowed black to draw or win, which is scary. In the original position the analysis stops after ply 10, while after Kc2 the analysis continues indefinitely, which is useful here but seems excessive.
A very minor bug is that Test and Testepd functions do not turn off swindle mode.
crafty bugs
Moderator: Ras
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: crafty bugs
I can't reproduce this here:jwes wrote:Input this position and analyze with crafty 23.2:
[d]8/8/8/1p6/1N6/pKp5/1b6/k7 w - - 0 1
Crafty says Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bc1 4. Nb3# <HT>
Now make the move Kc2:
Now crafty says Mat05 1. ... Bc1 2. Kxc1 c2 3. Kxc2 <EGTB>
Apparently, crafty pruned a move that would postpone the mate. I assume that crafty could have pruned a move which would have allowed black to draw or win, which is scary. In the original position the analysis stops after ply 10, while after Kc2 the analysis continues indefinitely, which is useful here but seems excessive.
A very minor bug is that Test and Testepd functions do not turn off swindle mode.
9-> 0.01 Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
...
Kc2
...
29 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
29-> 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
Etc. with 3-4-5 piece egtbs used.
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
Re: crafty bugs
Try the position after Kc2 Bc1bob wrote:I can't reproduce this here:jwes wrote:Input this position and analyze with crafty 23.2:
[d]8/8/8/1p6/1N6/pKp5/1b6/k7 w - - 0 1
Crafty says Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bc1 4. Nb3# <HT>
Now make the move Kc2:
Now crafty says Mat05 1. ... Bc1 2. Kxc1 c2 3. Kxc2 <EGTB>
Apparently, crafty pruned a move that would postpone the mate. I assume that crafty could have pruned a move which would have allowed black to draw or win, which is scary. In the original position the analysis stops after ply 10, while after Kc2 the analysis continues indefinitely, which is useful here but seems excessive.
A very minor bug is that Test and Testepd functions do not turn off swindle mode.
9-> 0.01 Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
...
Kc2
...
29 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
29-> 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
Etc. with 3-4-5 piece egtbs used.
[d]8/8/8/1p6/1N6/p1p5/2K5/k1b5 w - - 0 2
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: crafty bugs
Here's what is happening. There are two ways to find a mate, either with the normal search or with an egtb hit. The LMR stuff reduces the depth, the opposite of what search extensions do. And some old rules ignore LMR (for example, if you find a mate in 5, there is no need to go beyond ply=9. That used to be true since we would often find deeper mates where the optimal (and shorter mate might not have more than 1 or 2 checks). But with LMR, since we reduce the search depth significantly, that old rule of searching to 2*mate_depth - 1 is no longer correct. In fact, there is no real way of knowing how deep you need to search. The simplest solution is to just search for the normal time limit and not stop when a mate is found... I'll investigate, but suspect more than a few might fall into this.jwes wrote:Try the position after Kc2 Bc1bob wrote:I can't reproduce this here:jwes wrote:Input this position and analyze with crafty 23.2:
[d]8/8/8/1p6/1N6/pKp5/1b6/k7 w - - 0 1
Crafty says Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bc1 4. Nb3# <HT>
Now make the move Kc2:
Now crafty says Mat05 1. ... Bc1 2. Kxc1 c2 3. Kxc2 <EGTB>
Apparently, crafty pruned a move that would postpone the mate. I assume that crafty could have pruned a move which would have allowed black to draw or win, which is scary. In the original position the analysis stops after ply 10, while after Kc2 the analysis continues indefinitely, which is useful here but seems excessive.
A very minor bug is that Test and Testepd functions do not turn off swindle mode.
9-> 0.01 Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
...
Kc2
...
29 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
29-> 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
Etc. with 3-4-5 piece egtbs used.
[d]8/8/8/1p6/1N6/p1p5/2K5/k1b5 w - - 0 2
The only reason we stop when we do is to (a) make sure we find the shortest mate and (b) stop searching once we know we can't find a shorter mate so that the program doesn't look stupid searching for a mate in X for 3-4 minutes...
Crafty's code is supposed to always search for a shorter mate than the last time, but this doesn't happen in analysis mode. I was not originally using the analyze command which makes this fail, since there is no "previous search" in this mode, just one constant search so long as the program is concerned...
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
Re: crafty bugs
The problem is that after Kc2, either crafty is not even considering Bc1 or it is evaluating it with a score of worse than Mated in 4 or it would think Bc1 is a better move than a2. Stopping the search early for mate should only lead to missing a shorter mate, not to a wrong result.bob wrote:Here's what is happening. There are two ways to find a mate, either with the normal search or with an egtb hit. The LMR stuff reduces the depth, the opposite of what search extensions do. And some old rules ignore LMR (for example, if you find a mate in 5, there is no need to go beyond ply=9. That used to be true since we would often find deeper mates where the optimal (and shorter mate might not have more than 1 or 2 checks). But with LMR, since we reduce the search depth significantly, that old rule of searching to 2*mate_depth - 1 is no longer correct. In fact, there is no real way of knowing how deep you need to search. The simplest solution is to just search for the normal time limit and not stop when a mate is found... I'll investigate, but suspect more than a few might fall into this.jwes wrote:Try the position after Kc2 Bc1bob wrote:I can't reproduce this here:jwes wrote:Input this position and analyze with crafty 23.2:
[d]8/8/8/1p6/1N6/pKp5/1b6/k7 w - - 0 1
Crafty says Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bc1 4. Nb3# <HT>
Now make the move Kc2:
Now crafty says Mat05 1. ... Bc1 2. Kxc1 c2 3. Kxc2 <EGTB>
Apparently, crafty pruned a move that would postpone the mate. I assume that crafty could have pruned a move which would have allowed black to draw or win, which is scary. In the original position the analysis stops after ply 10, while after Kc2 the analysis continues indefinitely, which is useful here but seems excessive.
A very minor bug is that Test and Testepd functions do not turn off swindle mode.
9-> 0.01 Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
...
Kc2
...
29 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
29-> 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
Etc. with 3-4-5 piece egtbs used.
[d]8/8/8/1p6/1N6/p1p5/2K5/k1b5 w - - 0 2
The only reason we stop when we do is to (a) make sure we find the shortest mate and (b) stop searching once we know we can't find a shorter mate so that the program doesn't look stupid searching for a mate in X for 3-4 minutes...
Crafty's code is supposed to always search for a shorter mate than the last time, but this doesn't happen in analysis mode. I was not originally using the analyze command which makes this fail, since there is no "previous search" in this mode, just one constant search so long as the program is concerned...
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: crafty bugs
All it takes is an LMR reduction or a null-move search, both of which can be done in the same path (multiple times even) to hide this mate. I am not seeing a "wrong result" here. Just missing the shorter mate. Can you be more specific ? (I tried the position after Kc2 Bc1 as well)...jwes wrote:The problem is that after Kc2, either crafty is not even considering Bc1 or it is evaluating it with a score of worse than Mated in 4 or it would think Bc1 is a better move than a2. Stopping the search early for mate should only lead to missing a shorter mate, not to a wrong result.bob wrote:Here's what is happening. There are two ways to find a mate, either with the normal search or with an egtb hit. The LMR stuff reduces the depth, the opposite of what search extensions do. And some old rules ignore LMR (for example, if you find a mate in 5, there is no need to go beyond ply=9. That used to be true since we would often find deeper mates where the optimal (and shorter mate might not have more than 1 or 2 checks). But with LMR, since we reduce the search depth significantly, that old rule of searching to 2*mate_depth - 1 is no longer correct. In fact, there is no real way of knowing how deep you need to search. The simplest solution is to just search for the normal time limit and not stop when a mate is found... I'll investigate, but suspect more than a few might fall into this.jwes wrote:Try the position after Kc2 Bc1bob wrote:I can't reproduce this here:jwes wrote:Input this position and analyze with crafty 23.2:
[d]8/8/8/1p6/1N6/pKp5/1b6/k7 w - - 0 1
Crafty says Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bc1 4. Nb3# <HT>
Now make the move Kc2:
Now crafty says Mat05 1. ... Bc1 2. Kxc1 c2 3. Kxc2 <EGTB>
Apparently, crafty pruned a move that would postpone the mate. I assume that crafty could have pruned a move which would have allowed black to draw or win, which is scary. In the original position the analysis stops after ply 10, while after Kc2 the analysis continues indefinitely, which is useful here but seems excessive.
A very minor bug is that Test and Testepd functions do not turn off swindle mode.
9-> 0.01 Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
...
Kc2
...
29 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
29-> 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
Etc. with 3-4-5 piece egtbs used.
[d]8/8/8/1p6/1N6/p1p5/2K5/k1b5 w - - 0 2
The only reason we stop when we do is to (a) make sure we find the shortest mate and (b) stop searching once we know we can't find a shorter mate so that the program doesn't look stupid searching for a mate in X for 3-4 minutes...
Crafty's code is supposed to always search for a shorter mate than the last time, but this doesn't happen in analysis mode. I was not originally using the analyze command which makes this fail, since there is no "previous search" in this mode, just one constant search so long as the program is concerned...
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
Re: crafty bugs
Crafty is missing a longer mate, not a shorter mate. Crafty that Kc2, a2 is mate in 4. Why does not crafty see that after Kc2, Bc1 is a better move for black than a2?bob wrote:All it takes is an LMR reduction or a null-move search, both of which can be done in the same path (multiple times even) to hide this mate. I am not seeing a "wrong result" here. Just missing the shorter mate. Can you be more specific ? (I tried the position after Kc2 Bc1 as well)...jwes wrote:The problem is that after Kc2, either crafty is not even considering Bc1 or it is evaluating it with a score of worse than Mated in 4 or it would think Bc1 is a better move than a2. Stopping the search early for mate should only lead to missing a shorter mate, not to a wrong result.bob wrote:Here's what is happening. There are two ways to find a mate, either with the normal search or with an egtb hit. The LMR stuff reduces the depth, the opposite of what search extensions do. And some old rules ignore LMR (for example, if you find a mate in 5, there is no need to go beyond ply=9. That used to be true since we would often find deeper mates where the optimal (and shorter mate might not have more than 1 or 2 checks). But with LMR, since we reduce the search depth significantly, that old rule of searching to 2*mate_depth - 1 is no longer correct. In fact, there is no real way of knowing how deep you need to search. The simplest solution is to just search for the normal time limit and not stop when a mate is found... I'll investigate, but suspect more than a few might fall into this.jwes wrote:Try the position after Kc2 Bc1bob wrote:I can't reproduce this here:jwes wrote:Input this position and analyze with crafty 23.2:
[d]8/8/8/1p6/1N6/pKp5/1b6/k7 w - - 0 1
Crafty says Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bc1 4. Nb3# <HT>
Now make the move Kc2:
Now crafty says Mat05 1. ... Bc1 2. Kxc1 c2 3. Kxc2 <EGTB>
Apparently, crafty pruned a move that would postpone the mate. I assume that crafty could have pruned a move which would have allowed black to draw or win, which is scary. In the original position the analysis stops after ply 10, while after Kc2 the analysis continues indefinitely, which is useful here but seems excessive.
A very minor bug is that Test and Testepd functions do not turn off swindle mode.
9-> 0.01 Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
...
Kc2
...
29 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
29-> 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
Etc. with 3-4-5 piece egtbs used.
[d]8/8/8/1p6/1N6/p1p5/2K5/k1b5 w - - 0 2
The only reason we stop when we do is to (a) make sure we find the shortest mate and (b) stop searching once we know we can't find a shorter mate so that the program doesn't look stupid searching for a mate in X for 3-4 minutes...
Crafty's code is supposed to always search for a shorter mate than the last time, but this doesn't happen in analysis mode. I was not originally using the analyze command which makes this fail, since there is no "previous search" in this mode, just one constant search so long as the program is concerned...
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: crafty bugs
OK, I will run the original position twice. First, without EGTBs at all:jwes wrote:Crafty is missing a longer mate, not a shorter mate. Crafty that Kc2, a2 is mate in 4. Why does not crafty see that after Kc2, Bc1 is a better move for black than a2?bob wrote:All it takes is an LMR reduction or a null-move search, both of which can be done in the same path (multiple times even) to hide this mate. I am not seeing a "wrong result" here. Just missing the shorter mate. Can you be more specific ? (I tried the position after Kc2 Bc1 as well)...jwes wrote:The problem is that after Kc2, either crafty is not even considering Bc1 or it is evaluating it with a score of worse than Mated in 4 or it would think Bc1 is a better move than a2. Stopping the search early for mate should only lead to missing a shorter mate, not to a wrong result.bob wrote:Here's what is happening. There are two ways to find a mate, either with the normal search or with an egtb hit. The LMR stuff reduces the depth, the opposite of what search extensions do. And some old rules ignore LMR (for example, if you find a mate in 5, there is no need to go beyond ply=9. That used to be true since we would often find deeper mates where the optimal (and shorter mate might not have more than 1 or 2 checks). But with LMR, since we reduce the search depth significantly, that old rule of searching to 2*mate_depth - 1 is no longer correct. In fact, there is no real way of knowing how deep you need to search. The simplest solution is to just search for the normal time limit and not stop when a mate is found... I'll investigate, but suspect more than a few might fall into this.jwes wrote:Try the position after Kc2 Bc1bob wrote:I can't reproduce this here:jwes wrote:Input this position and analyze with crafty 23.2:
[d]8/8/8/1p6/1N6/pKp5/1b6/k7 w - - 0 1
Crafty says Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bc1 4. Nb3# <HT>
Now make the move Kc2:
Now crafty says Mat05 1. ... Bc1 2. Kxc1 c2 3. Kxc2 <EGTB>
Apparently, crafty pruned a move that would postpone the mate. I assume that crafty could have pruned a move which would have allowed black to draw or win, which is scary. In the original position the analysis stops after ply 10, while after Kc2 the analysis continues indefinitely, which is useful here but seems excessive.
A very minor bug is that Test and Testepd functions do not turn off swindle mode.
9-> 0.01 Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
...
Kc2
...
29 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
29-> 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
Etc. with 3-4-5 piece egtbs used.
[d]8/8/8/1p6/1N6/p1p5/2K5/k1b5 w - - 0 2
The only reason we stop when we do is to (a) make sure we find the shortest mate and (b) stop searching once we know we can't find a shorter mate so that the program doesn't look stupid searching for a mate in X for 3-4 minutes...
Crafty's code is supposed to always search for a shorter mate than the last time, but this doesn't happen in analysis mode. I was not originally using the analyze command which makes this fail, since there is no "previous search" in this mode, just one constant search so long as the program is concerned...
Code: Select all
11 0.01 Mat06 1. Kc2 Bc1 2. Kxc1 c2 3. Kxc2 a2 4.
Nc6 b4 5. Na5 b3+ 6. Nxb3#
11-> 0.01 Mat06 1. Kc2 Bc1 2. Kxc1 c2 3. Kxc2 a2 4.
Nc6 b4 5. Na5 b3+ 6. Nxb3#
With EGTBs:
Code: Select all
9 0.08 Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
9-> 0.08 Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: crafty bugs
Because Bc1 is refuted by a reduced-depth search (which doesn't see the mate at this depth). Once we get a mate score from the first move (black plays a2) we now have a bound, and the position after Bc1 appears good for black. We can't see the mate after Bc1 because a reduced-depth search fails high which rejects Bc1. I am not certain whether the Bc1 move gets refuted outright by a null-move search or just a reduced-depth search, as the tree is too big to look at in a short inspection...jwes wrote:Crafty is missing a longer mate, not a shorter mate. Crafty that Kc2, a2 is mate in 4. Why does not crafty see that after Kc2, Bc1 is a better move for black than a2?bob wrote:All it takes is an LMR reduction or a null-move search, both of which can be done in the same path (multiple times even) to hide this mate. I am not seeing a "wrong result" here. Just missing the shorter mate. Can you be more specific ? (I tried the position after Kc2 Bc1 as well)...jwes wrote:The problem is that after Kc2, either crafty is not even considering Bc1 or it is evaluating it with a score of worse than Mated in 4 or it would think Bc1 is a better move than a2. Stopping the search early for mate should only lead to missing a shorter mate, not to a wrong result.bob wrote:Here's what is happening. There are two ways to find a mate, either with the normal search or with an egtb hit. The LMR stuff reduces the depth, the opposite of what search extensions do. And some old rules ignore LMR (for example, if you find a mate in 5, there is no need to go beyond ply=9. That used to be true since we would often find deeper mates where the optimal (and shorter mate might not have more than 1 or 2 checks). But with LMR, since we reduce the search depth significantly, that old rule of searching to 2*mate_depth - 1 is no longer correct. In fact, there is no real way of knowing how deep you need to search. The simplest solution is to just search for the normal time limit and not stop when a mate is found... I'll investigate, but suspect more than a few might fall into this.jwes wrote:Try the position after Kc2 Bc1bob wrote:I can't reproduce this here:jwes wrote:Input this position and analyze with crafty 23.2:
[d]8/8/8/1p6/1N6/pKp5/1b6/k7 w - - 0 1
Crafty says Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bc1 4. Nb3# <HT>
Now make the move Kc2:
Now crafty says Mat05 1. ... Bc1 2. Kxc1 c2 3. Kxc2 <EGTB>
Apparently, crafty pruned a move that would postpone the mate. I assume that crafty could have pruned a move which would have allowed black to draw or win, which is scary. In the original position the analysis stops after ply 10, while after Kc2 the analysis continues indefinitely, which is useful here but seems excessive.
A very minor bug is that Test and Testepd functions do not turn off swindle mode.
9-> 0.01 Mat04 1. Kc2 a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
...
Kc2
...
29 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
29-> 0.05 Mat03 1. ... a2 2. Nc6 Ba3 3. Na5 Bb2 4.
Nb3#
Etc. with 3-4-5 piece egtbs used.
[d]8/8/8/1p6/1N6/p1p5/2K5/k1b5 w - - 0 2
The only reason we stop when we do is to (a) make sure we find the shortest mate and (b) stop searching once we know we can't find a shorter mate so that the program doesn't look stupid searching for a mate in X for 3-4 minutes...
Crafty's code is supposed to always search for a shorter mate than the last time, but this doesn't happen in analysis mode. I was not originally using the analyze command which makes this fail, since there is no "previous search" in this mode, just one constant search so long as the program is concerned...
This is simply another one of many anti-null-move positions...
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
Re: crafty bugs
I looked at it some more and believe I figured out what is happening. After 1. Kc2 Bc1 2 Kxc1 this position occursbob wrote:Because Bc1 is refuted by a reduced-depth search (which doesn't see the mate at this depth). Once we get a mate score from the first move (black plays a2) we now have a bound, and the position after Bc1 appears good for black. We can't see the mate after Bc1 because a reduced-depth search fails high which rejects Bc1. I am not certain whether the Bc1 move gets refuted outright by a null-move search or just a reduced-depth search, as the tree is too big to look at in a short inspection...jwes wrote: Crafty is missing a longer mate, not a shorter mate. Crafty that Kc2, a2 is mate in 4. Why does not crafty see that after Kc2, Bc1 is a better move for black than a2?
This is simply another one of many anti-null-move positions...
[d]8/8/8/1p6/1N6/p7/2p5/k1K5 w - - 0 3
Then the null move makes black move a2 and Nxc2 mates. What is not clear is if crafty should be trying null move here.