4

Depending on the GUI, I have noticed some use polyglot files for their opening books and others use .ctg(chess opening tree) for their opening books.

Is there an advantage or disadvantage to either or is it based solely on the programmer's preference with no real advantage or disadvantage?

8

Let's take a look what they are

  • Polyglot is an open source format. It is free to use, free to distribute, the file format is in public domain. You won't land yourself into any potential legal disputes with Polyglot, as long as you follow the GPL license for the source code.
  • CTG file format is owned by Chessbase. It's a closed format, and is not open for you to modify. The file format is proprietary. You might land yourself into possible legal disputes if you try to do something stupid. You --might-- need Chessbase's explicit permission if you want to embed it into your own application. Check with your lawyer.

People use Polyglot because:

  • It's free. The source code is there for everyone.
  • They don't know how to read the Chessbase opening file format
  • Open source chess engines don't use CTG. They generally use Polyglot or nothing. I believe it's illegal to embed a proprietary software (you need code to parse the CTG file) into an open source program.

People use CTG because:

  • It's a more powerful file format than Polyglot. The Polyglot format is really a binary compression of (position, moves, weights). For example, it doesn't have the number of games for each position.
  • Polyglot is designed for computer chess engines, it sits nicely with engine code, but lacks good support for chess GUI. CTG format is designed for both chess engines and chess GUI.
  • CTG is a more popular format than Polyglot. Most opening book makers use the Chessbase software.
  • Polyglot was developed on the UNIX operating system, the source code is much harder to compile on Windows. But most chess book makers use Windows!
  • There's an experimental CTG loader from scidb, and the related Java implementation somewhere else. However, the implementation in scidb is quite difficult to pull out (not abstracted in software engineering terminology). The Java implementation is useless if your application is not written in Java.

If both CTG and Polyglot were open source and free, there wouldn't be any reason for Polyglot to exist. CTG > Polyglot.

| improve this answer | |
  • I knew Chessbase uses .ctg but I never knew it was specific to Chessbase assuming I am understanding you correctly. The only free engine I use is Stockfish and the rest are paid versions but the most of the chess software I use is free Arena, Scid, Scid vs PC so I suppose I have seen more mention of polyglot than .ctg. Reason for asking is I have decided to try to create my own opening book from games from TWIC. Looks like polyglot will have to be what I create since it is in public domain. Thanks! – hangejj Feb 4 '18 at 0:56
  • @Schmoe There will be no problem for creating a book. No problem at all. You'll have only legal issues if you decide to embed software code for reading/loading CTG book. As long as you use Chessbase softwares to do your works, everything will work perfectly. – SmallChess Feb 4 '18 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.