www.delorie.com/gnu/docs/gnugo/gnugo_151.html   search  
 
Buy GNU books!


GNU Go Documentation

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.9 The Connections Database

The patterns in `conn.db' are used for helping make_dragons() amalgamate worms into dragons and to some extent for modifying eye spaces. The patterns in this database use the classifications `B', `C', and `e'. `B' patterns are used for finding cutting points, where amalgamation should not be performed, `C' patterns are used for finding existing connections, over which amalgamation is to be done, and `e' patterns are used for modifying eye spaces and reevaluating lunches. There are also some patterns without classification, which use action lines to have an impact. These are matched together with the `C' patterns. Further details and examples can be found in See section 10. Worms and Dragons.

We will illustrate these databases by example. In this situation:

 
XOO
O.O
...
`X' cannot play safely at the cutting point, so the `O' dragons are to be amalgamated. Two patterns are matched here:

 
Pattern CC204

O
.
O

:+,C

O
A
O

;!safe_xmove(A) && !ko(A) && !xcut(A)

Pattern CC205

XO
O.

:\,C

AO
OB

;attack(A) || (!safe_xmove(B) && !ko(B) && !xcut(B))

The constraints are mostly clear. For example the second pattern should not be matched if the `X' stone cannot be attacked and `X' can play safely at `B', or if `B' is a ko. The constraint !xcut(B) means that connection has not previously been inhibited by find_cuts. For example consider this situation:

 
OOXX
O.OX
X..O
X.OO
The previous pattern is matched here twice, yet `X' can push in and break one of the connections. To fix this, we include a pattern:

 
Pattern CB11

?OX?
O!OX
?*!O
??O?

:8,B

?OA?
OaOB
?*bO
??O?

; !attack(A) && !attack(B) && !xplay_attack(*,a,b,*) && !xplay_attack(*,b,a,*)

After this pattern is found, the xcut autohelper macro will return true at any of the points `*', `a' and `b'. Thus the patterns CB204 and CB205 will not be matched, and the dragons will not be amalgamated.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003