Having bots play in Japanese rules?

Question - is there a way to potentially run a bot supporting Japanese rules on OGS?

Before too long I expect to have some versions of KataGo (currently running as kata-bot on this server) that experimentally support Japanese rules… or at least something close enough that in all but highly rare and exceptional cases it will match Japanese rules. (So, no superko, scoring based on territory+captures, bent-4-in-the-corner is dead even if there are ko threats in a seki elsewhere, etc). Of course, it’s possible the bot would misevaluate one of these rare cases, but that would be its own mistake, no different than any other mistake that a bot could make in normal play.

As far as the bot’s behavior, it would be what you’d expect - playing the game normally, finishing up the borders, (usually) filling all the dame, and then passing (without physically capturing stones believed to be dead).

Would there be a way to potentially run such a bot on OGS? I don’t see a way to specify rules for the current gtp interface. But OGS seems to have a pretty good dead-stone heuristic algorithm, so it seems likely to me that OGS’s automatic scoring could be good enough most of the time to not even need any API for agreeing on dead groups and such, so the current API might already be enough, if only there was some flag to set the rules.

1 Like

Bot games have to use OGS auto-scoring for scoring (because there isn’t a way to do the stone removal phase with bots).

OGS auto-scoring is Chinese only.

So I think the answer is “no, not as it stands”.

1 Like

Does the auto-scoring really only work for Chinese only? It seems to me that if the auto-scoring was reasonably accurate, Japanese scoring with ‘stone removal’ for all the stones the auto-scoring believes are dead would be good enough?

Or maybe the problem is that in the rare cases where the auto-scoring is in error, there’s no way to “help” correct it via an additional move without losing points?

The auto-scorer is in fact “reasonably accurate”, but also “substantially flawed in some situations”.

This gives rise to games with bots that have to be annulled when it gets it wrong: these are not frequent, but they are regular.

I’m not across the reason why Chinese is easier for programs than Japanese, but it appears to be the case, and is given as the reason why score estimators do Chinese.

There is hope on the horizon for better with AI help.

2 Likes

I think the reason that the autoscore may work better on the chinese ruleset is that in chinese rules, its adventageous to fill in Dame. When all Dame are filled, this leavs far less variations on the board. And indeed, when the bot removes dead stones, you dont lose a point removing those stones… (But you do loe a turn).

If that is the case then it would make the game easier to “Score/read” to get an accurate answer.

Not that i am an expert, but this does seem to be the most simple solution as to why chinese rules may be prefered.

Probably it’s Seki, but I’m not a computer go expert. In Japanese rules, eyes of Groups in Seki don’t count, so additionally to assess live/death of groups, the computer has to find out which groups are in Seki.

1 Like

I think seki is just one complication out of many that arise from the potential complexities of determining life and death under Japanese rules.

Under Chinese and other area scoring rules, it’s possible to further simplify the endgame position by playing on to capture strategically dead stones (indeed, this is method to resolve disputes and requires no advanced reading skills on the part of the arbiter). This is possible, since these additional plays won’t change the final score.

On the other hand, with Japanese rules, play is often strategically forced to end with some stones left uncaptured, and requires the arbiter to work through all of the complexities of life and death with careful reading (possibly assisted by the players). Further, there are some nuances and weird situations that only seem to arise in the Japanese rules:

  1. Determining life and death in the confirmation phase (after both players have passed) considers hypothetical perfect play with a different ko rule than is normally used during the rest of the game. It’s possible for stones to not be killable or saveable during normal play, but only die during the confirmation phase.
  2. It’s possible for both players to lose if they make the mistake of leaving a decisive, unsettled position on the board.
  3. It’s possible to have stones that are declared dead during confirmation but not removed for counting the score, in the case of anti-seki.
  4. The case of Moonshine Life seems to lead to a possible endless loop during the confirmation phase. However, the Japanese rules clarify and provide a special ruling for this particular pattern in the official commentary.

While these issues are quite rare, their possible existence means that any software needs to be ready to handle some difficult edge cases, makes developing a solid algorithmic approach to life and death under Japanese rules quite challenging.

4 Likes

And if I should ever attempt to write a go program I’ll translate this to: ‘absolutely not worth the trouble’

2 Likes