bug-gnu-chess
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: [Bug-XBoard] Problem with book


From: Simon Waters
Subject: Re: Fw: [Bug-XBoard] Problem with book
Date: Fri, 19 Dec 2003 21:19:19 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130

Tim Mann wrote:
>
> Rudy -- Maybe you have to include "-fcp /usr/local/bin" on the xboard
> command line, if that's where GNU Chess 5 put its book.  Maybe the
> default install looks for the book in the current directory rather than
> in the pathname where it installs it.  This is really an issue with GNU
> Chess's "make install", though, not with xboard, so I'm forwarding your
> question to bug-gnu-chess.

Locations for the book file are hardcoded in book.h.

5.07 has.

/*
 * BookQuery() tries the following filenames in order to find
 * a valid opening book. The array must be NULL-terminated.
 */
static char const * bookbin[] = {
   "book.dat",
   "/usr/share/games/gnuchess/book.dat",
   "/usr/lib/games/gnuchess/book.dat",
   NULL
};

> I just installed gnuchess-5.07.tar and  xboard-4.2.7.tar on a machine running 
> Solaris 9 with CDE. Everything ran as expected except with respect to
> book_1.00.pgn.

There is a known issue with book_1.00.pgn and 5.07, which is
book_1.00.pgn has unmatched double quotes in 11 tags. I have
book_1.01.pgn, and will ask the GNU ftp maintainer to update the file
again.

The patch is small enough to email but I've used some obscure remote
diff utility (which Debian packages of course), as GNU diff gets a bit
memory hungry when handling 70MB text files (well diff consumed all my
memory, and all my swap, and then dies, maybe I need a new PC?).

As far as I know this issue only causes GNU Chess to omit a few thousand
games when creating book.dat.

This is because the new parser regards anything within double quotes as
part of the PGN tag, which is both silly, and probably technically
correct by the PGN standard.

> book add book.pgn (after mv book_100.pgn book.pgn; ./gnuchess) produced 
> book.dat 
> and a copy ended up in /usr/local/bin after make install ran.

I'm not aware of any reason the book should appear in /usr/local/bin
unless this is the current directory when you run "book add".

> However when I start xboard and enter the first move the system takes
> a very long time (10 seconds) to return P-Q4 to my P-K4 and seems to have
> to re-invent standard openings on the fly. I'm guessing it's not using
> the book, but I don't know how to "book on" using xboard. 

A long time to start first time, or a long time to start every game? A
long time to start first time is usually reading the book.dat file from
disk. I believe Xboard can be configured to restart the engine every
game, but this shouldn't be needed and isn't the default.

It does sound like the book file is, or has become corrupted. I'd try
deleting the book.dat file (from all locations above), and recreating
one. Is it possible you had a 5.02 (or earlier) book.dat file around?

The book file problems are best investigated outside Xboard, type
"./gnuchess" at a shell prompt, and enter your first move "e4" and you
should see something like....


Thinking...
Looking for opening book in book.dat...
Looking for opening book in /usr/share/games/gnuchess/book.dat...
Looking for opening book in /usr/lib/games/gnuchess/book.dat...
Read opening book (/usr/lib/games/gnuchess/book.dat)...
Loading book from /usr/lib/games/gnuchess/book.dat.
36433 hash collisions...  Opening database: 253597 book positions.
 In this position, there are 11 book moves:
 Nc6(71/72/20/30)  Nf6(54/105/80/102)  a6(75/3/1/0)  b6(68/11/3/8)
 c6(53/435/351/707)  d6(53/170/142/214)  e6(52/616/549/900)
g6(59/149/85/115)
 c5(56/2432/1609/2757)  d5(51/41/38/32)  e5(54/2417/1836/3186)

 c5(1272)  e5(1261)  e6(359)  c6(269)  d6(137)  g6(133)  Nc6(107)  Nf6(106)
 a6(76)  b6(73)  d5(71)


This is move (%/wins/losses/draws), followed by a list of moves with the
score for the move as assessed by whatever formula is flavour of the
release (by default popular moves with good results are favoured).

If you still have a problem after rebuilding the book file, please send
me a bug report. Please include the output of building the book, and
attempting to use it, the "script" utility is very useful for this.

 How that helps,

  Simon


Attachment: pgpPR6n84VTl7.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]