Closed Efaq closed 5 years ago
Alternatively, the dictionary _grid should be initialized with keys for all possible Point objects in the board pointing to None.
@Efaq very good catch. mind sending a pull request against our master branch?
@maxpumperla Sure, will do!
When doing some study with the code, I may have found a bug regarding the ko detection when working with goboard_slow:
Given a specific board state, if one piece is placed and then removed, the initial and final board configurations are the same, but in the dictionary _grid of the first one there will be no entry for the Point where the stone was placed, while in the _grid of the second one there will be an entry pointing to None. This makes the equality check of situation for ko to return False, since the dictionaries are different, but the states are the same and there should be a ko. I came across examples of this behavior.
I believe that this correction should take place:
In goboard_slow.py, the _remove_string method should look like:
That is, the last line is changed so the whole key is deleted instead of it being linked to None.