Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Importing data into Crafty and adding to book

Author: Robert Hyatt

Date: 14:41:57 08/21/99

Go up one level in this thread


On August 20, 1999 at 22:13:46, Mark Longridge wrote:

>On August 20, 1999 at 12:53:13, Terry Presgrove wrote:
>
>>On August 20, 1999 at 09:23:05, Robert Hyatt wrote:
>>
>>>On August 20, 1999 at 02:35:57, Mark Longridge wrote:
>>>
>>>>It seems when you execute a "book create abc.pgn 60 1 50" to generate
>>>>the book.bin file, this destroys the previous book.bin and all the
>>>>learned info! I've experimented with "import xxx.pgn" to add new lines
>>>>to the book, and this appears to work ok. Is this the preferred method
>>>>for adding to the book.bin file without starting from stratch?
>>>>
>>>>Also I've talked to Tim Mann about Winboard and playing two computers
>>>>together via a null modem. It seems that because there is no rsh (remote
>>>>shell I assume?) that this is a difficulty under Windows only, and not
>>>>under Linux or Unix. If anyone as a work around please let me know.
>>>>
>>>>My email is cubeman@iname.com now
>>>>
>>>>Thanks in advance.
>>>>
>>>>Mark
>>>
>>>You can _not_ add new lines to a book.bin.  Import won't work on a pgn
>>>input.  It expects to read pgn with a special note at the end of each line
>>>giving the learned results for that line.  Your "import" is therefore doing
>>>nothing at all...
>>>
>>>if you want to add to the book, you have to do the following:
>>>
>>>1.  save your book.lrn file as another name (learn.dat for example).
>>>
>>>2.  combine your old pgn file (used to build book.bin) with the new pgn you
>>>    want to add.
>>>
>>>3.  build your book from the new pgn.
>>>
>>>4.  import learn.dat
>>>
>>>and you are ready to go with new lines, and the old learning stuff still
>>>intact...
>>
>> It was not until recently that I came to realize why when I changed books
>> the Crafty I ran on ICC always dropped in rating points sometimes
>> significantly. I had forgot to do the points you just made. And as a result
>> Crafty had zero in book learning. A couple of years ago I couldn't pass
>> kindergarden when it came to understanding what makes Crafty tick
>> today I feel I've enrolled in the first grade. :,)
>>
>> TP
>
>Hrmph... I don't like the idea of losing information.
>
>The reason why I tried to make direct additions to book.bin is because
>the pgn file I used to build it was lost. Crafty reported "16 lines added"
>after I typed "import abc.pgn" so I figured something must have happened.
>It is not possible that 16 lines were added, as crafty reported? Possibly
>the lines were added, but without any weighted values?

No. it means that the book learning code added book learning scores for
16 book lines, even though there were no scores.  the crafty.doc is very
clear on what this is all about, and that there is _no_ method to add to
the current book data structure.  This book structure was chosen for
speed of access, not to facilitate adding lines.  There is _no_ way to add
lines except by going back to the original pgn input and adding more lines
to that file.  You don't lose the learning if you save the book.lrn file...
as you can import that.  But "import" is _only_ for learning data, either
position learning data or book learning data.  _nothing_ else...



>
>And while I'm thinking about losing information, how does one know if the
>book.bin is intact and not corrupted? Does crafty know when there are
>problems with book.bin? Or is it best to simply to rebuild book.bin
>every couple of months?

I know of no way for it to become corrupted unless you power off while it
is updating it during a learning cycle.  I _never_ rebuild my book except
when I switch to a new pgn input file...



>
>To build my book.pgn I used Kasparov's games, Fischer's games, and crafty's
>(albeit somewhat modified) own games against various opponents. I think I
>added cray blitz's games too. And all the anti-computer games from the
>anti-computer page. Actually there were some of my own games in there too,
>I wonder if crafty actually used them! Does crafty know not to play some
>terrible openings of mine automatically?


no... that is why you shouldn't use 'garbage' pgn games for an opening book.
Because it has no idea.  It will figure it out after it loses a game, but
if you include a lot of bad games, it will have to lose them all before it
learns not to play those lines.



>
>One thing for certain, an overhaul of my book is overdo.
>
>Mark



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.