Page 6 of 7
Re: Go 'Suicide'?
Posted: Sat Dec 15, 2012 5:57 pm
by speedchase
Technically what you wrote was a list of steps after each turn, not a list of rules, but I do see your point
Re: Go 'Suicide'?
Posted: Sat Dec 15, 2012 8:22 pm
by HermanHiddema
speedchase wrote:since it was brought up:
palapiku wrote:As pointed out before, suicide actually requires an additional rule, which is that when placing a stone you first remove stones of opposite color with no liberties, and then stones of your own color with no liberties.
Regular go does not have that rule.
Regular go actually has two rules regarding this.
1: if you play a stone that starts with no liberties that gains liberties in the process of capturing opponents stones, it is not removed.
2: rule forbidding suicide
go permitting suicide has one
1: if you play a stone that starts with no liberties that gains liberties in the process of capturing opponents stones, it is not removed.
Tommie is infact correct, although he probably should have read the thread
Under these suggested rules, it is legal to play a move that removes your own last liberty. And, since there is no rule to tell you to remove them, those stones then remain on the board.
This is a valid set of rules, but it is in no way even near any rules allowing suicide, such as New Zealand rules.
Re: Go 'Suicide'?
Posted: Sat Dec 15, 2012 9:08 pm
by speedchase
HermanHiddema wrote:
Under these suggested rules, it is legal to play a move that removes your own last liberty. And, since there is no rule to tell you to remove them, those stones then remain on the board.
This is a valid set of rules, but it is in no way even near any rules allowing suicide, such as New Zealand rules.
obviously I was omitting the rule: "at the end of every turn, a stone with no liberties is removed" from both rule sets. Just like I was omitting rules about about scoring and dead stones.

Re: Go 'Suicide'?
Posted: Sun Dec 16, 2012 4:38 am
by HermanHiddema
speedchase wrote:HermanHiddema wrote:
Under these suggested rules, it is legal to play a move that removes your own last liberty. And, since there is no rule to tell you to remove them, those stones then remain on the board.
This is a valid set of rules, but it is in no way even near any rules allowing suicide, such as New Zealand rules.
obviously I was omitting the rule: "at the end of every turn, a stone with no liberties is removed" from both rule sets. Just like I was omitting rules about about scoring and dead stones.

Ah, I see, so:
$$B
$$ . . . . . .
$$ . . X O . .
$$ . X O 1 O .
$$ . . X O . .
$$ . . . . . .
- Click Here To Show Diagram Code
[go]$$B
$$ . . . . . .
$$ . . X O . .
$$ . X O 1 O .
$$ . . X O . .
$$ . . . . . .[/go]
results in
$$B
$$ . . . . . .
$$ . . X O . .
$$ . X . . O .
$$ . . X O . .
$$ . . . . . .
- Click Here To Show Diagram Code
[go]$$B
$$ . . . . . .
$$ . . X O . .
$$ . X . . O .
$$ . . X O . .
$$ . . . . . .[/go]
then?
Re: Go 'Suicide'?
Posted: Sun Dec 16, 2012 7:01 am
by Samura
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, whith a ruleset tha allows suicide, computer programs would have a harder time to find the status of groups.

Re: Go 'Suicide'?
Posted: Sun Dec 16, 2012 7:20 am
by msgreg
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.

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.
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.
Re: Go 'Suicide'?
Posted: Sun Dec 16, 2012 9:46 am
by Bill Spight
msgreg wrote: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.

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.
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.
FWIW, you do not have to save the current state. Just don't merge too early.

Any placed stone will be adjacent to at most four strings. Of those strings, remove opponent's strings without liberties. If none of them has been removed, check to see if the placed stone has a liberty. If so merge it with the friendly stones. If not, and any of the adjacent friendly strings has a liberty, merge all of them with the played stone. If none of them has a liberty, remove the placed stone and declare an illegal move.
BTW, when I first wrote a go program, for each string I kept a list for each stone in the string and another list for liberties. Doing so made the question of capture or suicide obvious.

Re: Go 'Suicide'?
Posted: Sun Dec 16, 2012 10:15 am
by msgreg
Bill, your input is awesome. I've continued the thread on
Algorithms for User Interface (if anyone wants to follow...)
viewtopic.php?f=18&t=7440
Re: Go 'Suicide'?
Posted: Sun Dec 16, 2012 1:43 pm
by speedchase
msgreg wrote: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.
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.
you don't actually need to remember the prior board state. If anything is removed in step four, then the move is invalid.
Ps. if you are trying to find the computationally simplest (processor time) method of resolving the board after a move, you only have to check the oppositely colored stones immediately adjacent to the stone you placed during step 3, and you only have to check the stone that was played for your color.
PPs. during my time trying to program a Go AI (that was a horrible failure in case you are curious), I thought rules permitting suicide would have been simpler, but that is just me.
Re: Go 'Suicide'?
Posted: Sun Dec 16, 2012 5:55 pm
by msgreg
Thank you speedchase! I've moved my response to
this thread so we don't pollute this Go Suicide thread with computer algorithm conversation.
Re: Go 'Suicide'?
Posted: Mon Dec 17, 2012 8:52 am
by Tommie
OK, thank you Herman, speedchase and hyperpape,
I should have read the thread before.
Especially my suggestion NOT to have a rule on suicide
- no matter how economical the ruleset might be -
cannot prevent the need for discussing suicide when it might occur.
BTW, below is a problem within context:$$c
$$ +---------------------------------------+
$$ | X X O . X O O . X . . . . . . . . . . |
$$ | X . O . X X O . X . O . . . . . . . . |
$$ | O O O X . X O . X . O . . . . . . . . |
$$ | X X X X X X O O X X O . . . . , . . . |
$$ | . . O O O O . O . . O . . . . . . . . |
$$ | O O O . X O O O X X O . . . . . . . . |
$$ | O X O . X X X X X O . . . . . . . . . |
$$ | X X X X X . . . O O . . . . . . . . . |
$$ | . O . . . O . . . . . . . . . . . . . |
$$ | . . O , O . O . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ +---------------------------------------+
- Click Here To Show Diagram Code
[go]$$c
$$ +---------------------------------------+
$$ | X X O . X O O . X . . . . . . . . . . |
$$ | X . O . X X O . X . O . . . . . . . . |
$$ | O O O X . X O . X . O . . . . . . . . |
$$ | X X X X X X O O X X O . . . . , . . . |
$$ | . . O O O O . O . . O . . . . . . . . |
$$ | O O O . X O O O X X O . . . . . . . . |
$$ | O X O . X X X X X O . . . . . . . . . |
$$ | X X X X X . . . O O . . . . . . . . . |
$$ | . O . . . O . . . . . . . . . . . . . |
$$ | . . O , O . O . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ +---------------------------------------+[/go]
Re: Go 'Suicide'?
Posted: Wed Dec 19, 2012 2:10 am
by Mef
Tommie wrote:BTW, below is a problem within context:
Sure, but when the problem description is "Black to check the ruleset and play elsewhere regardless" it loses much of its luster
Re: Go 'Suicide'?
Posted: Wed Dec 19, 2012 2:39 am
by Tommie
Mef wrote:Tommie wrote:BTW, below is a problem within context:
Sure, but when the problem description is "Black to check the ruleset and play elsewhere regardless" it loses much of its luster
I will try to understand:
Are you saying ironically

, that, because that sentence was
not written there,
i.e. it is
not told whose turn it is, the problem is
less interesting?
A status problem is more equivalent to a real-game situation, challenging and interesting to me.
The term 'context' was the only hint - indeed with a bat

Re: Go 'Suicide'?
Posted: Wed Dec 19, 2012 3:02 am
by HermanHiddema
Tommie wrote:Mef wrote:Tommie wrote:BTW, below is a problem within context:
Sure, but when the problem description is "Black to check the ruleset and play elsewhere regardless" it loses much of its luster
I will try to understand:
Are you saying ironically

, that, because that sentence was
not written there,
i.e. it is
not told whose turn it is, the problem is
less interesting?
A status problem is more equivalent to a real-game situation, challenging and interesting to me.
The term 'context' was the only hint - indeed with a bat

I think this is what Mef is referring to, specifically the mistake of

(see variation there for correct play)
(;GM[1]FF[4]SZ[19]GN[]PC[http://lifein19x19.com/]AP[GoWiki:2009]DT[2012-12-19]C[Diagram from
http://lifein19x19.com/]PL[B]AB[aa][ba][ea][ia][ab][eb][fb][ib][dc][fc][ic][ad][bd][cd][dd][ed][fd][id][jd][ef][if][jf][bg][eg][fg][gg][hg][ig][ah][bh][ch][dh][eh]AW[ca][fa][ga][cb][gb][kb][ac][bc][cc][gc][kc][gd][hd][kd][ce][de][ee][fe][he][ke][af][bf][cf][ff][gf][hf][kf][ag][cg][jg][ih][jh][bi][fi][cj][ej][gj](;B[bb];W[je];B[ie];W[ja];B[ba];W[jb](;B[ab];W[hh];B[be];W[gh];B[ae];W[ci];B[ha];W[fh];B[hb];W[di];B[hc];W[jc];B[df];W[ei])(;B[be];W[hh];B[ae];W[gh];B[ha];W[fh];B[hb];W[da];B[ab];W[jc];B[hc];W[ei];B[df];W[di];B[dg])))
If you play it like that, then the problem indeed comes down to "Black to check the ruleset (to see if suicide is allowed), then to play elsewhere regardless (because you've read it out not to work anyway)".
Re: Go 'Suicide'?
Posted: Fri Dec 21, 2012 11:22 am
by Mef
HermanHiddema wrote:I think this is what Mef is referring to, specifically the mistake of

(see variation there for correct play)
If you play it like that, then the problem indeed comes down to "Black to check the ruleset (to see if suicide is allowed), then to play elsewhere regardless (because you've read it out not to work anyway)".
Actually it's simpler than that, I miscounted the liberties...I was thinking this was one of those positions where B is alive unconditionally with suicide and dead unconditionally without it (hence doesn't play either way). (=