nguyenpham / oobs

Open Opening Book Standard (OOBS)
MIT License
7 stars 0 forks source link

convert obs.db3 book to bin and pgn #6

Open Jonathan003 opened 2 years ago

Jonathan003 commented 2 years ago

Is it possible to convert obs.db3 books to bin and to pgn format?

nguyenpham commented 2 years ago

Yes, possible and we plan a long time for that feature. However, it is not available right now.

nguyenpham commented 2 years ago

Done!

https://github.com/nguyenpham/oobs/releases/tag/beta3

Jonathan003 commented 2 years ago

Converting to bin works! If I try to convert to pgn it doesn't work. This is the commend I used oobs -export -in Carlsen_white.obs.db3 -out Carlsen_white_out.pgn -o win=3,draw=1,noresult=win -plytake 20 -cpu 4

oobs keeps hanging and noting happens even after 10 minutes for a small book. export book to pgn

The size of the pgn file Carlsen_white_out is 0 kb. When I finally close oobs the file Carlsen_white_out.pgn is 70 mb. I didn't get a confirmation that the conversion was finished so I don't know if it is complete? Maybe I just have to wait longer? It's a small book so it's verry slow to convert to pgn. Converting to bin was fast.

nguyenpham commented 2 years ago

Creating PGN, EPD books is typically slow, takes a lot of time since the program has to follow all tree-branches to the requested depth. There are too many of them. You may speed up by using lower depth, by setting -plytake to a smaller number, say 5. Then you may increase it to the value you can wait.

On the other hand, Polyglot and OOBS books are quite close to our opening tree, we can save data to those books in much simpler and faster way.

Jonathan003 commented 2 years ago

Maybe because of the many possible unplayed transpositions? Wouldn't it be possible to ignore unplayed transpositions? To make a book just with the exact lines that are in games of the pgn file where the book was created from? I know this doesn't make sense if you want to make a book to use with an engine. But I'm looking to use it for creating repertoires for human games. How long wil it take to completely convert the book to pgn you think? The book is created from about 5500 games of Magnus Carsen where he plays white. And the book was created with the default settings.