Bug in SGF black's first move is 'AB[dd]' (solved, found documentation)

Hi
Not sure if this is a duplicate, but someone posted this game (and asked about weird AI behaviour in lizzie)

The SGF looks strange to me since black’s first move is written as AB[dd]

My guess would be that something went wrong when writing the handicap of 1 since I don’t see that marked

Unless AB is valid as the first black move and it’s lizzie’s problem ^^

Okay, just found the SGF documentation

AB is ‘add black’ which corresponds to an added handicap stone

so that would be Lizzie’s problem then

1 Like

You might find this thread relevant:

This is still also an OGS bug. The far bigger bug (failing to communicate black’s first move to the engine) is all Lizzie’s fault, but unless black did not in fact choose to play that move, OGS is also doing something strange and technically incorrect here.

This is because although using AB for black’s first move does result in a legal SGF, it semantically encodes the wrong meaning.

Using AB instead of B implies that black’s first move was edited or placed on the start of the board as part of the game setup. For example, the way one might set up a tsumego, or for example in middle of the game in an analysis variation it could be used to rearrange some stones on the board to demonstrate a tewari or a tactic that would be possible if only an extra stone were present. So unless in fact the game was set up with that stone already on the board as part of the starting position of the game itself, using AB is inappropriate.

In actuality, it appears to be a no komi game, and I’m assuming black’s first move was played as a move that black chose (just like any other black move in the game).I’m guessing OGS’s bug is that it flags “no komi games” as “handicap 1” and then when the handicap is N, it marks the first N black stones as editing placements (AB) rather than as game moves played by the player (B). This is semantically incorrect for N = 1.

Except… if OGS actually did present black upon game setup with that 4-4 stone already placed, with it being white’s turn, and that stone really is an editing placement rather than a move, then of course ignore what I said. :slight_smile:

4 Likes

I haven’t checked in quite a while, but I remember OGS was using AB and AW for quite a while when you go to download the AI reviews instead of B and W:

https://forums.online-go.com/t/sgf-file-download-with-ai-review/24526/7?u=shinuito

This meant that apps like sabaki wouldn’t pick up those moves as variations and also I feel like when I tried writing a script, even the variations might have been off by a move or something strange.

It might have been fixed, but it also might not :stuck_out_tongue: I’ll check it out later if I remember :slight_smile: