Was anyone else able to use a book.bin file with the latest Glaurung version? I had no problems using a book in previous versions, I am using performance.bin renamed to book.bin.
Tony
Glaurung 2 Epsilon/4 not using book
Moderator: Ras
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Glaurung 2 Epsilon/4 not using book
I have traced the code and when there is a book.bin file in the current working directory, Glaurung will load it after uci and ucinewgame.
I see that under Arena Glaurung is not using the book for me either.
I guess that there can be two reasons:
1. The working directory is fouled up.
2. The OwnBook UCI option is turned off.
I can't see how to set it in Arena.
I see that under Arena Glaurung is not using the book for me either.
I guess that there can be two reasons:
1. The working directory is fouled up.
2. The OwnBook UCI option is turned off.
I can't see how to set it in Arena.
Re: Glaurung 2 Epsilon/4 not using book
That means there will be an Epsilon/5 version soon.
Glad to see that I am not the only one with the problem under Arena. Dann are there any changes in book code between epsilon 2 and epsion 4 other than preventing the program from using the same lines?

Re: Glaurung 2 Epsilon/4 not using book
Hi Tony,Tony Thomas wrote:Was anyone else able to use a book.bin file with the latest Glaurung version? I had no problems using a book in previous versions, I am using performance.bin renamed to book.bin.
Tony
If you are dying to start your glaurung 2 - e/4 testing you could set it as a winboard engine in Arena using polyglot and book.bin as the polyglot book.
-
- Posts: 1808
- Joined: Wed Mar 08, 2006 9:19 pm
- Location: Oslo, Norway
Re: Glaurung 2 Epsilon/4 not using book
Perhaps, but so far I suspect that this is an Arena bug and not a Glaurung bug. PolyGlot books works fine with Glaurung on my computer...Tony Thomas wrote:That means there will be an Epsilon/5 version soon.![]()
Is it possible to make Arena produce logs of the communication between the engine and the GUI? Such a log would make the problem easier to analyse.
No, there are no other changes in the book code.Glad to see that I am not the only one with the problem under Arena. Dann are there any changes in book code between epsilon 2 and epsion 4 other than preventing the program from using the same lines?
Tord
-
- Posts: 1808
- Joined: Wed Mar 08, 2006 9:19 pm
- Location: Oslo, Norway
Re: Glaurung 2 Epsilon/4 not using book
This is not 100% correct. Actually, it loads it just after receiving the "go" command, i.e. when it is asked to start a search. The relevant code is in the 'think' function in search.cpp:Dann Corbit wrote:I have traced the code and when there is a book.bin file in the current working directory, Glaurung will load it after uci and ucinewgame.
Code: Select all
// Look for a book move:
if(!infinite && !ponder && get_option_value_bool("OwnBook")) {
Move bookMove;
if(!OpeningBook.is_open())
OpeningBook.open("book.bin");
bookMove = OpeningBook.get_move(pos);
if(bookMove != MOVE_NONE) {
std::cout << "bestmove " << move_to_string(bookMove) << std::endl;
return;
}
}
-
- Posts: 6442
- Joined: Tue Jan 09, 2007 12:31 am
- Location: PA USA
- Full name: Louis Zulli
Re: Glaurung 2 Epsilon/4 not using book
It seems that this most recent version of Glaurung also fails to use book.bin when run using the Sigma Chess GUI. The file book.bin is in the same directory as the glaurung binary, and the OwnBook option is ON in the GUI.Tord Romstad wrote: Perhaps, but so far I suspect that this is an Arena bug and not a Glaurung bug. PolyGlot books works fine with Glaurung on my computer...
Tord
Re: Glaurung 2 Epsilon/4 not using book
Here is the arena debug.Tord Romstad wrote:Perhaps, but so far I suspect that this is an Arena bug and not a Glaurung bug. PolyGlot books works fine with Glaurung on my computer...Tony Thomas wrote:That means there will be an Epsilon/5 version soon.![]()
Is it possible to make Arena produce logs of the communication between the engine and the GUI? Such a log would make the problem easier to analyse.
No, there are no other changes in the book code.Glad to see that I am not the only one with the problem under Arena. Dann are there any changes in book code between epsilon 2 and epsion 4 other than preventing the program from using the same lines?
Tord
Code: Select all
4657**-------------NewGame!!!-------------
15282*1*-------------------Starting engine 1 Glaurung 2 Epsilon/4-------------------
15282*1*Configured Engine 1 Type: UCI
15422*1*Engine 1 dir: C:\Documents and Settings\Owner\Desktop\arena_11\Engines\glaurung2-epsilon4
15485*1*Engine 1 commandline: "C:\Documents and Settings\Owner\Desktop\arena_11\Engines\glaurung2-epsilon4\glaurungepsion.exe"
15938>1:uci
16000<1:id name Glaurung 2-epsilon/4
16000<1:id author Tord Romstad
16000<1:option name Hash type spin default 32 min 4 max 1024
16063<1:option name Ponder type check default true
16063<1:option name OwnBook type check default true
16063<1:option name UCI_ShowCurrLine type check default false
16063<1:option name UCI_Chess960 type check default false
16063<1:option name UCI_EngineAbout type string default Glaurung by Tord Romstad, see http://www.glaurungchess.com
16063<1:option name Threads type spin default 1 min 1 max 4
16063<1:uciok
16266>1:setoption name Ponder value false
16266>1:isready
16844<1:readyok
29157*1*Start calc, move no: 1
29157>1:ucinewgame
29157>1:isready
29188<1:readyok
29313>1:position startpos moves e2e4
29313>1:go wtime 61000 btime 61000 winc 1000 binc 1000
29407<1:info depth 2 score cp -9 time 0 nodes 89 nps 0 pv g8f6 b1c3
29407<1:info depth 3 score cp 33 time 0 nodes 242 nps 0 pv g8f6 b1c3 b8c6
29422<1:info depth 4 score cp -7 time 0 nodes 535 nps 33437 pv g8f6 b1c3 b8c6 g1f3
-
- Posts: 6442
- Joined: Tue Jan 09, 2007 12:31 am
- Location: PA USA
- Full name: Louis Zulli
Re: Glaurung 2 Epsilon/4 not using book
Here's what I get when I run the binary from the command line:
uci
id name Glaurung 2-epsilon/4
id author Tord Romstad
option name Hash type spin default 32 min 4 max 1024
option name Ponder type check default true
option name OwnBook type check default true
option name UCI_ShowCurrLine type check default false
option name UCI_Chess960 type check default false
option name UCI_EngineAbout type string default Glaurung by Tord Romstad, see http://www.glaurungchess.com
option name Threads type spin default 1 min 1 max 4
uciok
setoption name OwnBook value true
isready
readyok
ucinewgame
isready
readyok
position startpos moves e2e4
go wtime 61000 btime 61000 winc 1000 binc 1000
info depth 2
info depth 2 score cp -9 time 1 nodes 89 nps 89000 pv g8f6 b1c3
info depth 3
info depth 3 score cp 33 time 1 nodes 242 nps 242000 pv g8f6 b1c3 b8c6
info depth 4
info depth 4 score cp -7 time 2 nodes 535 nps 267500 pv g8f6 b1c3 b8c6 g1f3
info depth 5
info depth 5 score cp -5 time 3 nodes 1041 nps 347000 pv g8f6 b1c3 b8c6 g1f3 d7d6
info depth 6
info depth 6 score cp -19 time 6 nodes 3013 nps 502166 pv g8f6 b1c3 b8c6 g1f3 d7d6 d2d4
uci
id name Glaurung 2-epsilon/4
id author Tord Romstad
option name Hash type spin default 32 min 4 max 1024
option name Ponder type check default true
option name OwnBook type check default true
option name UCI_ShowCurrLine type check default false
option name UCI_Chess960 type check default false
option name UCI_EngineAbout type string default Glaurung by Tord Romstad, see http://www.glaurungchess.com
option name Threads type spin default 1 min 1 max 4
uciok
setoption name OwnBook value true
isready
readyok
ucinewgame
isready
readyok
position startpos moves e2e4
go wtime 61000 btime 61000 winc 1000 binc 1000
info depth 2
info depth 2 score cp -9 time 1 nodes 89 nps 89000 pv g8f6 b1c3
info depth 3
info depth 3 score cp 33 time 1 nodes 242 nps 242000 pv g8f6 b1c3 b8c6
info depth 4
info depth 4 score cp -7 time 2 nodes 535 nps 267500 pv g8f6 b1c3 b8c6 g1f3
info depth 5
info depth 5 score cp -5 time 3 nodes 1041 nps 347000 pv g8f6 b1c3 b8c6 g1f3 d7d6
info depth 6
info depth 6 score cp -19 time 6 nodes 3013 nps 502166 pv g8f6 b1c3 b8c6 g1f3 d7d6 d2d4
-
- Posts: 1808
- Joined: Wed Mar 08, 2006 9:19 pm
- Location: Oslo, Norway
Re: Glaurung 2 Epsilon/4 not using book
Hello Louis and Tony,
Thanks for the logs! This is extremely strange, especially Louis's log, because he is running Glaurung on a Mac, just like me. Here is what I get when I enter exactly the same commands from the command line:
No problems at all here, as you can see. I'm afraid the problem will be difficult to solve without modifying Glaurung to give some diagnostic output. Louis, since you compile the program yourself: Could you please open the file book.cpp, and change the function Book::open to the following?
What output do you get after recompiling the program and entering the same commands as before?
Tord
Thanks for the logs! This is extremely strange, especially Louis's log, because he is running Glaurung on a Mac, just like me. Here is what I get when I enter exactly the same commands from the command line:
Code: Select all
uci
id name Glaurung 2-epsilon/4
id author Tord Romstad
option name Hash type spin default 32 min 4 max 1024
option name Ponder type check default true
option name OwnBook type check default true
option name UCI_ShowCurrLine type check default false
option name UCI_Chess960 type check default false
option name UCI_EngineAbout type string default Glaurung by Tord Romstad, see http://www.glaurungchess.com
option name Threads type spin default 1 min 1 max 4
uciok
setoption name OwnBook value true
isready
readyok
ucinewgame
isready
readyok
position startpos moves e2e4
go wtime 61000 btime 61000 winc 1000 binc 1000
bestmove c7c6
Code: Select all
void Book::open(const std::string& fileName) {
bookFile = fopen(fileName.c_str(), "rb");
if(bookFile != NULL) {
if(fseek(bookFile, 0, SEEK_END) == -1) {
std::cerr << "Failed to open book file " << fileName << std::endl;
exit(EXIT_FAILURE);
}
bookSize = ftell(bookFile) / 16;
if(bookSize == -1) {
std::cerr << "Failed to open book file " << fileName << std::endl;
exit(EXIT_FAILURE);
}
}
else
std::cout << "Found no file named " << fileName << std::endl;
}
Tord