Create opening books by engines

I have known that we can use engines to calculate to create opening books. I have also known about some major disadvantages in this way. Recently I was inspired by some discussions on how good (and bad) some engines when playing openings. I decided to create this tool as a new feature of BanksiaGUI thus we all can try.

At the moment this feature is limited to build opening books for chess variant (not chess960) and Polyglot format only. It will use an engine to evaluate nodes of the opening tree to rank, expand, or trim off them.

There are two methods to build tree and expand branches:

1. Evaluate nodes from the root, wide first, keep and expand only nodes if their scores are from the threshold. If we set the threshold high enough to trim harder, the tree could be deeper

2. Create a full tree to the given depth (it is actually a Perft tree), evaluate all leaves nodes then calculate all internal nodes (via min-max algorithm) and trim off all nodes under the threshold score. Look like this method give better quality (than the first one) for the same depth. However, because of trimming after calculating, it has to calculate too many when the number of nodes grows exponentially by the depth, thus it is suitable only for creating small/shallow trees as well as small books,

This feature is the first implemented and there is still huge room for improvement. Please try and give me your feedback.

5 thoughts on “Create opening books by engines

  1. Hi, can only connect me, a fantastic feature! But it takes a long time to get a result. 4 Plies needs already 12 hours on my Mac. Increasing the plies would increase the time exponentially. Following idea, can’t you use an existing book as a starting point? This would eliminate the many “unnecessary” positions and the book could optimize the advantages of the engine in a new book.

    1. If you stop building the opening book in the middle, BSG stores data into a .tmp file as temporary data thus you may resume later. If it completes processing, it will create the .bin file.
      The process typically is very long, you may consider creating some tiny books (2 or 3 depths, very quick timer) first for trying, then increase numbers later.

Leave a Reply

Your email address will not be published.