CTG

From Chessprogramming wiki
Jump to: navigation, search

Home * Knowledge * Opening Book * CTG

CTG, (ChessBase Opening Tree of Games)
an opening book format by ChessBase, supported by their Fritz GUI and ChessBase GUI, and therefore used by all chess engines compatible with these commercial user interfaces. While the book format is proprietary, a partial specification was leaked for the purpose of interoperability [1]. Each Chessbase book consists of four files, the binary CTG file contains the real data, the INI text file provides auxilliary information, the CTB file some kind of bitmap over free pages in the CTG file, and the CTO file, containing a lookup table into the CTG file for fast indexed access. Only White to move positions along with its moves, annotations and engine recommendations, and statistics are stored, probing black positions requires color flipping, of course including en passant square and castling rigths. Further, if the white king is on files a-d, and neither side has any castling rights remaining, the board is mirrored horizontally. The CTG file is organized in 4KiB pages, the first page contains header information such as the number of games, followed by consecutive data pages. Each data page starts with an header specifying the number of positions and bytes per page, followed by a list of a variable length position entries.

See also

Open Source Engines

Forum Posts

External Links

References

  1. CTG specification by Sesse, Rybka Forum, September 30, 2007
  2. CTG to polyglot format by matematiko, Winboard Forum, October 23, 2013

Up one Level