When I save a 2-stone handicap game with qGo 2.0.0 using GNU Go 3.9.1 as engine and then open it with the same software, the handicap stones are missing. This is quite annoying, as one has to imagine the missing stones and the scoring function will count them as territory or dame or treat the position as unsettled.

I can add them to the SGF file by hand, in which case they appear as unnumbered stones when I click the button for the first move, followed by white’s first move numbered 1.

It is evident that either the save or the load function is incorrect, and I suspect that it is the former, as handicap stones need not be on hoshi.

  • Does the file format prescribe how handicap stones should be saved?
    • If so, does qGo+GNU Go do it right?
  • Is this function performed by qGo or GNU Go?
  • Is the manual addition of the stones the best workaround?

Here is an example of an SGF-file saved and edited, with the handicap stones added by hand (AB[pd][dp] at the end of the second line):


  • An annoying bug, and good analysis in the answer. But this does not pertain to Go as a game, only to a specific implementation, and thus is not a core topic on this site. How about posting this on their issue tracker instead? It seems to be located at sourceforge.net/p/qgo/bugs
    – mafu
    Feb 25 '18 at 7:14
  • @mafu: I wondered whether it was on-topic, but was unsure; it seemed to me that it could be useful for anyone wanting to play Go. The site tour did not clear it up for me. I see this as a practical question about coping with unreliable equipment, like “How can I deal with the tendency of my much used Flingle set to reveal the Bloppers?”. The reason given (computer-based games) does not seem to hold up, because it goes on to say “except for computer-based versions of board or card games”. I suppose I ought indeed to report it, though I also thought it could not be too hard for me to fix.
    – PJTraill
    Feb 26 '18 at 12:31
  • It is definitely useful research you did. It felt too technically advanced to me (and others, it seems) even for a "computer-based version of a board game", more like what I would expect from SO. But the question can be reopened if most people like the question - I have no strong opinion on this issue.
    – mafu
    Feb 27 '18 at 9:12
  • @PJTraill Though the question is related to Go, the issue itself is just about a specific bug in a specific program. If you look at the other computers tagged questions you can see that they are usually pretty general. That said, this is a good question and a good answer. If you would like to propose a change to what is on and off topic you are welcome to make a meta post.
    – Malco
    Feb 27 '18 at 14:59
  • @Malco: At the moment I do feel that questions about the practicalities of using computers where they are really just another bit of equipment one wants to get the best out of in order to play the game one enjoys should be on topic, so I hope to find time to formulate this in a metaquestion.
    – PJTraill
    Mar 1 '18 at 0:00


The specification shows that the file is wrongly saved and can be corrected by adding the AB property. The game seems to be saved by qGo.


How to do it correctly

We can find the specification from Sensei’s Library SGF, which refers us to [SGF on Red Bean]http://www.red-bean.com/sgf/; there the specific properties for Go link to https://www.red-bean.com/sgf/go.html. There we see:

Property:   HA
Propvalue:  number
Propertytype:   game-info
Function:   Defines the number of handicap stones (>=2).
        If there is a handicap, the position should be set up with
        AB within the same node.
        HA itself doesn't add any stones to the board, nor does
        it imply any particular way of placing the handicap stones.
Related:    KM, RE, RU

So we conclude that the standard does specify how to set up handicap stones and that qGo (or GNU Go) does it wrong. Moreover, adding the AB property by hand is correct, as it yields the file as it should have been saved.

For n conventionally placed handicap stones, copy the line above n up to and including the “]” above the n from:

         2   3   4   5
                         6   7
                                 8   9

Which code is in error

We can start GNU Go with a command-line interface with gnugo -level 20 (for example, and see in the help text that save file saves the game. Testing this, I see that the saved game (with two moves) includes the AB property:

GN[GNU Go 3.9.1 Random Seed 1519478141 level 20]
KM[0.0]HA[2]RU[Japanese]AP[GNU Go:3.9.1]AB[pd][dp]

I conclude that qGo implements its own save function and does it wrong; perhaps it implements this in order to include the player names (PW & PB), territory (TW & TB) and something called style (ST[1]) which is described at https://www.red-bean.com/sgf/properties.html#ST:

Property:   ST
Propvalue:  number (range: 0-3)
Propertytype:   root
Function:   Defines how variations should be shown (this is needed to
        synchronize the comments with the variations). If ST is omitted
        viewers should offer the possibility to change the mode online.
        Basically most programs show variations in two ways:
        as markup on the board (if the variation contains a move)
        and/or as a list (in a separate window).
        The style number consists two options.
        1) show variations of successor node (children) (value: 0)
           show variations of current node   (siblings) (value: 1)
           affects markup & list
        2) do board markup         (value: 0)
           no (auto-) board markup (value: 2)
           affects markup only.
           Using no board markup could be used in problem collections
           or if variations are marked by subsequent properties.
           Viewers should take care, that the automatic variation
           board markup DOESN'T overwrite any markup of other
        The  final number is calculated by adding the values of each
        option. Example: 3 = no board markup/variations of current node
                 1 = board markup/variations of current node
        Default value: 0
Related:    C, FF, GM, SZ, AP, CA

Not the answer you're looking for? Browse other questions tagged or ask your own question.