Smart Game Format ( SGF )
This page gives
information about the SGF implementation and extensions
that are used by
the GoRilla editor.
specification of the SGF FF standard is located at [ http://www.red-bean.com/sgf/
]. Please consult this site for more detailed information about the SGF
Go, Othello, Hex, Kropki,
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' ( i.e. Go ) if the SGF GM parameter is not present in a game
file. This is consistent with the SGF FF standard. The
default size for
Go is 19 ( 'SZ' ) and for Hex it is 17 ( 'SZ' ).
Othello / Reversi and Hex, GoRilla will accept move placements in
either the algebraic or Go format ( i.e. 'B[c4'] or 'B[cd]' ).
Games of Pente will be identified using 'GMRU[Pente]'.
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
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. GoRilla will accept the SGF SZ
parameter in two formats, numeric or character. Thus,
or 'SZ[NG]' will indicate a 39x32 size board, 'SZ[N]' or
'SZ' will indicate a 39x39 board. GoRilla
supports board sizes up to 45x45.
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 (
e.g. ‘GM’, ‘GM[Unlur]’. ) For Unlur the SGF SZ
parameter represents the size of the playing board at its maximum
width. SZ must be an odd number for Unlur. For
Havannah SZ represents the length of the board sides.
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.
'B' is used within an SGF file to indicate that a player
has taken the black pieces.
GoRilla accepts ‘[swap-pieces]’ and ‘[swap-sides]’ moves
for Havannah wherever they occur inside a game file.
Lower Case Parameter Types
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
markup properties are supported: TR, CR, SQ, MA, LB, TB, TW. GoRilla
the old SGF properties
M, L, SL into properties MA, LB, SQ.
XS, XV, XP, XB, XN
non-standard SGF parameters used by GoRilla.
game in a collection that is to display on initial load of the game
file. XS can be
used only in the SGF header.
- XV marks the node within each game that is to
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
- XP marks the primary position within
- XB is used to store bookmarks. (
'XB', 'XB' ). The numeric value defines the order in
which the bookmark appears in the list. Null value bookmarks
( 'XB' ) will be placed at the head of the list and will be given a
is used to store the quick-navigation positions.