SGF at SL Discussion

    Keywords: SL description

Discussion about SGF for diagrams and possible SGF upload feature.

Moved here from GuineaPigsFeedback.

One idea might be to allow the inclusion of the problematic java applet in pages. if a page source includes an SGF record, your parsing engine would embed the applet and pass the SGF to it. this is really quite easy to do, and i can help you if you wish. obviously, diagrams are better than an applet in most cases, but it might be an idea to start off a section with a sample problem.
-- adum

What about hyperlinking the diagram images to an sgf file? This would be great for all of the examples that say "try it out for yourself". It could be easily done with the AW and AB tokens of sgf.

-- SifuEric

That could indeed be a good idea for users who want to try out in an SGF editor. Like you say, just putting the position (and static markup) into an SGF file is easy. Putting a sequence of moves (1-10) into the file is also possible. I will have a look at it. Does anyone else have any thoughts on this? -- MortenPahle

TakeNGive: I think most browsers can be configured to invoke your favorite .sgf editor ([ext] Jansteen's SGF - WWW suggestion), or maybe to call something like the Good Shape applet generator (at, or something like the one at Go Problems . com. It might be a good idea -- sometimes it's a pain to "edit" then "cancel edit" the wiki page just to copy-n-paste the diagram to WinMGT; and the limitation to ten numbered stones is sometimes frustrating. So, it might often be nice to link to the .sgf file (which would be on our own web- or ftp-space, i assume? doesn't want us all uploading weirdly named .sgf files, do you?). But, this is another level of complexity and technical expertise, kind of getting away from the poetic simplicity that is Wiki. And, if the .sgf files i contribute are hosted on my webspace, how are the rest of you folks going to edit them? It's a nice option, maybe, but i'm not sure. What do others think?

ArnoHollosi: we will add SGF files of the diagrams themselves Really Soon (TM) (which will solve the copy-n-paste issue). I'm not in favour of allowing arbitrary SGF files (not connected to diagrams) - this would deter from the discussion on the pages - I'd like to keep wiki as simple as possible. But far more important: you can bet that these SGF files would be constantly broken. As maintainer of the GTL I see every day how buggy SGF editors are, especially if they are dealing with variations.

As for the 10 move limit in diagrams: it has its benefits as well. Diagrams remain readable. It's exhausting to read a diagram with 50 moves in it, no? What do others think about that issue?

DieterVerhofstadt: Not only that, Arno, but you'll have to introduce special characters to stretch beyond 10. Again this goes against the idea of keeping it as simple and intuitive as possible. The 10-limit has only drawbacks for the contributor, who is forced to make it more readable to the readers. Not really a drawback.

TakeNGive (11k): How about putting a .sgf validator on the GTL and SL sites? A webpage with a form where we "paste" the game file, and when we press "submit", the validator reads the file, and outputs a page with any illegal or deprecated code flagged (and maybe a brief explanation of what's wrong).

There is an SGF validator at [ext] - SGFC is the "official" SGF syntax checker. But I don't think that it would make things any better. Although SGFC can fix many errors on its own, you have to have knowledge of SGF to understand what you are doing. And I don't think that people have that kind of knowledge. Also, let me repeat this, I don't think that allowing posting of SGf files would benefit this site. It would split up the discussion between SGf files and the text on the page. I don't think that this is a good idea. If you like to provide gamerecords as SGF just put them on your site and link them from here. --ArnoHollosi

I just noticed that the sgf's of the diagrams has been implemented. This is a nice feature and really helps with analysis. Well done! Note however, the generated files seem to have a bug in translating letters in diagrams. The letter 'a' seems to be replaced by another letter. --DaveSigaty

Thanks for the validator link, Arno. I agree that posting SGF files here would probably be contrary to Wiki simplicity. -- TakeNGive

About letters in SL-generated SGF: it is not a bug in the SGF file, but in MGT. For example if you have two letters 'a' and 'b' it will be coded as "LB[lb:b][pa:a]". MGT interprets this as "LB[lb][pa]", (letters following ":" are ignored, they are assigned automatically in alphabetical order). It could be fixed in most cases by keeping the alphabetical order of letters (unless the first letter is not 'a'). [1] Another suggestion: it would be nice to add PL[W] or PL[B] to the setup according to the first player. --jvt

I think you can turn off the automatic letter assignments in WinMGT. I'm pretty sure that it is a checkbox in the "options" or "preferences" dialogue box. --TakeNGive

AOK now. Thanks, Morten. :-)

-- Bill Spight

As a newbie, I appreciate the SGF linked to the diagrams. However, I found a couple of pages where the SGF has the wrong side to play the first move. For example, LocalKoThreat. I tried to edit the diagram there so that it would be White's move, but when the SGF comes up in gGo it's still Black's turn, as before my edit. Could it be that the SGF files are generated at later times based on the diagrams? Or am I doing something wrong? Thanks for your advice.

-- RoyZR

David: The SGF file associated with a diagram isn't updated unless something in the diagram itself changes. A workaround is to change something in the diagram, save the page, then change it back. See this comment.

RoyZR: Hmmm... I tried and it didn't work, at least not right away. The SGF still has black to move (see LocalKoThreat). The text you referenced refers to changes in diagrams, so I wonder if things are different for the associated SGF, e.g. perhaps the SGF for all diagrams is produced once a night or so.

David: No, both the diagram image and the SGF file are generated when the page is saved. You're right that it didn't work, but it's for a different reason (which I just realized, else I would have told you before). The problem is that the generated SGF files never contain the [ext] PL property, the one that says whose turn it is. I see now that this has been observed before. I'll report this at Guinea Pigs' Feedback.

QWerner: I have a question. Is there the possibility to have two diagrams side by side on a page? I cant find any way to do it. May be there is someone who know how to do it, if it is possibl. Thx

SGF at SL Discussion last edited by tapir on September 20, 2010 - 14:11
RecentChanges · StartingPoints · About
Edit page ·Search · Related · Page info · Latest diff
[Welcome to Sensei's Library!]
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Login / Prefs
Sensei's Library