UCI OwnBook Option

Discussion of chess software programming and technical issues.

Moderator: Ras

JoAnnP38
Posts: 253
Joined: Mon Aug 26, 2019 4:34 pm
Location: Clearwater, Florida USA
Full name: JoAnn Peeler

UCI OwnBook Option

Post by JoAnnP38 »

Pedantic has its own opening book that can be disabled through what I had thought was a standard option "OwnBook". During the started of the UCI session, the following options are sent to the client:

id name Pedantic v0.0.1
id author JoAnn D. Peeler
option name OwnBook type check default true
option name Ponder type check default true
option name Hash type spin default 64 min 1 max 2047
option name Clear Hash type button
option name MaxThreads type spin default 1 min 1 max 14
option name UCI_EngineAbout type string default Pedantic v0.0.1 by JoAnn D. Peeler, see https://github.com/JoAnnP38/Pedantic
option name Evaluation_ID type string default <empty>
option name Random_Search type check default false

When settings up a tournament in Arena (or cutechess) using an alternate book, they gladly use the specified book, but they never send a setoption command to tell Pedantic not to use its own book. Therefore, when the client has setup the initial game using the specified book, Pedantic continues to probe its own book and if it finds a move it plays it. Is this how the opening book is supposed to work with UCI? In fact, I continue to probe the opening book throughout the game and if a move is found for the current position it plays it. My opening book has many lines that are 16-20 moves long and, in some cases, entire games are in the book. Should the client be telling Pedantic explicitly not to use its own book?
User avatar
Ras
Posts: 2696
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: UCI OwnBook Option

Post by Ras »

Strictly seen, this is a non-compliance with UCI - my engine does this as well. In Arena, you can configure that: Menu, Engines, Manage. In the new window, go to the UCI tab. Under Common Parameter Settings, make sure that the "Common own book setting" checkbox is ticked and the "Engines use their own book" checkbox is not ticked. You should also tick the "Common hashtable size" checkbox and enter the desired setting, usually 256MB.

Then in the "Details" tab for each engine, there is a "Book" tab on the right side. Tick the "Use Arena mainbooks with this engine" checkbox.
Rasmus Althoff
https://www.ct800.net
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: UCI OwnBook Option

Post by hgm »

It is a matter of GUI design. When you ask a GUI to use a book on behalf of an engine, the engine is just never consulted when the GUI is still in book. When the GUI gets out of book, and invokes the engine, it is up to the engine to decide whether to use its own book for the remaining moves, as per UCI option.