[Top][All Lists]

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

Re: [gnugo-devel] a patch from a newbie :)

From: bump
Subject: Re: [gnugo-devel] a patch from a newbie :)
Date: Tue, 10 Sep 2002 10:42:09 -0700

> > Apart from the fact that I think this change is not what we want,
> Ok. Any suggestions about what we do want ?

It seems to me that you are on the right track with
they should get reversed between the attacker and defender,
which is the function of the REVERSE_RESULT macro.

Arend wrote:

> This distinction seems redundant to me. From the context we always know
> (_have_ to know) whether this is a result from owl_attack or owl_defend.
> So it would be sufficient to do:
> WIN   4
> KO_A  3
> KO_B  1
> LOSE  0

This would work as long as we agree that winning everything
with a favorable ko is better than winning a part unconditionally.
But if more codes are added, HALFWIN would always have to be
exactly half WIN. It seems to me that Nando's codes give more
flexibility for later changes.

Gunnar wrote:

> The new result codes certainly require discussion. In the mean time we
> would, as Arend has commented, be happy to get a partial patch doing
> the following:
> * Change 1, 2, 3 to KO_B, KO_A, WIN wherever those macros are
>   appropriate.
> * Change any occurences of the form "3 - code" or "WIN - code" to
>   "REVERSE_RESULT(code)".

Yes, even if commit to Nando's patch it seems good practice to do this in two
or three steps. Then two tests of the correctness of the first patch would be

(1) This first step would presumably change no regressions. 

(2) A second test of the correctness of the entire codebase after such a patch
would be that changing the values of WIN, KO_A and KO_B to Nando's values
would also change no regressions.

Then the last step would be to implement the HALFWIN setup, which would
thus be a small patch.


reply via email to

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