Topology of Half Eyes and False Eyes
False eyes and half eyes can locally be characterized by the status of
the diagonal intersections from an eye space. For each diagonal
intersection, which is not within the eye space, there are three
* It's occupied by an enemy (X) stone, which cannot be tactically
* It's either empty and X can safely play there, or it's occupied
by an X stone that can both be attacked and defended.
* It's either occupied by an O stone, an X stone that can be attacked
but not defended, or it's empty and X cannot safely play there.
We give the first possibility a value of two, the second a value of
one, and the last a value of zero. Summing the values for the diagonal
intersections, we can draw the conclusions
>=4 false eye
3 half eye, critical points are given by intersections of value 1
<=2 proper eye
If the eye space is on the edge, the numbers above should be decreased
by 2. An alternative approach is to award diagonal points which are
outside the board a value of 1. To obtain an exact equivalence we must
however give value 0 to the points diagonally off the corners, i.e.
the points with both coordinates out of bounds.
The algorithm to find all topologically false eyes and half eyes is:
For all eye space points with at most one neighbor in the eye space,
evaluate the status of the diagonal intersections according to the
criteria above and classify the point from the sum of the values.