huangeddie / GymGo

An environment of the board game Go using OpenAI's Gym API
164 stars 31 forks source link

fix-bugs #12

Closed DeepGeGe closed 3 years ago

DeepGeGe commented 3 years ago

There are two serious bugs in function adj_data and batch_adj_data when to determine a point is protected by ko or not. If only killed one group, and that one group was one piece, and piece set is surrounded by opponent's piece, activate ko protection, instead of any piece. If only need to be surrounded by any piece, the point in the piecture bellow will protected by ko, but it's against the rules of go. 1 2

DeepGeGe commented 3 years ago

There are some errors in the second figure. If black piece in point 13, and point 12 shouldn't protected by ko. 3

huangeddie commented 3 years ago

I believe you are right. I also added a test case, crediting you for this specific scenario you mentioned.

Thanks!