Smart Game Format

Last updated
Smart Game Format
Filename extension
.sgf
Developed byAnders Kierulf (1987, FF1), Martin Mueller (1993, FF3), Arno Hollosi (1997, FF4)
Initial release1987
Latest release
4
1997
Type of formatmark up text
Container for Go (game) record
Open format? yes
Website red-bean.com/sgf/

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.

Contents

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. [1]

ABAdd Black: locations of Black stones to be placed on the board prior to the first move
AWAdd White: locations of White stones to be placed on the board prior to the first move.
ANAnnotations: name of the person commenting the game.
APApplication: application that was used to create the SGF file (e.g. CGOban2,...).
Ba move by Black at the location specified by the property value.
BRBlack Rank: rank of the Black player.
BTBlack Team: name of the Black team.
CComment: a comment.
CPCopyright: copyright information.
DTDate: date of the game.
EVEvent: name of the event (e.g. 58th Honinbō Title Match).
FFFile format: version of SGF specification governing this SGF file.
GMGame: type of game represented by this SGF file. A property value of 1 refers to Go.
GNGame Name: name of the game record.
HAHandicap: the number of handicap stones given to Black. Placement of the handicap stones are set using the AB property.
KMKomi: komi.
ONOpening: information about the opening (Fuseki), rarely used in any file.
OTOvertime: overtime system.
PBBlack Name: name of the black player.
PCPlace: place where the game was played (e.g.: Tokyo).
PLPlayer: color of player to start.
PWWhite Name: name of the white player.
REResult: result, usually in the format "B+R" (Black wins by resign) or "B+3.5" (black wins by 3.5).
RORound: round (e.g.: 5th game).
RURules: ruleset (e.g.: Japanese).
SOSource: source of the SGF file.
SZSize: size of the board, non-square boards are supported.
TMTime limit: time limit in seconds.
USUser: name of the person who created the SGF file.
Wa move by White at the location specified by the property value.
WRWhite Rank: rank of the White player.
WTWhite Team: name of the White team.

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. [2] 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 [3] are Amazons, Ataxx, Backgammon, Blokus, [4] 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. [5] 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. [6]

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. [7]

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.

See also

Related Research Articles

<span class="mw-page-title-main">Chessboard</span> Any board used in the game chess

A chessboard is a game board used to play chess. It consists of 64 squares, 8 rows by 8 columns, on which the chess pieces are placed. It is square in shape and uses two colours of squares, one light and one dark, in a chequered pattern. During play, the board is oriented such that each player's near-right corner square is a light square.

<span class="mw-page-title-main">Algebraic notation (chess)</span> Method to convey chess moves

Algebraic notation is the standard method for recording and describing the moves in a game of chess. It is based on a system of coordinates to uniquely identify each square on the board. It is now almost universally used by books, magazines, newspapers and software, and is the only form of notation recognized by FIDE, the international chess governing body.

<span class="mw-page-title-main">Bughouse chess</span> Chess variant played on two chessboards by four players in teams of two

Bughouse chess is a popular chess variant played on two chessboards by four players in teams of two. Normal chess rules apply, except that captured pieces on one board are passed on to the teammate on the other board, who then has the option of putting these pieces on their board.

A fairy chess piece, variant chess piece, unorthodox chess piece, or heterodox chess piece is a chess piece not used in conventional chess but incorporated into certain chess variants and some chess problems. Compared to conventional pieces, fairy pieces vary mostly in the way they move, but they may also follow special rules for capturing, promotions, etc. Because of the distributed and uncoordinated nature of unorthodox chess development, the same piece can have different names, and different pieces can have the same name in various contexts as it can be noted in the list of fairy chess pieces.

<span class="mw-page-title-main">TwixT</span> Connection board game in the 3M bookshelf game series

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 links on a pegboard in an attempt to link their opposite sides. While TwixT itself is simple, the game also requires strategy, so young children can play it, but it also appeals to adults. The game has been discontinued except in Germany and Japan.

Portable Game Notation (PGN) is a standard plain text format for recording chess games, which can be read by humans and is also supported by most chess software.

Forsyth–Edwards Notation (FEN) is a standard notation for describing a particular board position of a chess game. The purpose of FEN is to provide all the necessary information to restart a game from a particular position.

Chess notation systems are used to record either the moves made or the position of the pieces in a game of chess. Chess notation is used in chess literature, and by players keeping a record of an ongoing game. The earliest systems of notation used lengthy narratives to describe each move; these gradually evolved into more compact notation systems. Algebraic notation is now the accepted international standard, with several variants. Descriptive chess notation was used in English- and Spanish-language literature until the late 20th century, but is now obsolescent. Portable Game Notation (PGN) is a text file format based on English algebraic notation which can be processed by most chess software. Other notation systems include ICCF numeric notation, used for international correspondence chess, and systems for transmission using Morse code over telegraph or radio. The standard system for recording chess positions is Forsyth–Edwards Notation (FEN).

A Go game record is an archival record for a game of Go.

<span class="mw-page-title-main">Shane's Chess Information Database</span> Software application for viewing and maintaining databases of chess games

Shane's Chess Information Database (Scid) is a free and open source UNIX, Windows, Linux, and Mac application for viewing and maintaining large databases of chess games. It has features comparable to popular commercial chess software. Scid is written in Tcl/Tk and C++.

Portable Draughts Notation (.PDN) is the standard computer-processable format for recording draughts games. This format is derived from Portable Game Notation, which is the standard chess format.

PlayOK, also known as kurnik, is a website of classic board and card games to play online against live opponents in real-time. It was created in 2001 by Marek Futrega, and was initially a Polish-only website. As of early 2005 it supported over 30 board and card games, and the site is available in 33 languages so far.

<span class="mw-page-title-main">3M bookshelf game series</span> Series of board games and card games

The 3M bookshelf game series is a set of strategy and economic games published in the 1960s and early 1970s by 3M Corporation. The games were packaged in leatherette-look large hardback book size boxes in contrast to the prevalent wide, flat game boxes. The series grew to encompass over three dozen games. Most were multi-player board games or card games; a few were trivia games or two-handed board games. Acquire and TwixT were among the best-selling titles. The series later became part of the Avalon Hill Bookcase games. Very few of these games are still being published.

<span class="mw-page-title-main">Go software</span> Software playing the board game Go

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 to search for patterns in the games of strong players and programs that allow users to play against each other over the Internet.

<span class="mw-page-title-main">Zillions of Games</span> General game playing software

Zillions of Games is a commercial general game playing system developed by Jeff Mallett and Mark Lefler in 1998. The game rules are specified with S-expressions, Zillions rule language. It was designed to handle mostly abstract strategy board games or puzzles. After parsing the rules of the game, the system's artificial intelligence can automatically play one or more players. It treats puzzles as solitaire games and its AI can be used to solve them.

A connection game is a type of abstract strategy game in which players attempt to complete a specific type of connection with their pieces. This could involve forming a path between two or more endpoints, completing a closed loop, or connecting all of one's pieces so they are adjacent to each other. Connection games typically have simple rules, but complex strategies. They have minimal components and may be played as board games, computer games, or even paper-and-pencil games.

<span class="mw-page-title-main">Mind Sports Olympiad</span> International multi-disciplined event

The Mind Sports Olympiad (MSO) is an annual international multi-disciplined competition and festival for games of mental skill and mind sports by Mind Sports Organisation. The inaugural event was held in 1997 in London with £100,000 prize fund and was described as possibly the biggest games festival ever held.

This glossary of board games explains commonly used terms in board games, in alphabetical order. For a list of board games, see List of board games; for terms specific to chess, see Glossary of chess; for terms specific to chess problems, see Glossary of chess problems.

Octi is an abstract strategy game designed by Donald Green for 2 or 4 players. The game was first published in 1999 by The Great American Trading Company.

References

  1. "SGF file format FF[4]". red-bean.com. 6 August 2006. Retrieved 2 June 2023.
  2. "SGF - Variations". red-bean.com. 7 January 1999. Retrieved 2 June 2023.
  3. "The SGF format".
  4. "Pentobi/Libpentobi_base/Pentobi-SGF.md at main · enz/Pentobi". GitHub .
  5. "Definition of the Smart Game Format". British Go Association . Retrieved 2 June 2023.
  6. "The SGF Format".
  7. "Notes on the SGF format".