gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] attack_either patches analysis


From: Evan Berggren Daniel
Subject: Re: [gnugo-devel] attack_either patches analysis
Date: Fri, 8 Nov 2002 15:54:34 -0500 (EST)

On Fri, 8 Nov 2002, Arend Bayer wrote:

>
> 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.
>
> I.e.
> > +    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.

OK, I'll try that sometime this weekend.

>
> > 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.

Probably so.  I suppose we usually only check for unconditional success in
pattern matching.  Would it make sense to use them elsewhere, like in move
generation?  If so, checking for ko might be worth it.

Thanks

Evan Daniel





reply via email to

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