[Computer-go] JSON game format

Petr Baudis pasky at ucw.cz
Sat Aug 18 18:14:58 PDT 2012


On Sat, Aug 18, 2012 at 03:18:36PM +0200, Jonas Jermann wrote:
> I don't know if this is the right time/place. But I wanted to
> mention that I developed my own gaming format to store store
> time-accurate recordings of go lectures/games together with optional
> media.
> In that area SGF is certainly lacking. What I did was: I tried to
> keep as much of the SGF syntax as possible (i.e. "tried" to keep it
> backwards compatible) and break as few things/assumptions as
> possible.
> For more details please check it out here:
> https://github.com/jjermann/rgf
> resp.
> https://github.com/jjermann/rgf/blob/master/DOCS/RGF.txt
> I really tried to think it through and also made a complete
> prototype that already works quite nicely (at least with firefox).
> My decision to use an extension of SGF is:
> - SGF is already very nice to store tree data, compared to e.g. xml/XGF
>   or some other binary formats:
>     o It can be edited by hand
>     o It is small
>     o Everyone/most (non-asian) softwares already use it, so
>       import/export is easier and writing/adjusting a parser is easier
> - SGF actually already has _almost_ everything I needed
> - It is easy/easier to "enrich" an SGF with time sensitive data
> - RGF is actually like a wrapper/container around SGF, so all old SGF
>   editors can    still be used and can easily be extended for
>   recording...

  I did not understand your example in RGF.txt well. I'm confused by
several points:

  (i) Is there any advantage in having RGF files a tree of nodes instead
of just a timestamped sequence of actions given that the latter is
exactly what a RGF player will convert it to and it can refer to the SGF
file for the actual variation? If so, why not just keep all the
information in the SGF tree? To have e.g. stones appear gradually, you
can just split AB[]s etc. to multiple nodes, which SGF readers should
handle fine too?

  (ii) In each GS/GD node of the SGF file, you repeat full game
information. Why all this duplication? What semantics should SGF editors
adopt regarding changing game information and how should SGF viewers
handle changes in game information?

  (iii) Zip container is usually preferred for such bundles since you
can easily access random files without loading and scanning the whole
bundle file.  Is there a reason why you picked tar instead?

				Petr "Pasky" Baudis

More information about the Computer-go mailing list