I've never heard of Benson's algorithm before, but I *just* wrote an algorithm to for playing go that determines when to remove stones. If suicide is allowed, I don't have to keep a memory of "prior to the move". If suicide is allowed, all analysis can occur in the same memory structures used to track the current position.Samura wrote:Just to add another thing to the discussion.
Today I discovered that there is an algorithm used by computer programs to analyze the status of groups, especially if they are unconditionally alive. It's called Benson's algorithm and one of the necessary conditions is that the ruleset forbid suicides. With suicides the algorithm needs more analyzes and thus more time.
So, with a ruleset that allows suicide, computer programs would have a harder time to find the status of groups.
Algorithm if suicide is allowed
1. Place new stone.
2. Merge Groups attached to new stone.
3. Remove dead groups of opposite color.
4. Remove dead groups of same color.
If suicide is allowed, I have to save off the current state before the analysis.
0. Save current board state
...
5. If current stone has been removed, restore saved state, and indicate invalid move
Now I'm going to look up Benson's algorithm to see if it's the same
Edit: No Benson's Algorithm is not the same, which should have been obvious, given different conclusions on complexity of suicide.