conanbatt/OpenKaya — pull request #43 by Enders (2012-11-27 04:59:25+00:00)
Title: Bugcase #41 Fix (+ one additional goodie)

#41 was due wrong logic in same_group (reminder: group here means "group of empty spaces") function which wasn't able to connect together groups of stones separated by a large empty space or lots of dead stones. This only happens when there are no other paths (including kosumi and bamboo jumps!) between the empty spaces, which is relatively rare in a finished 19x19 game and probably very close to impossible on smaller board.

The actual fix has been marked in the commit's discussion. 1 test isolating the issue was added + the 2 full games were added ( = 3 new test ).

Two other changes are introduced in this PR:

1) Commented out the test case / fix for Kanin's reported bug. This is an actual "bug" in the sense that a Go player knows that if played out, the point will turn out to be a dame, but it involves actual playout. I made earlier an attempt at fixing it but it didn't turn out well... Note that this fix was NOT in Kaya's live environment as Kaya is one version behind the repo. This means that merging this PR will actually revert the repo to the actual live version of the code. That's probably a good thing. I also added a test (4th new test) to make sure the fix was actually removed.

2) Added some extra logic to make sure empty groups aren't created. They had no impacts on the scoring or algorithm, just made it harder to debug.