ikkentobi: That's great :D Now if only Fencer would provide a link to download SGF notation, just like he has for PGN for chess games, then we'd be set!
ikkentobi: It doesn't work for me. Each time I copy and paste the moves, it shows an error message that something is wrong with the move list. Anyway, I just wanted to use it to generate a sample SGF file because I didn't fully understand the format description. Can you provide a sample game please?
Fencer: I wrote a script to transform the move list into an SGF file. It needs a few twists, but as I don't use it often, I haven't twisted it. You can see the PHP source or use it to convert any public game to SGF by going to http://hexkid.info/BK/ParseGame.php?g=##### where ##### is the game number.
I've also integrated this functionality into BrainKing itself with the help of a Greasemonkey script, accessible at the user scripting fellowship :)
Fencer: Thanx for putting the SGF link. Its a good start but up to now it seems that the code doesn't take care of the changing coordinates directions at BK. So some games are ok, others are mirrored or rotated (actually I don't know why BK does this swapping of coordinate directions). Like it is now you cannot simply bind the SGF to the coordinates in BK.
Another wish: it would be great to include the players names in the SGF file name.
ikkentobi: Mmmm, I don't fully understand what you mean about the coordinates. Please give me an example of a game which generates wrong SGF file and why. Player names are included. PB and PW tags.
Fencer: Here ya go: Game 1: Go (Ceiter vs. ikkentobi) - on my screen this game has A1 in the upper right corner. The resulting BK-SGF is vertically mirrored.
Game 2: Go (ikkentobi vs. stiveletti) - This is an iteresting example. First of all this one throughs an error "Invalid board location "pass" on line 134". Pass should be an empty node like ;B[] or a tt like ;B[tt]. Back to the coordinates. In this game A1 is on my screen at the lower left corner which is right. But the resulting BK-SGF is horizontal mirrored.
FYI: All SGF-editors that I know have A1 at the lower left corner! The SGF notation has [aa] at the upper left corner (see http://www.red-bean.com/sgf/go.html)
That means a black move shown by a SGF-editor at A1 should be written ;B[as]
Fencer: I think there are two different issues here.
The first is that the board orientation is different based on being black or white. For most games on this site (chess, checkers, backgammon, etc), board orientation is of prime importance, but for games like go, it is mostly irrelevant to the game. Most SGF viewers have 1A on the lower left-hand corner. This would account for the rotating that ikkentobi is seeing. Personally, I really don't mind, and I don't see this as a problem.
The second is slightly goofy. This site has a very good run-down of the SGF file format: http://www.red-bean.com/sgf/
In particular, this page: http://www.red-bean.com/sgf/go.html
has listed the directionality of the axes slightly different. "aa" is displayed as the upper-left corner of the board (even though that corresponds to 13a or 19a or 9a, depending on the board size) and then continues across and down. So in essence, the vertical number column is inverted, with regards to how it's displayed (a=19, b=18, ..., s=1). This discrepancy would account for the mirroring that ikkentobi is seeing. Again, this isn't *that* big of an issue, but it is inconsistent with the SGF spec.
I also have a wishlist pertaining to the end of the game :)
When the final + move is made and the game is over, the SGF file can have some added tokens to properly show the score. These tokens TW and TB are used to indicate white's and black's (respectively) territory. This also automatically marks dead stones, so nothing extra is needed for that. The syntax is (as poorly described on http://www.red-bean.com/sgf/go.html): TW[point1][point2][point3]...[point4] and doesn't include the player's own played stones. For example, in this game: Go 9x9 (JB007 vs. tenuki) The output would be: TW[aa][ba][ca][bb][cb][ac][bc][ad][af][bf][ag][bg][ah][bh][ai][bi][ci][di] TB[fa][ga][ha][ia][fb][gb][hb][ib][fc][gc][hc][ic][hd][id][he][ie][hf][if][ig]
(do skréše) Chce se tě zrovna valet rechlé špil, keré zaročeně skonči v pruběho dvó hodin? Vetvoř nabidko ke špilo a zadé tam Čas na špil: 0 dni 1 hodina, Extrovnica: 0 dni 0 hodin, Limit: 0 dni 1 hodina. (TeamBundy) (okázat šecke vechetávke)