[Top][All Lists]

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

Re: [gnugo-devel] attack_either patches analysis

From: Arend Bayer
Subject: Re: [gnugo-devel] attack_either patches analysis
Date: Fri, 8 Nov 2002 20:29:35 +0100 (CET)

Evan wrote:

> Oh, as for your 3rd point about komaster schemes, there is a case where it
> makes sense to return ko results:
> Attack_either calls defend_both calls attack_either, which gets as the
> best result a ko from attack(astr) or attack(bstr).  The ko result should
> probably be propogated back up.

Sure, if we find a ko result, we should report is as such. But if you
know that you can attack with ko, I don't think it is worth trying again
to see whether you can do better.

> +    for (k = 0; k < moves.num; k++) {
> +      if (trymove(moves.pos[k], other, "attack_either", astr, EMPTY, 
> NO_MOVE)) {
> +        best = gg_max(best, REVERSE_RESULT(defend_both(astr, bstr)));
>       popgo();
> +     if (best == WIN)
> +       return best;
>        }
I would suggest to use "if (best != 0) return best" here.

> Of course, a real komaster scheme is probably worth trying, and I'll do
> that when I'm done with my current patch attempt.

I am not sure whether it is worth the effort. attack_either/defend_both
aren't used that often so far.


reply via email to

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