Hi Bob,
I think there is a bug in search.c at line 701.
The first condition (repeat == 2) is allways false, since the only place where that variable can be set to a non zero value or to 2, is at line 75, but then the search returns at line 83. Please fix that, I don't like bugs in crafty
Cardoso wrote:Hi Bob,
I think there is a bug in search.c at line 701.
The first condition (repeat == 2) is allways false, since the only place where that variable can be set to a non zero value or to 2, is at line 75, but then the search returns at line 83. Please fix that, I don't like bugs in crafty
best regards,
Alvaro
Thanks. In all the cleaning up, something was lost. The key here is that if RepetitionCheck() returns a 2, that signals a 50 move draw. But I don't want to force the score to zero at the top of search, I want to first search to see if I am mated at this ply, which requires going through a search first. I'm supposed to defer the repeat==2 draw until I verify I can't mate my opponent instead. But that seems to have gotten lost somewhere along the way...
Will be fixed in next version...
Last edited by bob on Thu Jun 26, 2014 9:14 pm, edited 1 time in total.
Cardoso wrote:Hi Bob,
I think there is a bug in search.c at line 701.
The first condition (repeat == 2) is allways false, since the only place where that variable can be set to a non zero value or to 2, is at line 75, but then the search returns at line 83. Please fix that, I don't like bugs in crafty
best regards,
Alvaro
Thanks. In all the cleaning up, something was lost. The key here is that if RepetitionCheck() returns a 2, that signals a 50 move draw. But I don't want to force the score to zero at the top of search, I want to first search to see if I am mated, which needs to run through search to find a legal move. I'm supposed to defer the repeat==2 draw until I verify I can't mate my opponent instead. But that seems to have gotten lost somewhere along the way...
Will be fixed in next version...
If you want to fix it in 24.0, change the block of code that calls RepetitionCheck() back to what it was in 23.x versions:
Cardoso wrote:Hi Bob,
I think there is a bug in search.c at line 701.
The first condition (repeat == 2) is allways false, since the only place where that variable can be set to a non zero value or to 2, is at line 75, but then the search returns at line 83. Please fix that, I don't like bugs in crafty
best regards,
Alvaro
Thanks. In all the cleaning up, something was lost. The key here is that if RepetitionCheck() returns a 2, that signals a 50 move draw. But I don't want to force the score to zero at the top of search, I want to first search to see if I am mated at this ply, which requires going through a search first. I'm supposed to defer the repeat==2 draw until I verify I can't mate my opponent instead. But that seems to have gotten lost somewhere along the way...
Will be fixed in next version...
Heh, I had that same bug in Myrddin. "Hooray, I made it to a 50-move draw! Wait, what do you mean, checkmate...?"