lightvector / KataGo

GTP engine and self-play learning in Go
https://katagotraining.org/
Other
3.46k stars 561 forks source link

Sunjang Baduk scoring #468

Open Qiangong2 opened 3 years ago

Qiangong2 commented 3 years ago

Is there any plan to integrate Sunjang Baduk scoring into KataGo?

lightvector commented 3 years ago

Not right now, but I could consider it. I assume the scoring is as described here: https://senseis.xmp.net/?KoreanScoring

The first step would be to implement a scoring algorithm. Does anyone know of any corner cases or rules beasts that would need special handling under this scoring method? Is it always the case that greedy removal of stones in any order will always produce the same result (is there a proof?), or is there sometimes a little bit of choice in which stones to remove before scoring? How is bent-4-in-the-corner treated?

Qiangong2 commented 3 years ago

This is probably a good analysis on how it works: https://senseis.xmp.net/?SunjangBadukCounting%2FRealExample1

lightvector commented 3 years ago

Thanks. As far as I can tell that page still doesn't answer any of my questions - how bent 4 or other special positions are handled, or whether it is possible to come up with a mathematical proof about the correctness of a greedy algorithm for stone removal. Understanding and/or having solid logic is important for computer implementation, since the rules must be able to produce a reasonable result in all cases, no matter how rare.

Qiangong2 commented 3 years ago

From my understanding, the stones are only kept in play as long as they are connected against an opposing stone. So if you have 3 of your own stone connected and entirely encircled by your own stones, those three would be removed and the area given to you as points in the end.

Granted, I don't have the strongest grasp of this variation, so I could be wrong