![]() StartingPoints Referenced by
|
Instant Eye Tester
Difficulty: Advanced
Keywords: Shape, Life & Death
There was once a discussion among Go programmers and others in the newsgroup rec.games.go as to whether or not you could tell if an eye was real or not without searching the game tree to see if the group could die. It turns out you don't need to do such a search, assuming that the group has only single-point eyes. First, a few definitions. (I moved questions/comments about the definitions and diagrams to the end of the page to reduce clutter) Paths A path from stone A to stone B exists if there is a direct connection (in the legal, Go sense) between the stones:
In addition, a path can skip over a single space as if it was filled by a stone of that color. So:
and
Also, note that:
is also a path. Properties of Paths Paths have some nice mathematical properties which will simplify things:
Strings The next level of abstraction is the string. Let S be a set of stones on the board. S is a string if and only if, forall A,B in S there is a path between A and B. The following examples should clarify:
DieterVerhofstadt asks: why is this concept introduced ? It's never used in the rest of this section. Matt Noonan: It's been awhile since I wrote this, but I think that in the section below, when I say "group" what I meant was "string". Still, it's only to justify the method, and not really needed to operate it. Eyes (True, False, and Otherwise) Finally, we can define real eyes and false eyes in a static way. Let an eye be any point which is surrounded on all four sides by stones of the same color. Let these four stones be called A, B, C and D, and define the set L={A,B,C,D} When talking about a real eye, what we mean is that the stones that define it are all connected to the same group. Therefore: Let E be the eye to be tested, and let L be defined as above. An eye is a real eye if and only if forall x,y in L there exists a path between x and y, provided that the path does not go through E right away (since this would allow jumping across the eye to connect x and y directly). If E is an eye and E is not a real eye, then E is a false eye. Because of the properties for paths given above, it follows that rather than testing up to 12 paths per eye, it is sufficient to only test 6: A-B, B-A, A-C, C-A, A-D, and D-A (the restriction on the starting move for the path breaks the commutativity of the paths). DavidPeklak : The restriction should rather say that the path must never pass through E, and not only at hte first step. Otherwise this would be a real eye:
Because I can always start the path going to another stone and jump the eye later. So if my assumption is correct, the commutativity of the paths holds again and only three test are necessary. Examples:
This method can even correctly give the status of this four-group beast:
Some friends and I have played around a little with extending the concept of "eye" to larger eyeshapes, but haven't put enough work in to generalize these techniques, though it looks at least somewhat promising. Not exactly practical for everyday playing, but maybe interesting to the Go-programmers and bored players out there.. :) -- Matt Noonan DavidPeklak : I think I found a more simple aproach that works without searching and defines unsettled eyes as false eyes: Say the black eye "E" sourrounded by the black stones A, B, C and D has to be checked: Imagine white stones occupying all liberties of A, B, C and D as far as this is possible without putting white stones in atari. If neither A, B, C or D are in atari now, the eye is real, othereise it is false. Check out the logical definition in FalseEye. --Dieter
FCS: Hmm... seems to me that there is only one real eye here and that the shape is unsettled. Whoever plays at 'a' first will win. Matt Noonan: It's true that the algorithm counts unsettled eyes as real eyes, but the main idea was to find false eyes without search, so there is a sort of implicit assumption that no more moves will be made. Perhaps it is better suited to automatically finding dead stones at the end of a game? BillSpight: What if a path were defined to go only through stones or eyes of the same color?
Then the marked point would not be an eye, because there is no path from the marked stone to the other Black stones, except through that point right away. Also, between false eyes and real eyes are fractional eyes. See "Eyespace values in go" by Howard Landman, in Games of No Chance. Anyway, more to the point:
There is the question about what to call this shape (a Ponnuki?). I'd call it an eye in the absence of white stones. Perhaps the procedure can be expanded to find real, false and undefined eyes? This might not be possible without search, though. This is a copy of the living page "Instant Eye Tester" at Sensei's Library. (C) the Authors, published under the OpenContent License V1.0. |