Closed lemonsqueeze closed 8 years ago
Thanks! I'm a bit curious why is the ko/eyelike logic different, but I'm assuming that it'll do the same thing as before?
The reason why suicides are allowed by default is indeed that it's less expensive. Or at least it used to be, can't vouch for this not being a historical artifact by now.
Yes, it's same as before except for group suicides (almost like a mini is_bad_selfatari() in a way). Just noticed we could even drop the board_is_eyelike() check (if board->ko matches we know it's an eye). Shouldn't matter much though, prior code isn't too performance critical i guess...
Hi,
I ran into a situation where a group suicide gets into the tree and makes it crash in tree_expand_node() when it considers opponent playing the same move:
Looks like it doesn't happen normally because of current prior code, but in this case i was playing with a different one which triggered it. Doing fine now with this board_is_valid_play_no_suicide() check in tree_expand_node().
btw i was wondering, is the only reason group suicides are allowed in board.h that it's more expensive to check for them ? (didn't change other board_is_valid_play() calls because of that)