Polyglot book dumping

Discussion of chess software programming and technical issues.

Moderator: Ras

Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Polyglot book dumping

Post by Michel »

I decided to release my book dumping utilities. I had planned to do some more cleaning up but I don't seem to find the time to do so. They seem to work well enough for what they are intended.

As usual they are here.

http://alpha.uhasselt.be/Research/Algeb ... t-release/

The Windows binary is called polyglot_dev.exe (not polyglot.exe which is an old "stable" version)

Here is the "readme" file which explains what these utilities do (and don't!)

http://alpha.uhasselt.be/Research/Algeb ... anpage.txt

Here are some examples

Code: Select all

polyglot-1.4w10UCIb18$ ./polyglot.exe info-book -bin TDDBII.bin
PolyGlot 1.4W10UCIb18 by Fabien Letouzey
Lines for white                :    54436
Lines for black                :    76784
Positions on lines for white   :   197506
Positions on lines for black   :   359851
Isolated positions             :   381499

Code: Select all

./polyglot.exe dump-book -bin TDDBII.bin -color white -out TDDBII_white.txt
The result is here

http://alpha.uhasselt.be/Research/Algeb ... _white.txt

Similarly

Code: Select all

./polyglot.exe dump-book -bin TDDBII.bin -color black -out TDDBII_black.txt
yields


http://alpha.uhasselt.be/Research/Algeb ... _black.txt
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: Polyglot book dumping

Post by Michel »

I deleted a few fprintf's too many!

I have posted a new version and have updated the output.
Marc Lacrosse
Posts: 511
Joined: Wed Mar 08, 2006 10:05 pm

Re: Polyglot book dumping

Post by Marc Lacrosse »

Michel wrote:I decided to release my book dumping utilities.
Very nice!
Thanks a lot.

... any other polyglot utility in the pipe ? :-)

Marc
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: Polyglot book dumping

Post by Michel »

... any other polyglot utility in the pipe ?
Well for the utility you are asking for is not an atomic one. So it is a question of finding the most elegant tool chain that accomplishes the requested task.

As I see it now the following should be done.

(1) A python script that filters out "contradictions" in an epd file (multiple bm's for the same position, a bm and am for the same move, etc...). This step is generic and
has nothing to do with PG. The advantage of having a python script is that it is
easier to modify.

(2) An extension of "polyglot make-book" that turns an epd file into a book with uniform probabilities (multiple bm fields for the same move can be filtered out by the aforementioned python script, if requested).

Since you want to keep am fields I need to specify a bit in the entry format indicating that the move is an am. One elegant possibility would be to use the sixteenth bit of the move field. Another possibility is to hijack one of the 32 unused learning bits.

(3) A slight adaptation to "polyglot merge-book" that takes into account am moves.

Regards,
Michel