About the WGF editor

The program part, what, why

Besides the problems presenter, Tim Kington worked on a lesson presenter
(this is, what I assume, the WGF presenter/editor is).
It is not worked out: a problem with a previously edited file may happen and
MyGoGrinder will not start (the default file is only a work around). There are more
reasons, why the WGF part was not activated. And coding is time consuming: it may
take several days (or nights) to find a solution even for a simple problem.

The file format

WGF files are simply sgf files with reduced standard information and another
file name extension. The unusual HTML tags in the sgf comments allow formatting
the text just like any HTML code. Java can display this formatted text, but also
possible is, to use the files in web pages with a built-in, special crafted
Java viewer or with JavaScript (WGF: WebGoFile?). New identifiers for coordinates
(e.g. XB[ ] YB[ ]) are possibly not displayed by any other program. Branches are (as
far as I see) not used or supported. The demo file ( DEMO.WGF ) gives a small
impression of what is possible.
A WGF file cannot be opened by giving it's name as argument for a starter
(so java -jar MyGrinder.jar xy.wgf is NOT POSSIBLE).

Used identifiers

SZ[] B[] W[] C[] : SiZe, Black and White setup stones (should be and are thought to be moves), Comment
TR[] CR[] TB[] TW[] : TRiangle + CiRcle marker, Territory Black, Territory White
SQ[] MA[] LB[] : SQuare and cross MArker, single + multi character LaBels (up to ~ 4 letters)
XB[] XW[] : "F" - fake stones (-> in the code: fakeAction)
AB[] AW[] : "R"(?) stones (-> in the code: realAction)
YB[] YW[] : "L" - local moves (-> in the code: localMoveAction)

To compare a usual SGF file and a WGF file, here are examples

WGF:
WGF:
(
;
  SZ[5]
  TR[cc][db]
  MA[dd]
  TB[ea][da][cb][bb][ba][aa][ab]
  TW[ae][be][ce][de][ee][ed]
  B[cc]
  W[dc]
  W[cd]
  W[bd]
  B[bc]
  C[A comment here]
)

This file consists of just one (setup-) node: the semicolon marks the beginning of a new node.

SGF:
(;GM[1]FF[4]CA[UTF-8]AP[CGoban:3]ST[2]
RU[Japanese]SZ[9]KM[10.50]
PW[Sebastian]PB[Jan]WR[4k]BR[9d]RE[W+Resign]
;B[gc];W[ff];B[cg];W[de];B[dc]
(;W[cd];B[he])
(;W[gh];B[eh];W[hf]
(;B[hd];W[bd])
(;B[bf];W[bb];B[ed];W[cd])))

This common SGF game file shows many identifiers in the first (root) node and then
one move per node. Added are some branches (Variations)

For information about the SGF format look on the pages at read-bean.com/sgf/

How to use

For "playing" a bit with the program, just create a new file. 5x5 should be enough
(and is the smallest provided). Click the "Edit" button: the "move" tool is now active.
Moves are just static stones; a flow of stones can not yet be easily entered.
The other stone buttons (F for fake, R for real, L for local) apparently don't do
anything special: the stones disappear, if you add a new "node" (nodes are the entities, where
usually a move or a setup is in).
"Insert copy" (??) unclear: when done at the 1st node, it copies the SiZe information to
the second node (and from there you can copy this to the 3rd node).
"Insert page" adds a new node at the current node

Navigation in a file is irritating:
< and > go to the next/previous node (rebuild the complete setup of that node)
Home should go back to the empty board of the beginning; instead it goes to the first
set stone, if this was captured in the mean time, it is not replaced.
Step goes through the setup stones of one node, but at the end, the first stone or the
empty board doesn't show up.

Worms

Program start: if loading file from history fails (broken or deleted file), the program
cannot start (half of this is repaired with the " DEFAULT.WGF "); the rest: delete or
move the broken file and the WGF editor loads the " DEFAULT.WGF "
An error message for a defect file is misleading, e.g. a missing ";" at the beginning is
reported as "No ( found" (same as in the sgf parser of the problems part)

Unfortunately, it doesn't make sense to work with the WGF editor, as the navigation is
still buggy and the WGF controller is not worked out well. It would need to dive deep
into the WGFController code to understand the (partly planned) features (I don't want to
do that).

SourceForge.net Logo