[SGF FF[4] - Smart Game Format]

Hex (GM[11])

Implementation of SGF FF[4] for Hex

For more information about Hex, implementation of SGF FF[4] for Hex and sample code see this page or email David King.

All (game-specific) property values are case insensitive.

The default board size is 11 x 11. The minimum size for a row or a column is 3, and the maximum 26. If a board is asymmetric, the SZ[] property should specify [number_of_columns : number_of_rows] in line with the SGF FF[4] specification.

Black tries to connect the top and bottom of the board; White tries to connect the left and right sides.

The default first player is Black.

Point and Move types


[ board ]
Cells on the board are labeled with letters for the columns and numbers for the rows, as shown. A cell is identified by the letter of its column, followed by the number of its row. Examples: [a1], [G5], [D11], [j10].


Normal moves specify the cell, as defined by point type above. Moves should be legal; there is no defined behaviour upon reading an illegal move, except to display an error message.

Example normal moves: B[e4], W[F9].

The following moves are special:

Both swap methods are equivalent in play terms. A swap move may occur at any node, although normally it is restricted to the second move. The rules agreed for a game may be defined using the RU[] property.

Example special moves: B[resign], W[swap-pieces], B[forfeit].


Property:	IS
Propvalue:	list of composed SimpleText ':' SimpleText
Propertytype:	root
Function:	This property allows applications to store and read
		an initial viewer setting. The property value is a list of
		"keyword followed by ':' followed by either 'on' or 'off'".
		Valid keywords are:
		  'tried' - identify future moves that have been tried?
		  'marked' - show good/bad move markings?
		  'lastmove' - identify the last cell played?
		  'headings' - display column/row headings (a b.., 1 2..)?
		  'lock' - lock the game against new moves (for analysis)?
		This property is allowed in the root node only.
		Example: IS[tried:on][lock:off][marked:off]

Property:	IP
Propvalue:	SimpleText
Propertytype:	game-info
Function:	Designates the initial position that the viewer
		should display. It will most frequently indicate the
		current position of play in the game. This is necessary 
		because future possible moves may have been explored,
		and the user must be able to distinguish real moves
		actually made from exploratory moves. More than one IP[]
		property in a game is illegal, and the behaviour undefined.
		The property value should be empty (""); it is specified
		as SimpleText for compatibility.