Let's begin with the most basic thing about Life and Death: Prevention of an atari.
The first approach that I see (I will correct it as long as I think of it) is:
Look at the positions that limit the stone.
If some of them have a stone of the same color, see how many liberties have that group.
If the group have 1 liberty, add that stone and count the liberties again.
If still have 1 liberty quit points, else add points.
This is a very bad approach, but I can evolve from this I think (maybe I am wrong, but... let's try).
NOTE: Ok... while trying this, a wild bug appeared! A suicidal stone was played. Do not know if this happened because the new code ruins all or if there was always that bug.
No comments:
Post a Comment