user14760: 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?

user825: 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.

14760: <p>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.</p>

<p>Is there an advantage or disadvantage to either or is it based solely on the programmer's preference with no real advantage or disadvantage?</p>
 825: <p><strong>Let's take a look what they are</strong></p>

<ul>
<li>Polyglot is an open source format. It is free to use, free to distribute, the file format is in <strong>public domain</strong>. You won't land yourself into any potential legal disputes with Polyglot, as long as you follow the GPL license for the source code.</li>
<li>CTG file format is owned by Chessbase. It's a closed format, and is not open for you to modify. The file format is <strong>proprietary</strong>. 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.</li>
</ul>

<p>People use Polyglot because:</p>

<ul>
<li>It's free. The source code is there for everyone.</li>
<li>They don't know how to read the Chessbase opening file format</li>
<li>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.</li>
</ul>

<p>People use CTG because:</p>

<ul>
<li>It's a more powerful file format than Polyglot. The Polyglot format is really a binary compression of (position, moves, weights). For example, it <strong>doesn't</strong> have the number of games for each position.</li>
<li>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.</li>
<li>CTG is a more popular format than Polyglot. Most opening book makers use the Chessbase software.</li>
<li>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!</li>
<li>There's an experimental CTG loader from <a href="http://scidb.sourceforge.net/" rel="noreferrer">scidb</a>, 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.</li>
</ul>

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