gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] corner matcher


From: Arend Bayer
Subject: Re: [gnugo-devel] corner matcher
Date: Mon, 3 Feb 2003 15:06:18 +0100 (CET)

Paul wrote:

> finally it is completed :)

:)

I am sorry for raising some objections after this patch has
been pending for so long :(

> i have added a new callback to shapes.c called joseki_callback().
> it is only used with corner matcher. i just copied shapes_callback
> and then deleted everything which is not needed by joseki patterns.
> shapes_callback() is not modified, since there are some joseki
> patterns in patterns.db.

Hmm. Code duplication!! How about moving the common code between
shapes_callback() and joseki_callback() into a common function instead?
(Not an issue for holding up your patch, but leaving as it is in your
patch would mean that any policy change to shapes pattern handling would
have to make every change twice.)

> i'm not too familiar with automake, so i changed Makefile, Makefile.am
> and Makefile.in. please, edit the patch if i did something wrong at this
When sending patches, it's sufficient to just send the changes to
Makefile.am.

> p.s. my editor deleted spaces at the end of lines, so the patch looks
>      somewhat larger than it really is.
I've deleted those hunks in paul_3_16.1a. It made the patch a bit
tedious to read...

> +  /* Don't match joseki patterns while scoring. */
> +  if (josekidb && !doing_scoring);
                                ^^^^^^
> +#if 1
> +    corner_matchpat(joseki_callback, color, &joseki_db);
> +#else
>      matchpat(shapes_callback, color, &joseki_db, NULL, NULL);
> +#endif

This looks like typo (fixed in .1a).

Finally, it looks to me that your corner matchpat doesn't work for
joseki variations with captured stones. Is that right, or did I misread
the code?

Finally, some comments to the data structures (in patterns.h) would be
great!
(xor_att is 3 usually, and 0 if the same color moves twice in a row?
second_corner_offset marks the opposite corner of the box on the board
that has to fit the joseki variation? (The square mark in the .sgf-file.))

Finally, are you really sure we will never have joseki of lenght more
than 128? (Ok I am kidding...)

Arend







reply via email to

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