gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] CC205


From: Trevor Morris
Subject: Re: [gnugo-devel] CC205
Date: Fri, 01 Feb 2002 14:40:18 -0500

At 09:07 AM 2/1/2002 -0800, Daniel Bump wrote:
>
>The compiler complains about the constraint in CC205:
>
>; (!(!x_somewhere(c) && !o_somewhere(c) && xcut(c) 
>;    || !x_somewhere(d) && !o_somewhere(c) && xcut(d)) && attack(A))
>; || (!ko(B) && !xcut(B) && !safe_xmove(B))
>
>The || and && are close in precedence so a || b && c should
>be parenthesized, in this case
>
>; (!((!x_somewhere(c) && !o_somewhere(c) && xcut(c))
>;    || (!x_somewhere(d) && !o_somewhere(c) && xcut(d))) && attack(A))
>; || (!ko(B) && !xcut(B) && !safe_xmove(B))
>
>This can be simplified using de Morgan's laws,
>!(a && b) = !a || !b and !(a || b) = !a && !b.
>
>; (((x_somewhere(c) || o_somewhere(c) || !xcut(c))
>;    && (x_somewhere(d) || o_somewhere(c) || !xcut(d))) && attack(A))
>; || (!ko(B) && !xcut(B) && !safe_xmove(B))
>
>I suppose we could make xcut return false if the
>intersection is not empty.c. Maybe a comment is in order
>to explain the meaning of the constraint.
Yes, I agree a comment is definitely in order - where is the 
best place to put the comment, just above the constraint, or below 
the Pattern name?

-Trevor




reply via email to

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