How can I check if stockfish 2.0 use the Book.bin?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

SN

How can I check if stockfish 2.0 use the Book.bin?

Post by SN »

I'm using Ubuntu 10.10 and SCID 4.2.2.
How can I check if Stockfish 2.0 use the Book.bin?

I stored the Book.bin in the same folder like "Stockfish-20-32-ja".
In the UCI configuration is by default "book.bin" referenced.

I checkt everything and also renamed Book.bin to book.bin (Linux), but I can not find any differences. Stockfish ist always calculating very strong.

regards
Kurt Utzinger
Posts: 169
Joined: Sun May 11, 2008 10:31 pm
Location: Switzerland

Re: How can I check if stockfish 2.0 use the Book.bin?

Post by Kurt Utzinger »

SN wrote:I'm using Ubuntu 10.10 and SCID 4.2.2.
How can I check if Stockfish 2.0 use the Book.bin?

I stored the Book.bin in the same folder like "Stockfish-20-32-ja".
In the UCI configuration is by default "book.bin" referenced.

I checkt everything and also renamed Book.bin to book.bin (Linux), but I can not find any differences. Stockfish ist always calculating very strong.

regards
I think that the book.bin is designed for the only only with with Fabien Letouzey's PolyGlot adapter.
Kurt
Richard Allbert
Posts: 792
Joined: Wed Jul 19, 2006 9:58 am

Re: How can I check if stockfish 2.0 use the Book.bin?

Post by Richard Allbert »

... I though StockFish had been coded to use Polyglot books?

Answering the the OP... not sure, but I guess fast responses in the opening would mean it's using a book.

Regards

Richard
UncombedCoconut
Posts: 319
Joined: Fri Dec 18, 2009 11:40 am
Location: Naperville, IL

Re: How can I check if stockfish 2.0 use the Book.bin?

Post by UncombedCoconut »

Your file system is case-sensitive, so you may have to rename Book.bin to book.bin. Also make sure SCID is set to run Stockfish inside the folder containing book.bin.
SN

Re: How can I check if stockfish 2.0 use the Book.bin?

Post by SN »

Kurt Utzinger wrote: I think that the book.bin is designed for the only only with with Fabien Letouzey's PolyGlot adapter.
Kurt
You think really that book.bin is only for PolyGlot?

At http://www.stockfishchess.com/download/ is noted:
"How do I use the opening book?
Stockfish is compatible with PolyGlot (.bin) opening books. To use a book with Stockfish, place the file in the same location as the engine runtime. Then, use the UCI options to specify the file name of the book."

I have done both, renaming to book.bin and stored in the same folder like Stockfish.
Do you know whether Stockfish has generally a opening book, I guess NO.
But if, do you know which one.

Stefan
SN

Re: How can I check if stockfish 2.0 use the Book.bin?

Post by SN »

Richard Allbert wrote: Answering the the OP... not sure, but I guess fast responses in the opening would mean it's using a book.

Regards

Richard
But this is my problem. I see in SCID the calculated moves and the moves seems NOT from a book. The moves are always calculated, but Stockfish moves always very fast, so I don't know if the book is used and useful.
In my case I think the book.bin is never used because I know the moves from a book. If the book.bin is only for PolyGlot-Adapter then it is clear.
My next question is: is there another opening book for Stockfish available?

Stefan

Shane's Chess Information Database (SCID) is a database application for playing, viewing and maintaining databases of Chess games.
SN

Re: How can I check if stockfish 2.0 use the Book.bin?

Post by SN »

UncombedCoconut wrote:Your file system is case-sensitive, so you may have to rename Book.bin to book.bin. Also make sure SCID is set to run Stockfish inside the folder containing book.bin.
I have already done:
Command: /home/sn/Downloads/Stockfish/2.0/stockfish-20-linux/stockfish-20-linux/Linux/stockfish-20-32-ja
Directory: /home/sn/Downloads/Stockfish/2.0/stockfish-20-linux/stockfish-20-linux/Linux
In configure UCI engine: Book File: book.bin
Use engine book is checked and I have tried to unchecked, no differences.
In the Folder above Book.bin is renamed to book.bin and the access rights are correct.
Stockfish is calculating to depth 26 from starting position.

regards
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: How can I check if stockfish 2.0 use the Book.bin?

Post by Sven »

SN wrote:
Richard Allbert wrote: Answering the the OP... not sure, but I guess fast responses in the opening would mean it's using a book.

Regards

Richard
But this is my problem. I see in SCID the calculated moves and the moves seems NOT from a book. The moves are always calculated, but Stockfish moves always very fast, so I don't know if the book is used and useful.
In my case I think the book.bin is never used because I know the moves from a book. If the book.bin is only for PolyGlot-Adapter then it is clear.
My next question is: is there another opening book for Stockfish available?

Stefan

Shane's Chess Information Database (SCID) is a database application for playing, viewing and maintaining databases of Chess games.
The feature of Stockfish being able to use opening books in the PolyGlot book format is independent from using the PolyGlot adapter. You would use this adapter to connect a chess engine that communicates via the UCI protocol to a chess GUI communicating via the WinBoard protocol. The connection between both, adapter and opening book format, is simply that PolyGlot is a tool that can be used as adapter but additionally has options to deal with (and create) opening books in a special format.

All opening books that are conforming to the PolyGlot book format can therefore be used with Stockfish.

To address your original problem: can you explain what you mean by "Stockfish moves always very fast"? Have you tried to define a very long time control, like "40 moves in 4 hours", and then rename "book.bin" into something which will definitely not be found by Stockfish (like "potato.chips") and see whether Stockfish starts to think longer from the starting position? If it does, now rename back the book and start again, does Stockfish now move instantly? Make sure that Stockfish is always restarted from scratch, otherwise you might be influenced by the hash table somehow.

I hope this helps?!

Sven
UncombedCoconut
Posts: 319
Joined: Fri Dec 18, 2009 11:40 am
Location: Naperville, IL

Re: How can I check if stockfish 2.0 use the Book.bin?

Post by UncombedCoconut »

OK, thanks for clarifying. How are you seeing its depth from the opening position? If you have asked it to *analyze* the position (which means SCID sends a "go infinite" command), it won't use its book. To see its book moves, you should use SCID's book window.
OTOH, if I ask SCID for a "serious game" with Stockfish, the engine uses its book. If you see it thinking under this condition rather than replying instantly with such un-engine-like lines as the Sicilian, something is misconfigured... which is odd, considering that you've taken all the required steps. (I am also using Ubuntu Linux.)
User avatar
Eelco de Groot
Posts: 4561
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: How can I check if stockfish 2.0 use the Book.bin?

Post by Eelco de Groot »

Hello Stefan,

Maybe I am just adding noise to this discussion, but could the problem be that you are just analyzing a (opening) position in SCID? In that case Stockfish would be running in analysis mode and then does not use its book. So it is not really a SCID issue I think. If set up as per the instructions Stockfish will be using the book when playing a chessgame but from my limited knowledge of SCID I am not sure there is an option for that? I am almost certain no engine-engine matches are possible, it is after all a database, not really a GUI (Graphical User Interface).

I only have Windows and mostly use Stockfish in Shredder's interface, there it is the same, in analysis mode book.bin will not be used.

I hope this helps answer your question a bit?

[Edit: I see Justin Blanchard and Sven Schüle were thinking along the same lines, I had not read their posts when first answering.]

Regards, Eelco
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan