gnugo-devel
[Top][All Lists]
Advanced

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

Re[2]: [gnugo-devel] sgf output - first edition


From: Paul Pogonyshev
Subject: Re[2]: [gnugo-devel] sgf output - first edition
Date: Sun, 1 Sep 2002 23:26:55 +0300

Gunnar wrote:
>>   - default setting: output all debug info available - is it ok?

> I prefer no debug info as the default. 

ok, it's easy

>>   - it outputs all debug information when using "save" from
>>     play_ascii, maybe should not

> An explicit save from within play_ascii should use the same level of
> debug info as what is saved by -o.

good, less work here ;)

>>   - doesn't work good if file contains variations (e.g. undo is used).
>>     should it be fixed? (it works, but some debug information looks
>>     inconsistent)

> Don't bother with this case. The sgf format can't handle this well
> anyway. We do want undo to give a game record with variations but it
> doesn't matter if the debug info looks funny in that case.

and here ;)

>> if there are no objections, i'll rewrite gmp.c

> I'm pretty sure you don't need to touch gmp.c. It's play_gmp.c you
> want to look into.

yes, i meant play_gmp.c. just written what i was thinking of (gmp)

>> and sgfdecide.c using new output format as well.

> As far as I know everything in sgfdecide.c is fine in this respect.
> You may want to take a look at play_solo.c and play_test.c though.

>> --- sgf/sgfnode.c       11 Apr 2002 19:52:06 -0000      1.14
>> +++ sgf/sgfnode.c       1 Sep 2002 15:50:06 -0000
>> @@ -43,6 +43,9 @@
>>  # endif
>>  #endif
>>  
>> +#include "gnugo.h"
>> +#include "liberty.h"
>> +
>>  #include "sgftree.h"
>>  #include "gg_utils.h"

> This is a no, no. The code in the sgf directory should be an
> independent library with no dependencies back to the engine. The code
> which needs to use engine internals should stay in sgffile.c.

i'll move sgfAddDebugInfo then

>> +static void
>> +restore_property(SGFProperty *prop)
>> +{
>> +  if(prop) {
>> +    restore_property(prop->next);
>> +    prop->name&=~0x20;
>> +  }
>> +}

> What's the purpose of this?

current implementation marks printed properties by making a letter
lowercase. before i added this, outputsgf wrote correct trees after
the first moves, but then it wrote empty ones.

> Don't comment out code by actually enclosing it in a comment. Instead
> use the 

> #if 0
>   ....
> #endif

got it.

by the way, how do i patch a patch? for example, i need to modify this
patch in several places, but it is not yet applied to cvs. is there a
convinient way to make further changes and diff files as though the
patch has been applied?

Paul





reply via email to

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