user21348: I would like, if possible, for someone to provide a code snippet of a basic logic to access a Polyglot book file. I'm having trouble finding the file format documentation, so I don't know how to access it and use it in the code. I'm making a chess game and would like to use the books to support features in the game. If not too much trouble, I would rather have a c# code sample, since it's the language I'm fluent with right now. 

user825: Sorry, I don't have C# code. Can we do it in C++?

https://github.com/Warpten/Fruit-2.1/blob/master/src/book.cpp

Polyglot book is defined like:
struct entry_t {
   uint64 key;
   uint16 move;
   uint16 count;
   uint16 n;
   uint16 sum;
};

You may want to wrap the C++ code inside your C#. How to do that is out of scope here.

21348: <p>I would like, if possible, for someone to provide a code snippet of a basic logic to access a Polyglot book file. I'm having trouble finding the file format documentation, so I don't know how to access it and use it in the code. I'm making a chess game and would like to use the books to support features in the game. If not too much trouble, I would rather have a c# code sample, since it's the language I'm fluent with right now. </p>
 825: <p>Sorry, I don't have C# code. Can we do it in C++?</p>

<ul>
<li><a href="https://github.com/Warpten/Fruit-2.1/blob/master/src/book.cpp" rel="nofollow noreferrer">https://github.com/Warpten/Fruit-2.1/blob/master/src/book.cpp</a></li>
</ul>

<p>Polyglot book is defined like:</p>

<pre><code>struct entry_t {
   uint64 key;
   uint16 move;
   uint16 count;
   uint16 n;
   uint16 sum;
};
</code></pre>

<p>You may want to wrap the C++ code inside your C#. How to do that is out of scope here.</p>
