Smart Game Format ( SGF )

This page gives information about the SGF implementation and extensions that are used by the [ GoRilla ] editor.

( Text and web page by Dariusz Stachowski. )





SGF Specification

The official specification of the SGF FF[4] standard is located at [ http://www.red-bean.com/sgf/ ]. Please consult this site for more detailed information about the SGF format.

Go,  Othello, Hex,  Kropki

Go, Othello / Reversi, Hex and Kropki have recognised SGF formats. For Hex games, GoRilla accepts ‘[swap-pieces]’ and ‘[swap-sides]’ moves within game files wherever they occur. GoRilla will assume 'GM[1]' ( i.e. Go ) if the SGF GM parameter is not present in a game file. This is consistent with the SGF FF[4] standard. The default size for Go is 19 ( 'SZ[19]' ) and for Hex it is 17 ( 'SZ[17]' ).

For Othello / Reversi and Hex, GoRilla will accepts move placements in either the algebraic or Go format ( i.e. 'B[c4'] or 'B[cd]' ).

Kropki.  For details about the SGF extensions for Kropki visit  [ http://eidokropki.reaktywni.pl/sgf-for-kropki.html ].  GoRilla will use the dot notation inside the SGF parameters W and B to define borders of territory.  For composed positions it will use the dot notation inside the TW and TB parameters to define the composed areas of territory.

Unlur,  Y,  Havannah

Unlur, Y and Havannah currently have no recognised SGF format. In order to represent these games GoRilla uses a modification to the SGF format for Hex. ‘4000’ or ‘Unlur’ are used to indicate an Unlur game, ‘4100’ or ‘Havannah’ to indicate a Havannah game, and ‘4400’ or ‘Y’ to indicate a game of Y ( e.g. ‘GM[4000]’, ‘GM[Unlur]’. )  For Havannah and Y the board size can be specified in rectangular format 'SZ[m:n]'. ‘m’ represents the major size and ‘n’ represents the minor size. This allows for irregular boards to be represented, as used in the games of Projex and Star.

Unlur Players.  The nature of the game of Unlur is that the colours are not set at the start of a game. Initially both players play with the black pieces and the colours are decided only once play has started. GoRilla uses the 'PB' parameter to indicate the player who goes first and 'PW' for the second player, and not to indicate which player gets to play with which colour.

Unlur Passing.  'B[]' is used within an SGF file to indicate that a player has taken the black pieces.

Y, Havannah Swapping.  GoRilla accepts ‘[swap-pieces]’ and ‘[swap-sides]’ moves for Y and Havannah wherever they occur inside a game file.

Connect6

Connect6 currently has no recognised SGF format. To represent games of Connect6 GoRilla has adopted the existing format for Go. The program uses ‘4200’ or ‘Connect6’ to indicate a Connect6 game ( ‘GM[4200]’, ‘GM[Connect6]’ ).

Lower Case Parameter Types

GoRilla will remove any numbers or lower case characters from the SGF parameter types. This will enable files in old SGF versions formats to be read. ( Use of lower case characters was allowed in earlier versions of SGF but is not permitted in SGF-FF[4]. )

SGF Markup

The following SGF markup properties are supported: TR, CR, SQ, MA, LB, TB, TW.  GoRilla will convert the old SGF properties M, L, SL into properties MA, LB, SQ.

XS,  XV,  XP

These are non-standard SGF parameters used by GoRilla. XS[] marks the game in a collection that is to display on initial load of the game file. XV[] marks the node within each game that is to display on initial navigation to that game. GoRilla will use these parameters to open a game file at the exact node and game that was displayed when the game file was saved. This is useful when working with large multi-game, multi-branch game files. XS[] can be used only in the SGF header. XP[] marks the primary position within each game.




[ The Game of Unlur ]   [ The Game of Havannah ]   [ The Game of Onyx ]   [ The Game of Kropki ]

[ The GoRilla Editor ]   [ The Penguin Editor ]