Choose your file question

SGF Record Reading: Text, Points, Marks and Board Views

Use the question that matches the problem in your record. Check its actual text, point lists and root properties before changing the board or saving a repaired copy.

Start with coordinates and setup

Use these complete existing guides when the file format or handicap position is unfamiliar.

Comments and file text

Check a known intended comment before changing encodings or raw escapes.

SGF Comments Look Garbled: Check CA and the File Bytes

If an SGF comment looks garbled, check both the CA declaration and the saved bytes. CA tells a reader how to decode text; it does not convert the file. Work from a preserved original and a known intended comment before changing either part.

SGF Comment Escaping: Brackets, Backslashes and Line Breaks

Inside an SGF comment, escape a literal closing bracket as \] and a literal backslash as \\. A backslash before an actual line break removes that break. These rules concern the SGF value, even when the file’s character encoding is already correct.

Points, stones and annotations

Reconstruct complete point sets, then distinguish setup stones from marks.

SGF Point Ranges: Expand Rectangles and Find Duplicate Points

A compressed SGF point value such as aa:cc selects an inclusive rectangle. Expand it before counting stones or marks: that rectangle contains nine points. Overlapping values can repeat a point, and a one-point rectangle must instead be written as a single point.

SGF Triangles, Squares and Labels: Marks Are Not Stones

TR, SQ, CR and MA mark intersections; LB attaches text to a point. None of those properties supplies a black or white stone. Reconstruct the stones first, then overlay the marks, even when a mark appears at an empty intersection.

Board dimensions and visible area

Resolve the actual board size and the active view as separate questions.

SGF Board Size: Default 19, Square SZ and Rectangles

For Go, an omitted SZ defaults to a 19×19 board in FF4. SZ[9] is a square 9×9 board; SZ[9:13] is a rectangle with nine columns and thirteen rows. SZ belongs in the root node, and a square must use the single-number form.

SGF VW Crops the View, Not the Board Position

VW selects which board points are visible; it does not remove the stones outside that view. The selection is inherited by child nodes until a new VW value changes it. An empty VW[] restores visibility to the whole board.

How to use the examples

The six file-check guides include original downloadable SGF examples. Deliberately faulty examples are labeled before the download. Compare the raw properties with the stated text or complete point set; keep your own original record unchanged while troubleshooting.

The full-context diagrams and file checks explain the specified SGF behavior. They do not claim a played game, engine evaluation or an import-and-export test in every viewer. For a teaching position, keep the full board, active view and explanatory annotations distinct.

Return to all board-game practical guides for Go rule exercises, Xiangqi positions and other teaching resources.