Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: After FIDE rules Jonny's operator could not even claim the draw

Author: Robert Hyatt

Date: 07:41:37 12/01/03

Go up one level in this thread


On December 01, 2003 at 10:01:39, Uri Blass wrote:

>On December 01, 2003 at 09:21:26, Roger D Davis wrote:
>
>>On December 01, 2003 at 04:18:00, Francesco Di Tolla wrote:
>>
>>>As far as I understand Jonny did not claim draw at all.
>>>Not because the program did not ask for it while the interface did, but becasue
>>>both the prorgam and interface NEVER did a draw claim.
>>>
>>
>>Shredder was showing like +10 at the time, so presumably, the Jonny engine knew
>>it was losing. The program was created by a human being. Presumably he created
>>it not just to dispassionately note 3-folds, but to claim the draw when he's -10
>>and a threefold occurs.
>>
>>Roger
>
>I do not know but my program claim automatically draw when there is 3 time
>repetition.
>
>I assume that the opponent is not stupid so if it he could claim a draw and did
>not do it then it may be a good idea for me to claim a draw.
>
>I also have no bugs that my program is going to repeat positions at +10
>
>Uri


Your program is not SMP-capable yet.  That changes things.  Bugs become
much more likely, and since 3-fold repetitions are not very common, not
spotting a bug there is easy.  I have had it happen to me _several_ times.

Look at main.c in crafty and look for the string repetition:

*   15.6    ugly repetition draw bug (SMP only) fixed.  I carefully copied    *
*           the repetition list from parent to child, but also copied the     *
*           repetition list pointer...  which remained pointing at the parent *
*           repetition list.  which failed, of course.                        *
*                                                                             *
*   15.12   "the" SMP repetition bug was finally found and fixed.  CopyToSMP  *
*           was setting the thread-specific rephead_* variable *wrong* which  *
*           broke so many things it was not funny.  evaluation tuning in this *
*           version as well to try to "center" values in a range of -X to +X  *
*           rather than 0 to 2X.  trade bonus had a bug in the pawn part that *
*           not only encouraged trading pawns when it should be doing the     *
*           opposite, but the way it was written actually made it look bad to *
*           win a pawn.  more minor xboard/winboard compatibility bugs fixed  *
*           so that games end when they should.  DrawScore() had a quirk that *
*           caused some problems, in that it didn't know what to do with non- *
*           zero draw scores, and could return a value with the wrong sign at *
*           times.  it is now passed a flag, "crafty_is_white" to fix this.   *
*           modification so that crafty can handle the "FEN" PGN tag and set  *
*           the board to the correct position when it is found.  xboard       *
*           options "hard" and "easy" now enable and disable pondering.       *
*   15.18   fix to the "material balance" evaluation term so that it will not *
*           like two pieces for a rook (plus pawn) nor will it like trading a *
*           piece for multiple pawns.  a rather gross bug in the repetition   *
*           code (dealing with 50 move rule) could overwrite random places in *
*           memory when the 50 move rule approached, because the arrays were  *
*           not long enough to hold 50 moves, plus allow the search to go     *
*           beyond the 50-move rule (which is legal and optional) and then    *
*           output moves (which uses ply=65 data structures).  this let the   *
*           repetition (50-move-rule part) overwrite things by storing well   *
*           beyond the end of the repetition list for either side.  minor fix *
*           to EGTB "swindle" code.  it now only tries the searches if it is  *
*           the side with swindling chances.  ie it is pointless to try for   *
*           a swindle in KRP vs KR if you don't have the P.  :)  some very    *
*           substantial changes to evaluate.c to get things back into some    *
*           form of synch with each other.                                    *
*                                                                             *
*   16.5    minor glitch in internal iterative deepening code (in search.c)   *
*           could sometimes produce an invalid move.  crafty now probes the   *
*           hash table to find the best move which works in all cases.        *
*           interesting tablebase bug fixed.  By probing at ply=2, the        *
*           search could overlook a repetition/50 move draw, and turn a won   *
*           position into a draw.  Crafty now only probes at ply > 2, to      *
*           let the RepetitionCheck() function have a chance.  added code by  *
*           Dan Corbett to add environment variables for the tablebases,      *
*           books, logfiles and the .craftyrc file paths.  the environment    *
*           variables CRAFTY_TB_PATH, CRAFTY_BOOK_PATH, CRAFTY_LOG_PATH and   *
*           CRAFTY_RC_PATH should point to where these files are located and  *
*           offer an alternative to specifying them on the command line.      *
*           final version of the EGTB code is included in this version.  this *
*           allows Crafty to use either compressed (using Andrew Kadatch's    *
*           compressor, _not_ zip or gzip) or non-compressed tablebases.  it  *
*           will use non-compressed files when available, and will also use   *
*           compressed files that are available so long as there is no non-   *
*           compressed version of the same file.  it is allowable to mix and  *
*           match as you see fit, but with all of the files compressed, the   *
*           savings is tremendous, roughly a factor of 5 in space reduction.  *
*                                                                             *
*   17.10   minor change to "threat" extension now only extends if the null-  *
*           move search returns "mated in 1" and not "mated in N".  this      *
*           tends to shrink the trees a bit with no noticable effect in       *
*           tactical strength.  EvaluatePawns() was not doing a reasonable    *
*           job of recognizing blocked pawns and candidate passers.  it did   *
*           not do well in recognizing that the pawn supporting a candidate   *
*           could not advance far enough to help make a real passed pawn.     *
*           minor change to RepetitionCheck() to not count two-fold repeats   *
*           as draws in the first two plies, which prevents some odd-looking  *
*           repeats at the expense of a little inefficiency.  Ugly repetition *
*           bug fixed.  rephead was off by one for whatever side crafty was   *
*           playing which would screw up repetition detection in some cases.  *
*           minor bug in main() that would report stalemate on some mates     *
*           when the ponder score was forgotten.                              *
*                                                                             *
*   18.4    recapture extension was left in SearchSMP() erroneously.  this    *
*           has now been protected by a #ifdef just like it was in Search().  *
*           bug in RepetitionCheck() was causing problems in SMP versions.    *
*           The entire repetition list code was modified to clean this up.    *
*           the problem was most noticable on things like fine #70.  bug in   *
*           LearnImportBook() confused the learn value sign, due to the other *
*           changes to make +=white all the time.  opposite bishop scoring    *
*           has been beefed up a bit to avoid these drawish endings.          *
*                                                                             *
*   19.3    change to EvaluateMaterial to realize that a rook for five pawns  *
*           is also likely a "bad trade."  adaptive hash table size code was  *
*           added so that the hash size is set automatically based on the     *
*           estimated NPS and time per move values for a specific "level"     *
*           command setting.   RepetitionCheck() rewritten.  the old code had *
*           an unexplained bug that would overlook repetitions in a parallel  *
*           search in rare cases.  the old cold was complex enough that it    *
*           was time to rewrite it and simplify it significantly.             *
*                                                                             *


I think you get the point.  I've been doing parallel programming for 25
years.  I've been doing chess programming for 35 years.  Yet I _still_ have
had bugs in that particular code show up repeatedly.  It is not hard to
do, by example.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.