Defect in SGF generation from games on OGS

I have noticed that the SGFs from games created on OGS seem to put every move in a new branch. Following is a slight edited example to showcase the issue:

(;FF[4]
DT[2022-09-27]
PC[OGS: https://online-go.com/game/47401496]
;B[qd]
(;W[dd]
(;B[pq]
(;W[dp]

Because this is a normal sequence of play, unbranching, this should be

(;FF[4]
DT[2022-09-27]
PC[OGS: https://online-go.com/game/47401496]
;B[qd]
;W[dd]
;B[pq]
;W[dp]

All these nodes are part of a single sequence. It is likely due to a misunderstanding of the EBNF Definition of the SGF format – the Sequence is a required first part of a Gametree.

For a simple SGF-encoded tree with diagrams to help, see the SGF basics.

I suspect that fixing this issue may also go towards fixing the problem that OGS has with properties like AW and AB which should add a bunch of stones to the same node without creating new nodes.

1 Like

This problem is documented here. It actually has to do with the fact that two different SGF converters are in use, and one of them just wraps everything in parentheses (I’m guessing to make a recursive process easier to reason about). There has been some discussion about how to fix it, though I’m not sure if there’s been any progress.

3 Likes