[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] CC205
From: |
Daniel Bump |
Subject: |
[gnugo-devel] CC205 |
Date: |
Fri, 1 Feb 2002 09:07:57 -0800 |
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.
Dan
- [gnugo-devel] CC205,
Daniel Bump <=