HOME

TheInfoList



OR:

The Smart Game Format (SGF) is a computer
file format A file format is a Computer standard, standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary format, pr ...
used for storing records of
board game Board games are tabletop games that typically use . These pieces are moved or placed on a pre-marked board (playing surface) and often include elements of table, card, role-playing, and miniatures games as well. Many board games feature a ...
s. 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 current version of the format is 4. 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. The tree structure makes the addition of
variation Variation or Variations may refer to: Science and mathematics * Variation (astronomy), any perturbation of the mean motion or orbit of a planet or satellite, particularly of the moon * Genetic variation, the difference in DNA among individual ...
s simple. It is also text-based instead of
binary Binary may refer to: Science and technology Mathematics * Binary number, a representation of numbers using only two digits (0 and 1) * Binary function, a function that takes two arguments * Binary operation, a mathematical operation that ta ...
for the sake of portability. Games stored in SGF format can easily be emailed, posted or processed with text-based tools. Most Internet Go servers and
Go software There is an abundance of go software available to support players of the game of Go. This includes software programs that play Go themselves, programs that can be used to view and/or edit game records and diagrams, programs that allow the user ...
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 In mathematics, Newick tree format (or Newick notation or New Hampshire tree format) is a way of representing graph-theoretical trees with edge lengths using parentheses and commas. It was adopted by James Archie, William H. E. Day, Joseph Fel ...
.


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 ''Ataxx'' (アタックス) is a strategy video game published in arcades by Leland Corporation in 1990. Two players compete on a seven-by-seven square grid. The object of the game is for a player to have a majority of the pieces on the board at ...
,
Backgammon Backgammon is a two-player board game played with counters and dice on tables boards. It is the most widespread Western member of the large family of tables games, whose ancestors date back nearly 5,000 years to the regions of Mesopotamia an ...
, Blokus,
Byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
, Chase,
Chess Chess is a board game for two players, called White and Black, each controlling an army of chess pieces in their color, with the objective to checkmate the opponent's king. It is sometimes called international chess or Western chess to dist ...
, DVONN, Exxit,
Focus Focus, or its plural form foci may refer to: Arts * Focus or Focus Festival, former name of the Adelaide Fringe arts festival in South Australia Film *''Focus'', a 1962 TV film starring James Whitmore * ''Focus'' (2001 film), a 2001 film based ...
, Gess, GIPF, Go, Gobblet,
Gomoku ''Gomoku'', also called ''Five in a Row'', is an abstract strategy board game. It is traditionally played with Go pieces (black and white stones) on a Go board. It is played using a 15×15 board while in the past a 19×19 board was standard. Be ...
+
Renju ''Renju'' (Japanese: 連珠) is a professional variant of gomoku. It was named renju by Japanese journalist Ruikou Kuroiwa (黒岩涙香) on December 6, 1899 in a Japanese newspaper ''Yorozu chouhou'' (萬朝報). The name "renju" comes from t ...
,
Hex Hex or HEX may refer to: Magic * Hex, a curse or supposed real and potentially supernaturally realized malicious wish * Hex sign, a barn decoration originating in Pennsylvania Dutch regions of the United States * Hex work, a Pennsylvania Dutch ...
, Hive,
Hnefatafl Tafl games (pronounced avl also known as hnefatafl games) are a family of ancient Nordic and Celtic strategy board games played on a checkered or latticed gameboard with two armies of uneven numbers. Most probably they are based upon the R ...
,
Jungle A jungle is land covered with dense forest and tangled vegetation, usually in tropical climates. Application of the term has varied greatly during the past recent century. Etymology The word ''jungle'' originates from the Sanskrit word ''ja� ...
,
Kropki Dots ( cz, Židi, pl, Kropki, russian: Точки) is an abstract strategy game, played by two or more people on a sheet of squared paper. The game is somewhat similar to Go, in that the goal is to "capture" enemy dots by surrounding them with ...
, Kuba, Lines of Action,
Neutron The neutron is a subatomic particle, symbol or , which has a neutral (not positive or negative) charge, and a mass slightly greater than that of a proton. Protons and neutrons constitute the nuclei of atoms. Since protons and neutrons behav ...
,
Nine men's morris Nine men's Morris is a strategy board game for two players dating at least to the Roman Empire. The game is also known as nine-man morris, mill, mills, the mill game, merels, merrills, merelles, marelles, morelles, and ninepenny marl in English. ...
, Octi, Philosopher's Football,
Plateau In geology and physical geography, a plateau (; ; ), also called a high plain or a tableland, is an area of a highland consisting of flat terrain that is raised sharply above the surrounding area on at least one side. Often one or more sides ...
, PÜNCT, Quadrature,
Reversi Reversi is a strategy board game for two players, played on an 8×8 uncheckered board. It was invented in 1883. Othello, a variant with a fixed initial setup of the board, was patented in 1971. Basics There are sixty-four identical game pieces ...
(Othello),
Sahara , photo = Sahara real color.jpg , photo_caption = The Sahara taken by Apollo 17 astronauts, 1972 , map = , map_image = , location = , country = , country1 = , ...
,
Shogi , also known as Japanese chess, is a strategy board game for two players. It is one of the most popular board games in Japan and is in the same family of games as Western chess, '' chaturanga, Xiangqi'', Indian chess, and '' janggi''. ''Shōg ...
, TAMSK,
Tantrix ''Tantrix'' is a hexagonal tile-based abstract game invented by Mike McManaway from New Zealand. Each of the 56 different tiles in the set contains three lines, going from one edge of the tile to another. No two lines on a tile have the same ...
,
Trax Trax may refer to: Music * ''Trax'' (album), the debut album from Japanese electronic music group Ravex *TRAX (band), a Korean rock band *Trax Records, first house music label owned by Larry Sherman in Chicago * Trax (sequencer), an old MIDI sequ ...
, Tripples, Tumbling Down,
TwixT TwixT is a two-player strategy board game, an early entrant in the 1960s 3M bookshelf game series. It became one of the most popular and enduring games in the series. It is a connection game where players alternate turns placing pegs and l ...
,
Xiangqi ''Xiangqi'' (; ), also called Chinese chess or elephant chess, is a strategy board game for two players. It is the most popular board game in China. ''Xiangqi'' is in the same family of games as ''shogi'', ''janggi'', Western chess, '' chat ...
, YINSH and ZÈRTZ.


Format Versions

The first version of SGF, FF was conceived by Anders Kierulf in 1987. It is Appendix A in his Ph.D. thesis. FF was written by Martin Müller in 1993. The current version of the SGF is FF by Arno Hollosi, and is supported by most current SGF readers. FF was never made public. The format has been published under the Open Content License. Current development status (2016) is "not active".


Limitations

* Language: Go is most widely played in China, Japan, and Korea, but the SGF format has no way of specifying different translations for text. * Metadata: Only a limited, fixed set of metadata can be present, for example, SGF has rank fields, but no way to represent the ranking system in use.


See also

*
Portable Game Notation Portable Game Notation (PGN) is a standard plain text format for recording chess games (both the moves and related data), which can be read by humans and is also supported by most chess software. History PGN was devised around 1993, by Steven J. ...
– Format for recording chess games * Portable Draughts Notation


References


External links

*
Go Problems


Sensei's Library


SGF Editors

SGF Web Viewers

SGF Tools (file conversion, syntax checker, etc.)

SGF Parsers
{{Go (game) Computer file formats Computer-related introductions in 1987 Go (game) software