Smart Game Format

1

The Smart Game Format (SGF) is a file format used for storing records of board games. Go is the game that is most commonly represented in this format and is the default. SGF was originally created under a different name by Anders Kierulf for his SmartGO program. The main purposes of SGF are to store records of played games and to provide features for storing annotated and analyzed games (e.g. board markup, variations). It is a text-only, tree-based format. Most Internet Go servers and Go software from 1990 support this format.

About the format

An SGF file is composed of pairs of properties and property values, each of which describes a feature of the game. A partial list of properties appears below. There is no strict checking of the contents of these tags, so it is possible to put any text into the result tag for example. Variations are nested in brackets, and also usually assigned letters. The first branch (variation A) is the main branch. This notation stems from Newick format.

Coordinate system for points and moves

The first letter designates the column (left to right), the second the row (top to bottom). The upper left part of the board is used for smaller boards, e.g. letters "a"-"m" for 13*13. The author intentionally broke with the tradition of labeling moves (and points) with letters "A"-"T" (excluding "i") and numbers 1-19. Two lower-case letters in the range "a"-"s" were used instead, for reasons of simplicity and compactness. The upper left corner as origin of the board corresponds to the way most modern computers represent screen coordinates to simplify integration of text and graphics.

Supported games

Games currently supported are Amazons, Ataxx, Backgammon, Blokus, Byte, Chase, Chess, DVONN, Exxit, Focus, Gess, GIPF, Go, Gobblet, Gomoku+Renju, Hex, Hive, Hnefatafl, Jungle, Kropki, Kuba, Lines of Action, Neutron, Nine men's morris, Octi, Philosopher's Football, Plateau, PÜNCT, Quadrature, Reversi (Othello), Sahara, Shogi, TAMSK, Tantrix, Trax, Tripples, Tumbling Down, TwixT, Xiangqi, YINSH and ZÈRTZ. Although not officially supported, the sgf format is also used for Meridians. The standard specifies additional game-specific properties for Go, Backgammon, Lines of Action, Hex, Amazons, Octi, Gess, and TwixT.

Format Versions

The first version of SGF, FF[1], was conceived by Anders Kierulf in 1987. It is Appendix A in his Ph.D. thesis. FF[3] was written by Martin Müller in 1993. The current version of the SGF is FF[4] by Arno Hollosi, and is supported by most current SGF readers. FF[2] was never made public. The format has been published under the Open Content License. Current development status (2016) is "not active". FF[4] is outdated, but has not been replaced by something more recent. For a description of current usage and some recommendations, see.

Limitations

The FF[4] standard has some problems that make it impossible, or at least unreasonable, to adopt it for large game collections. For some discussion, see. The fact that there is no standard designation for many properties that one might wish to represent is not really a limitation. The system is extensible, one can invent new labels, and of course that has happened already. After a while, the popular ones among the new labels become standard.

This article is derived from Wikipedia and licensed under CC BY-SA 4.0. View the original article.

Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc.
Bliptext is not affiliated with or endorsed by Wikipedia or the Wikimedia Foundation.

Edit article