HOME XML-SCHEMA XML-EXAMPLES CHESS VARIANTS FBR MBN ANCP FAQ RESOURCES ABOUT

C/CIF Introduction


C/CIF (Compact/ Chess Interchange Format) is an interchange format for chess archives. This format is supporting all features of a chess application, and is designed for the transfer of chess archives without any loss via an application independent format.

The well known format PGN (Portable Game Notation) is especially developed for computer programs and does in general not provide the capability for lossless chess data transfer.

C/CIF has the following features:

  • CCIF is producing quite compact archives, is easy to use, and fits to the requirements of modern chess databases. This includes the transfer of documents, images, multimedia, and other binary formats inside a chess archive.

  • Moreover C/CIF provides an XML format (CIF) which can be parsed with any XML parser. This text format does not have the compactness of CCIF, but is human-readable, and can be the appropriate format for smaller archives.

  • Viewer for C/CIF archives must not implement complex chess logic (a Bitboard or something equivalent), because the move data section is decoded in CAN (Computer Algebraic Notation).

  • A C/CIF library will be provided (currently only C++), which offers a comfortable interface for reading, writing, and modifying C/CIF archives. This means that a developer of a chess application must not write his own basic C/CIF code.

  • The binary format CCIF has exactly the same structure as the text format CIF, so the conversion is a simple mapping. And C/CIF will provide a tool for the conversion between the XML format CIF and the binary format CCIF.

  • C/CIF supports many chess variants, even fairy chess, oriental forms of chess, Multi-board Chess, 3D Chess, 4D Chess, Hexagonal Chess, all board sizes (the maximum is 64x64), (nearly) all board shapes, all piece sets (limited to maximal 4096 different pieces), provided that it can be described with FMR and MBN. Currently about 300 chess variants are predefined (see Chess Variants). The formal description of chess variants is also the basis for a PGN converter, such a converter will be provided later.

  • Any C/CIF archive contains a section which provides detailed information about the content of the archive.

  • This archive format is especially supporting cloud databases.

Although the XML schema looks a bit complex it is in fact a quite simple format, contrary to the PGN format (the parser for PGN in application Scidb has about 8000 lines of code). Moreover C/CIF is providing a comfortable library for reading, writing, and modifying archives. And additionaly a minimal libary for the support of the PGN essentials will be provided, especially useful for applications like chess engines.

In general only the binary format will be supported by chess applications, the additional text format is intended for special purposes. For example the chess database Scidb will use the text format for the backup of single games, in this case a human readable format is very useful.

In general a C/CIF archive may contain games with any chess variant, but in practice it is recommended to restrict one archive to one specific variant, or to a group of similar variants.

The documentation of the C/CIF schema will be found here: CIF schema. The binary format is exactly the same (that's why XML is used), and the mapping between the text format and the binary format will be described later.

The C/CIF library in C++ is already in development, but not yet available.

File extension ".cif" is designated to CIF (XML format), and file extension ".ccif" is designated to CCIF (binary format).

Credits

Many thanks to Trevor Davis, his ideas and suggestions are the decisive basis for the support of multi-board chess, 3D chess, 4D chess, and hexagonal chess. I didn't believe before that C/CIF can support such kind of variants. Also many thanks for proof-reading some documents.



Google translation

Share this page

C/CIF at Sourceforge

C/CIF at Sourceforge

C/CIF at Launchpad

C/CIF at Launchpad