bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] SGF questions


From: Philippe Michel
Subject: Re: [Bug-gnubg] SGF questions
Date: Wed, 20 Apr 2011 18:36:19 +0200 (CEST)
User-agent: Alpine 2.00 (BSF 1167 2008-08-23)

On Wed, 23 Mar 2011, Guido Flohr wrote:

I write a client for FIBS, and I want to use SGF as the internal file
format.

I need a place where I can store some state information.  Is it okay to
use the MI property for that?

And what about namespacing? Should I prefix my private tags or rather
write here if I introduce one? I want to avoid bothering people with
warnings about unknown tags, when gnubg sees them.

Another problem is the "autodouble" feature of FIBS.  If autodouble is
switched on by both players the cube is automatically raised one level
if both players roll the same number in the opening roll.  I think I
could use the CV property for that.  But where to put it? Into the root
node or should I create nodes without moves and only DI?

Say, the first three rolls are 66, 22, 31.  I could do it like this:

    (
    ;GM[6]
    ;DI[66]CV[2]
    ;DI[22]CV[4]
    ;DI[31]
    )

Or like this:

    (
    ;GM[6]CV[4]
    ;DI[31]
    )

Or even like this:

    (
    ;GM[6]
    ;DI[31]CV[4]
    )

The first option is likely to confuse the gnubg SGF parser, and maybe
mess up the move counting.  The other two possibilities will lose some
unimportant information.  What should I do?

The second choice is similar to what gnubg generates when it plays with automatic doubles, except that it needs a PL entry before DI or it can't parse it and fails with :

ERROR:play.c:549:void add_moverecord_sanity_check(moverecord *): assertion failed: (pmr->fPlayer >= 0 && pmr->fPlayer <= 1)

In this respect, the first choice cannot work and the third looks slightly inaccurate since the cube is really set to 4 before the roll.


Coincidentally, Ian Shaw posted about the above assertion failure a few weeks ago. It looks like it is possible to set such an impossible position (dice on the board but nobody on roll) in the editing mode.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]