Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Smart Game Format
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|File format for recording board games}} {{about|software for [[Go (game)]]|software written in the Go programming language|Go (programming language)}} {{Infobox file format |name = Smart Game Format |extension = .sgf |developer = Anders Kierulf (1987, FF1), Martin Mueller (1993, FF3), Arno Hollosi (1997, FF4) |type = mark up text |container_for = [[Go (game)]] record |released = 1987 |latest_release_version=4 |latest_release_date=1997 |open = [[Open Content License|yes]] |url= {{URL|https://red-bean.com/sgf/}} }} {{GoBoardGame}} The '''Smart Game Format''' ('''SGF''') is a [[file format]] used for storing records of [[board game]]s. [[Go (game)|Go]] is the game that is most commonly represented in this format and is the [[default (computer science)|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, [[Variation (game tree)|variation]]s). It is a text-only, tree-based format. Most [[Internet Go server]]s 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.<ref>{{cite web|url=https://red-bean.com/sgf/ |title=SGF file format FF[4]|publisher=red-bean.com|date=6 August 2006|access-date=2 June 2023}}</ref> {|class="wikitable" |- |AB |Add Black: locations of Black stones to be placed on the board prior to the first move |- |AW |Add White: locations of White stones to be placed on the board prior to the first move. |- |AN |Annotations: name of the person commenting the game. |- |AP |Application: application that was used to create the SGF file (e.g. CGOban2,...). |- |B |a move by Black at the location specified by the property value. |- |BR |Black Rank: rank of the Black player. |- |BT |Black Team: name of the Black team. |- |C |Comment: a comment. |- |CP |Copyright: copyright information. |- |DT |Date: date of the game. |- |EV |Event: name of the event (e.g. 58th [[Honinbō]] Title Match). |- |FF |File format: version of SGF specification governing this SGF file. |- |GM |Game: type of game represented by this SGF file. A property value of 1 refers to Go. |- |GN |Game Name: name of the game record. |- |HA |Handicap: the number of [[Go handicaps|handicap]] stones given to Black. Placement of the handicap stones are set using the AB property. |- |KM |Komi: [[Komidashi|komi]]. |- |ON |Opening: information about the opening ([[Fuseki]]), rarely used in any file. |- |OT |Overtime: overtime system. |- |PB |Black Name: name of the black player. |- |PC |Place: place where the game was played (e.g.: Tokyo). |- |PL |Player: color of player to start. |- |PW |White Name: name of the white player. |- |RE |Result: result, usually in the format "B+R" (Black wins by resign) or "B+3.5" (black wins by 3.5). |- |RO |Round: round (e.g.: 5th game). |- |RU |Rules: ruleset (e.g.: Japanese). |- |SO |Source: source of the SGF file. |- |SZ |Size: size of the board, non-square boards are supported. |- |TM |Time limit: time limit in seconds. |- |US |User: name of the person who created the SGF file. |- |W |a move by White at the location specified by the property value. |- |WR |White Rank: rank of the White player. |- |WT |White 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.<ref>{{cite web|url=https://red-bean.com/sgf/var.html |title=SGF - Variations|publisher=red-bean.com|date=7 January 1999|access-date=2 June 2023}}</ref> 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<ref>{{cite web | url=https://homepages.cwi.nl/~aeb/go/misc/sgf.html | title=The SGF format }}</ref> are [[Amazons (game)|Amazons]], [[Ataxx]], [[Backgammon]], [[Blokus]],<ref>{{cite web | url=https://github.com/enz/pentobi/blob/master/libpentobi_base/Pentobi-SGF.md | title=Pentobi/Libpentobi_base/Pentobi-SGF.md at main · enz/Pentobi | website=[[GitHub]] }}</ref> [[Byte (board game)|Byte]], [[Chase (board game)|Chase]], [[Chess]], [[DVONN]], [[Exxit]], [[Focus (board game)|Focus]], [[Gess]], [[GIPF (game)|GIPF]], [[Go (game)|Go]], [[Gobblet]], [[Gomoku]]+[[Renju]], [[Hex (board game)|Hex]], [[Hive (game)|Hive]], [[Hnefatafl]], [[Jungle (board game)|Jungle]], [[Kropki]], [[Kuba (board game)|Kuba]], [[Lines of Action]], [[Neutron (game)|Neutron]], [[Nine men's morris]], [[Octi]], [[Philosopher's Football]], Plateau, [[PÜNCT]], [[Quadrature (board game)|Quadrature]], [[Reversi]] (Othello), [[Sahara (board game)|Sahara]], [[Shogi]], [[TAMSK]], [[Tantrix]], [[Trax (game)|Trax]], [[Tripples]], Tumbling Down, [[TwixT]], [[Xiangqi]], [[YINSH]] and [[ZÈRTZ]]. Although not officially supported, the sgf format is also used for [[Meridians (game)|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.<ref>{{cite web|url=https://britgo.org/tech/sgfspec.html |title=Definition of the Smart Game Format|publisher=[[British Go Association]]|access-date=2 June 2023}}</ref> 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.<ref>{{cite web|url=http://homepages.cwi.nl/~aeb/go/misc/sgf.html|title=The SGF Format}}</ref> == 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.<ref>{{cite web|url=https://homepages.cwi.nl/~aeb/go/misc/sgfnotes.html|title=Notes on the SGF format}}</ref> 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 == * [[Portable Game Notation]] – Format for recording chess games * [[Portable Draughts Notation]] ==References== {{reflist}} == External links == * [https://senseis.xmp.net/?SmartGameFormat Sensei's Library SGF page] {{Go (game)}} [[Category:Computer file formats]] [[Category:Computer-related introductions in 1987]] [[Category:Go (game) software]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:About
(
edit
)
Template:Cite web
(
edit
)
Template:GoBoardGame
(
edit
)
Template:Go (game)
(
edit
)
Template:Infobox file format
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)